Hitachi TrueCopy for z/OS (T1711-96009, June 2006)
TrueCopy for z/OS user guide 189
Syntax for Scripting
Syntax Overview
A TC390 script file can be written using any text editor (for example, WordPad or Notepad). A script file
consists of an unlimited number of statements that consist of macros (commands), work variables, and
comments (see
”Operation Macro Commands” on page 191 and ”Internal Macro Commands” on page 199). The
first executable statement in a TC390 script file must be the Start macro and the last statement must be the
End macro. Each line in a TC390 script file cannot exceed 320 bytes. A leading blank is ignored and a
leading tab character (0x09) is converted to a space (0x20). A tab character (0x09) within a string is not
converted to a space.
Each script file should contain all five script statements (see Table 53 on page 190 and Table 54 on
page 190):
• A comment statement, including a short preface for the script: purpose, author, usage, description,
operation, creation date, update date, and any reminder notes to the author. The comment statement is
a non-execution statement. A comment statement begins with “//” and contains text (any character
string) without any commands. Do not use the “//” symbol anywhere else in a script file, only at the
beginning of a comment statement.
• A macro statement (see
”Operation Macro Commands” on page 191 and ”Internal Macro Commands” on
page 199
). The macro statement is an execution statement. Only one macro instruction can be set per
line and a macro can span more than one line.
• A work variable statement (see ”Work Variables” on page 201). The work variable statement is also
an execution statement. Only one work variable statement can be set per line and a work variable
statement cannot span more than one line.
• A blank statement (see Table 53). The blank statement is a non-execution statement.
Table 52 Internal macro commands for TrueCopy scripting
Type Macro Description
For lists SetList
AddList
Set (define) a list of items.
Add items to a list.
For non-lists Start
End
Delay
If
EndIf
MakeString
Declares the beginning of a script.
Declares the end of a script.
Suspends script execution for the specified length of time.
Executes a script conditionally.
Terminates a script conditionally.
Makes strings; converts numeric value to character string.