Java Client Environment
There is a subroutine that you can use to find out more information about the user's environment, if they are running the Java Client. Consider the following code:
SET --- TEMP 80 = client.version SET --- TEMP 79 = PASS --- TEMP 80 FIELD SHARE? N PASS --- TEMP 79 FIELD SHARE? Y SUBR --- GET CLIENT CONSTANT DETACHED END? N FAIL 0Following execution of the GET CLIENT CONSTANT subroutine, TEMP 79 will contain a string that identifies the version of the Java Client that the user is running (e.g., 4.2.4a). If they are not running the Java Client, or are running a version prior to 4.2.4, then TEMP 79 will be blank. The GET CLIENT CONSTANT subroutine allows us to check more than just the client version, we can also PASS it the following:
file.separator - returns the current string used to separate file names in a path. This would normally be a `\' for Windows platforms and `/' for everything else.
path.separator - returns the string used to separate the path names in the PATH environment variable. This is usually a `;' in Windows, ':' in Unix/Linux.
os.name - returns a string identifying the name of the O/S under which the Java Client is running. This could be `Windows XP' or `Linux' for example.
os.version - returns a string identifying the version of the O/S under which the Java Client is running. For a Windows XP machine, this returns `5.1', and for a Linux machine this would return the Kernel version string, such as `2.4.21-243-default'
These calls allow us to get all the information we need to deal with the end user's environment. For example, if we have to create a file & upload it to the user, we know whether to use backslashes in file names or not, based on `file.separator' and we know whether to use LF or CR/LF delimiters,based on the `os.name'.
Java Client ILF Editor Shortcuts
You can double click a file name, field name, LABEL or GOSUB statement in the ILF editor. In the case of fields and fields, APPX will take you to the Data Dictionary for that field or file. In the case of a GOSUB statement, it will take you to the subroutine. In the case of a LABEL statement, it will take you to the GOSUB that refers to that LABEL.
Do you have a tip you want to pass on? Contact Us.