Previous Topic: Generated OutputNext Topic: GETLIKE function variable output:


GET function variable output:

The GET function retrieves or obtains the value of the specified variable as defined in the NAME keyword, and assigns it to the calling variable of the function. For example:

payroll_status = OPSVASRV(“GET NAME(GLVPLXT0.APPL.PAYROLL.STATUS)”)

The value of the GLVPLXT0.APPL.PAYROLL.STATUS variable would be assigned to the payroll_status variable within the executing program.

When the OPTION(STATS) keyword is specified for a GET request, the output variables that GETLIKE produces are also created for GET. The stem variable index is omitted from the variables, because only one instance of each variable is created.

GETNEXT function variable output:

The GETNEXT function obtains the value of the next variable that matches the variable name mask that is specified in the NAME keyword. The output TOKEN value of the prior request acts as the start location for the next matching variable search. For example:

Next_value=OPSVASRV(“GETNEXT NAME(GLVPLXT0.APPL.PAYROLL.*) TOKEN(“vasrv_token”)”)

The OPTION(STATS) keyword is the default for a GETNEXT request. The output variables that GETLIKE produces are also created for GETNEXT. The stem variable index is omitted from the variables, because only one instance of each variable is created. The VASRV_NAME variable provides the complete variable name of the returned variable.