Domain: | Job variable functions |
The JV function supplies the contents of the specified job variable or of a subarea defined by the START and LENGTH parameters. The chargeable subsystem JV must be loaded and the user must have read authorization for the job variable.
Format
JV( ) |
JV-NAME = string_expression ,START = 1 / arithm_expression1 ,LENGTH = *REST-LENGTH / arithm_expression2 |
Result type
STRING
Input parameters
JV-NAME = string_expression
Designates a job variable; “string_expression” must therefore be a valid job variable name or a JV link name identified by a preceding asterisk (*).
START = 1 / arithm_expression1
Designates the start position of the subarea to be extracted. The default value is the first character. arithm_expression1 must be a positive integer value which is less than the length of the JV value. If the value specified for arithm_expression1 is not valid, a null string will be returned.
LENGTH = *REST-LENGTH / arithm_expression2
Designates the length of the subarea to be extracted. The default value *REST-LENGTH indicates that the subarea to be extracted begins at the position specified by START and extends to the end. If arithm_expression2 specifies a length differing from this which is too long, LENGTH = *REST-LENGTH is assumed implicitly.
Result
Contents of the job variable designated by “string_expression” or the part of it designated by “arithm_expression1” and “arithm_expression2”.
Error messages
SDP0412 START POSITION OUT OF RANGE SDP0414 WARNING: *REST-LENGTH OF FUNCTION 'SUBSTRING' USED SDP1022 JOB VARIABLE '...' NOT ACCESSIBLE SDP1024 JOB VARIABLE '...' DOES NOT EXIST SDP1027 VALUE FOR JOB VARIABLE '...' IS NOT A STRING SDP1054 JOB VARIABLE ERROR: JVS ERROR CODE '...' WHILE ACCESSING JOB VARIABLE'...'. IN SYSTEM MODE: /HELP-MSG DMS...