The @GETJV statement outputs the value of a job variable on the screen, writes it to a work file or assigns it to a string variable.
Operation | Operands | F mode, L mode |
@GETJV | [string] [={line | svarex}] [,CODE=name] |
string | String which specifies the fully qualified name of a job variable. Although the |
line | Number of the line to which the value of the job variable is to be written. |
svarex | String variable in which the value of the job variable is to be written. |
name | Name of the character set in which the value of the job variable is to be |
If neither line
nor svarex
is specified, the value of the job variable is output to SYSOUT
in interactive mode and to SYSLST
in batch mode.
If a line with a number greater than the previous highest line number is created then the current line number is modified.
If the job variable does not exist then the message EDT4982
is output. If it cannot be accessed then the message EDT4208
is output.
If the job variable is empty then an empty string is used as its value.
If the job variable contains an invalid byte sequence (possible in Unicode character sets) then it is not read and the message EDT5454
is output.
If it is assigned to a string variable then this is also assigned the character set specified implicitly or explicitly via name
. If it is inserted in a work file then the value is converted into the work file's character set. If the work file is empty and has the character set *NONE
then it is assigned the character set specified explicitly or implicitly via name
. If the string that is to be assigned contains characters which cannot be converted into the work file's character set then these characters are replaced by a substitute character provided that such a character has been specified (see @PAR SUBSTITUTION-CHARACTER); otherwise, the string is not assigned and the error message EDT5453
is output.
If the Job Variable Support subsystem is not installed, the statement is rejected with the error message EDT5254
. For details concerning job variables, see the User Guide JV [9].