Hitachi TrueCopy for IBM z/OS User and Reference Guide (T5211-96001, June 2007)

B-26 TrueCopy for z/OS Scripting
Hitachi Universal Storage Platform V TrueCopy for IBM z/OS User’s Guide
MakeString
The MakeString command allows you to edit a string and/or convert numeric
values to string characters. When using the MakeString statement several
conditions must be met. For each format control string statement there must
be an $Item statement. The format control string of expression 1 must be
enclosed in quotation marks (““). If you set a value exceeding the maximum
length of a string, the extraneous portion of the value will be not set. Table
B.12 defines the two expression statement in the MakeString command. The
format for the MakeString command is:
MakeString $D= output buffer ,$Fmt= expression 1,$Item= expression 2
Table B-12 MakeString Expression Definitions
Expression 1 Expression 2
Expression 1 is one of three format control strings ($Fmt):
%d Converts a 16-bit numeric expression
to a decimal number (0 - 65535).
%x Converts a 16-bit numeric expression
to a hexadecimal number (0 - 0xffff).
%s Sets a string as it is.
Expression 2 is any expression not containing a list
reserved variable (must be constant or work variable).
For example, to create a MakeString statement that will convert the 16-bit
numeric expression to a hexadecimal number (0 - 0xffff) and set the string as
it is, with an output buffer of _sMsg, the command would be:
MakeString $D=_sMsgB
,$Fmt=“EndCode=(0x%x):%s”
,$Item=_Result,_sMsgA
For the MakeString command listed above: _sMsgB =
“EndCode=(0x110f):Error Occurred”.
Message
Note: The Message command is not yet supported.