HCL Workload Automation, Version 9.4

SETFORM directive

Purpose

This directive defines the format of dynamic-format supplied variables. After the agent processes the SETFORM directive, you can refer to the variable and perform arithmetic calculations using the variable. You can redefine the variable many times within the job, if you need to.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-//*%OPC SETFORM--dynamic-variable-name--=(--format--)-------><

Parameters

dynamic-variable-name=(format expression)
The dynamic variable uses the format defined in the format expression.

Usage Notes

The dynamic variable name must be one of the predefined dynamic variables (see Dynamic-format variables).

The format expression can contain a combination of time-related keywords, date-related keywords, and delimiters.

The date-related keywords are:
CC
Represents the century. This is used in combination with YY to define the format of a full year, such as 2012.
YY
Represents the last two figures in the year.
MM
Represents the month.
DDD
Represents day-in-year. This is substituted before DD: the character string DDDDDD is understood as two DDD keywords, not three DD keywords.
DD
Represents the day in the month.
The time-related keywords are:
HH
Represents the hour.
MM
Represents the minutes.

Any other characters in the format expression are regarded as delimiters. These delimiters can be alphabetic, numeric, or any symbol except the variable substitution characters &, %, ?, =, and the parentheses ().

For the time-related dynamic variables, OCTIME, OPIATIME, and CTIME, only HH and MM are recognized. YY, for example, is not substituted. MM is substituted by the minutes part of the time.

For date-related dynamic variables, only CCYY, YY, MM, DD, and DDD are recognized. CC without YY is not recognized. HH is not substituted. MM is substituted by the month part of the date.

You can use more than one delimiter between keywords.

For example, MM//DD-- YY is a valid format expression.

Delimiters are optional; that is, you can define consecutive keywords with no delimiters, such as DDMMYY.

In the following examples, assume that the occurrence input arrival time is at 4:10 PM on December 31st 2012.

Example

//*%OPC SCAN
//*%OPC SETFORM OCDATE=(YY/MM/DDD)

The resulting &OCDATE variable would be: 12/12/365

The examples in Table 1 use the same occurrence input arrival date.

Table 1. Dynamic-format substitution results
Dynamic format variable Format expression Result
OCDATE YY-MM-DDABC 12-12-31ABC
OCTIME HH MM 16 10 (Note the MM substitutes as minutes for time variables and substitutes as month for date variables.)
OCDATE DDDDD 36531. DDD is the 365th day of the year, and DD is the day of the month.
OCDATE DDDD 365D. DDD is the 365th day of the year, but no match was found for the last D.
OCDATE YYMMHHMMSS 1212HH12SS. This is a date variable, so HH is not substituted.