Symbolic Parameters

The platform server scripting supports up to 200 user-defined script variables. You do not have to predefine the variables.

The variables can be either numeric or character variables. The variable type depends on the way in which the values are initialized by the SET function. Only numeric variables can be used in addition or subtraction. You can specify a starting position and length for character variables by prefixing ss.ll to the variable name. For example, when %FILENAME(10.5) is specified, the platform server uses bytes 10 - 14 of variable %FILENAME. The starting position ss is relative to 1.

The following table lists the predefined variables:

Parameter Description
%DATE Today's date is saved in this field in the format: CCYYDDD.

You cannot set this field. If you attempt to use this field as the target of a SET function, an error occurs.

%GDATE Today's date is saved in this field in the format: CCYYMMDD.

You cannot set this field. If you attempt to use this field as the target of a SET function, an error occurs.

%GDATE1 Today's date is saved in this field in the format: 1YYMMDD.

You cannot set this field. If you attempt to use this field as the target of a SET function, an error occurs.

%GDATE2 Today's date is saved in this field in the format: YYYYDDMM.

You cannot set this field. If you attempt to use this field as the target of a SET function, an error occurs.

%GDATE3 Today's date is saved in this field in the format: MMDDYYYY.

You cannot set this field. If you attempt to use this field as the target of a SET function, an error occurs.

%GDATE4 Today's date is saved in this field in the format: DDMMYYYY.

You cannot set this field. If you attempt to use this field as the target of a SET function, an error occurs.

%IDCAMS1 - %IDCAMS40 Used by the CALLIDCAMS script function and cleared by the CLEARIDCAMS script function.

When used by the CALLIDCAMS function, they define the exact data that is passed to the z/OS IDCAMS utility.

Note: When calling IDCAMS, keep column 1 blank. It is good practice to define IDCAMS data in columns 2 - 71.
%MAXEXEC Defines the maximum number of script statements that can be executed before an error is detected.

This parameter is used in loop detection to ensure that the script is not looping.

The default value is 10000, and the valid values are 0 - 99999999. You can increase or decrease this parameter in a SET function.

%MAXLOOP Defines the maximum number of script statements that can be executed between batch PROCESS statements before an error is detected.

This parameter is used in loop detection to ensure that the script is not looping.

The default value is 500, and the valid values are 0 - 99999999. This parameter is reset to 0 after each PROCESS statement. You can increase or decrease this parameter in a SET function.

%MAXRC Defines the maximum return code encountered.

You can change this parameter in a SET function. This parameter is set on PROCESS and CALLPGM requests when the return code exceeds the current value of this parameter.

%PROC Defines the process under which the script is running.

This parameter is only valid when the script is running within the platform server started task. If the script is not running within the platform server started task, this parameter defaults to the job name.

%RC Defines the return code of the last event for which a return code is set.

You can use this parameter in a SET function. This parameter is set on PROCESS and CALLPGM requests.

%SERVER Defines the name of the platform server with which the script program is communicating.

The value stored in this parameter depends on the parameters defined in the EXEC PARM statement. The following values can be stored in this variable: CONFIG, IPADDR, IPNAME, LUNAME, or SERVER.

You cannot set this field. If you attempts to use this field as the target of a SET function, an error occurs.

%TDAY Defines the current English day of week.

The field must be 9 bytes long and space filled. The values are Sunday - Saturday.

%TDAYOFWEEK Defines the numeric day of week.

The values are 1 - 7; wherein, 1 stands for Sunday and 7 stands for Saturday.

%TDD Defines the numeric day of month.

The values are 1 - 31.

%TDDD Defines the numeric Julian day.

The values are 1 - 366.

%TIME Defines the current system time in the format of HHMMSS.

You cannot set this field. If you attempts to use this field as the target of a SET function, an error occurs.

%TIME1 Defines the current system time in the format of HHMMSSTH.

You cannot set this field. If you attempts to use this field as the target of a SET function, an error occurs.

%TIME2 Defines the current system time in the format of MMSSTH.

You cannot set this field. If you attempts to use this field as the target of a SET function, an error occurs.

%TMM Defines the numeric month.

The values are 1 - 12; wherein, 1 stands for January and 12 stands for December.

%TMONTH Defines the current English month.

The field must be 9 bytes long and space filled. The values are January - December.

%TRN Defines the 10-byte transaction number of the last platform server PROCESS request that was executed.

Before the first PROCESS statement, the value is displayed as "***N/A****".

%TYYYY Defines the numeric year.

This parameter must be 4 bytes long.

%USER Defines the z/OS user ID associated with the job that is executing the script.

You cannot set this field. If you attempts to use this field as the target of a SET function, an error occurs.

%WTORDATA Saves the information that is returned by the operator in response to the script WTOR function.

Although you can change this variable in a SET command, it is typically referenced after a WTOR command to see the data that the console operator entered.

%WTORLENGTH Used for the following two purposes by the script WTOR function:
  • When you set this parameter before the WTOR function, it defines the maximum number of characters that can be entered by the console operator in response to the WTOR message.
  • After the console operator replies to the WTOR message, the length of the information that is entered by the operator is saved in this field.
%YDATE Yesterday's date is saved in this field in the format: CCYYDDD.

You cannot set this field. If you attempt to use this field as the target of a SET function, an error occurs.

%YGDATE Yesterday's date is saved in this field in the format: CCYYMMDD.

You cannot set this field. If you attempt to use this field as the target of a SET function, an error occurs.

%YGDATE1 Yesterday's date is saved in this field in the format: 1YYMMDD.

You cannot set this field. If you attempt to use this field as the target of a SET function, an error occurs.

%YGDATE2 Yesterday's date is saved in this field in the format: YYYYDDMM.

You cannot set this field. If you attempt to use this field as the target of a SET function, an error occurs.

%YGDATE3 Yesterday's date is saved in this field in the format: MMDDYYYY.

You cannot set this field. If you attempt to use this field as the target of a SET function, an error occurs.

%YGDATE4 Yesterday's date is saved in this field in the format: DDMMYYYY.

You cannot set this field. If you attempt to use this field as the target of a SET function, an error occurs.