Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

JV( ) Request job variable

&pagelevel(3)&pagelevel

Domain: Job variable functions

The JV( ) function supplies the content of the specified job variable.

This function can be used only if the JV subsystem is loaded in the system. See the “Job Variables” [5] manual for more information on job variables.

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 JV contents to be extracted. Unless otherwise specified, this is the first character. arithm_expression1 must be a positive integer value which is less than the total length of the JV. If the value specified for arithm_expression1 is not a valid one, a null string will be returned.

LENGTH = *REST-LENGTH / arithm_expression2
Designates the length of the JV contents to be extracted. The default value of *REST-LENGTH assumes that the JV contents to be extracted start at the position indicated by START and extend to the end. If a different length is specified in arithm_expression2, and if this is too long, then LENGTH = *REST-LENGTH is implicitly assumed.

Result

Contents of the job variable designated by “string_expression”, or that part of it designated by “arithm_expression1” and “arithm_expression2”.

Error messages

SDP0412    START POSITION OUT OF RANGE
SDP0414    WARNING: *REST-LENGTH VALUE USED FOR LENGTH OPERAND
SDP1022    JV: JOB VARIABLE '(&00)' NOT ACCESSIBLE 
SDP1024    JV: JOB VARIABLE '(&00)' DOES NOT EXIST 
SDP1027    VALUE FOR JOB VARIABLE '(&00)' IS NOT A STRING 
SDP1054    JOB VARIABLE ERROR: JVS ERROR CODE '(&00)' WHILE ACCESSING JOB 
           VARIABLE '(&01)'. IN SYSTEM MODE: /HELP-MSG JVS(&00) 

Example

/CREATE-JV JV-NAME=HUGO
/MODIFY-JV JV-CONTENTS=HUGO,SET-VALUE=c'switch is on'
/A = JV('HUGO')
/SHOW-VARIABLE A
A = switch is on
/B = JV('HUGO',4,3)
/SHOW-VARIABLE B
B = tch