IBM InfoSphere DataStage, Version 11.3.1
SYSTEM function
Syntax
SYSTEM (expression)
Description
Use the SYSTEM function to check on the status of a system function. Use the SYSTEM function to test whether NLS is on when you run a program, and to display information about NLS settings.
expression evaluates to the number of the system function you want to check. If expression evaluates to the null value, the SYSTEM function fails and the program terminates with a run-time error message.
The following table lists the values for expression and their meanings. Values 100 through 107 (read-only) for the SYSTEM function contain NLS information. See the include file UVNLS.H for their tokens.
| Value | Action |
|---|---|
| 1 | Checks to see if the PRINTER statement ON statement has turned the printer on. Returns 1 if the printer is on and 0 if it is not. |
| 2 | Returns the page width as defined by the terminal characteristic settings. |
| 3 | Returns the page length as defined by the terminal characteristic settings. |
| 4 | Returns the number of lines remaining on the current page. |
| 5 | Returns the current page number. |
| 6 | Returns the current line number. |
| 7 | Returns the terminal code for the type of terminal the system believes you are using. |
| 8,n | Checks whether the tape is attached. Returns the current block size if it is and -1 if it is not. n is the number of the tape unit. If it is not specified, tape unit 0 is assumed. |
| 9 | Returns the current CPU millisecond count. |
| 10 | Checks whether the DATA stack is active. Returns 1 if it is active and 0 if it is not. |
| 11 | Checks whether select list 0 is active. Returns 1 if select list 0 is active and 0 if it is not. |
| 12 | By default, returns the current system time in seconds (local time). If the TIME.MILLISECOND option is set (see $OPTIONS), returns the current system time in milliseconds. |
| 13 | Not used. Returns 0. |
| 14 | Not used. Returns 0. |
| 15 | Not used. Returns 0. |
| 16 | Returns 1 if running from a procedure, otherwise returns 0. |
| 17 | Not used. Returns 0. |
| 18 | Returns the terminal number. |
| 19 | Returns the login name. |
| 20 | Not used. Returns 0. |
| 21 | Not used. Returns 0. |
| 22 | Not used. Returns 0. |
| 23 | Checks whether the Break key is enabled. Returns 1 if the Break key is enabled and 0 if it is not. |
| 24 | Checks whether character echoing is enabled. Returns 1 if character echoing is enabled and 0 if it is not. |
| 25 | Returns 1 if running from a phantom process, otherwise returns 0. |
| 26 | Returns the current prompt character. |
| 27 | Returns the user ID of the person using the routine. |
| 28 | Returns the effective user ID of the person using the routine. Windows. This is the same value as 27. |
| 29 | Returns the group ID of the person using the routine. Windows. This value is 0. |
| 30 | Returns the effective group ID of the person using the routine. Windows. This value is 0. |
| 31 | Returns the InfoSphere® DataStage® serial number. |
| 32 | Returns the location of the UV account directory. |
| 33 | Returns the last command on the command stack. |
| 34 | Returns data pending. |
| 35 | Returns the number of users currently in InfoSphere DataStage. |
| 36 | Returns the maximum number of InfoSphere DataStage users. |
| 37 | Returns the number of UNIX users; on Windows systems returns same value as 35. |
| 38 | Returns the path name of the temporary directory. |
| 42 | Returns an empty string. On Windows systems returns the current value of the telnet client's IP address, or an empty string if the process evaluating the SYSTEM function is not the main telnet process. |
| 43 | Returns 1 if db suspension is on, returns 0 if it is not. |
| 50 | Returns the field number of the last READNEXT statement when reading an exploded select list. |
| 60 | Returns the current value of the InfoSphere DataStage configurable parameter TXMODE. The value can be either 1 or 0. |
| 61 | Returns the status of the transaction log daemon. 1 indicates the daemon is active; 0 indicates it is inactive. |
| 62 | Returns the value of the MODFDTRS parameter, otherwise returns 0. |
| 63 | Returns the value of the BLKMAX parameter, otherwise returns 0. |
| 91 | Returns 0; on Windows, returns 1. |
| 99 | Returns the system time in the number of seconds since midnight Greenwich Mean Time (GMT), January 1, 1970. |
| 100 | Returns 1 if NLS is enabled, otherwise returns 0. |
| 101 | Returns the value of the NLSLCMODE parameter, otherwise returns 0. |
| 102 | Reserved for future NLS extensions. |
| 103 | Returns the terminal map name assigned to the current terminal print channel, otherwise returns 0. |
| 104 | Returns the auxiliary printer map name assigned to the current terminal print channel, otherwise returns 0. |
| 105 | Returns a dynamic array, with field marks separating the elements, containing the current values of the uvconfig file parameters for NLS maps, otherwise returns 0. See the UVNLS.H include file for a list of tokens that define the field order. |
| 106 | Returns the current map name used for sequential I/O. Token is NLS$SEQMAP unless overridden by a SET.SEQ.MAP command. |
| 107 | Returns the current map name for GCI string arguments unless overridden by a SET.GCI.MAP command. |
| 1001 | Returns the InfoSphere DataStage flavor: 1 for IDEAL, 2 for PICK, 4 for INFORMATION, 8 for REALITY, 16 for IN2, and 64 for PIOPEN. |
| 1017 | Returns the user's supplementary UNIX groups in a dynamic array. |
| 1021 | Returns the GCI error number. |
| 1200, hostname | Returns the link number associated with hostname. If there is an internal error adding hostname, 0 returns. hostname is an expression that contains the host name from a file opened remotely. It refers to the host name portion of the file's path name. For example, in the path name ORION!/u1/filename, hostname is ORION. |
| 1201, hostname | Returns the RPC connection number associated with hostname. The REMOTE.B interface program uses this number. If there is an internal error adding hostname, or if RPC has not yet opened, 0 returns. If the RPC connection was opened but is now closed, -1 returns. |
| 1202, hostname | Returns the timeout associated with hostname. If there is no timeout associated with hostname, 0 returns. |
| 1203 | Returns the last RPC connection error number. This number is in the range 81000 through 81999. 81015 indicates that a timeout occurred. These error numbers correspond to error messages in the SYS.MESSAGE file. |
Examples
The first example returns the number of lines left to print on a page, with the maximum defined by the TERM command. The second example returns the current page number.
- Source Lines
- Program Output
- Q=4 PRINT 'SYSTEM(Q)',SYSTEM(Q)
SYSTEM(Q) 20- PRINT 'X=',SYSTEM(5)
X= 0
The next example sets a 30-second timeout for the network connection to the system ORION:
TIMEOUT SYSTEM(1200, "ORION"), 30
Last updated: 2015-03-09
PDF version of this information: