COPYR2S
Note: This is an authorized command.
COPYR2S source_vname stor_anchor offset
* length
struct_vname fieldname
struct_name fieldname
COPYR2S copies REXX variable contents to GETMAINed storage.
Operands
source_vname
specifies the REXX variable containing the value copied to the previously GETMAINed area.
Note: This value should be in quotes so that substitution does not occur.
* specifies that all the REXX variables are copied. If you specify an asterisk (*) you cannot specify
fieldname.
stor_anchor
specifies the REXX variable containing the anchor for the target storage area that was GETMAINed
earlier. This anchor consists of four bytes, containing the address of the earlier GETMAINed storage.
offset
specifies the displacement into the previously GETMAINed storage area, that the contents of the
REXX variable is copied to. The first byte of the area is indicated by a displacement of zero.
length
specifies the length in decimal bytes of the copy performed. If this length is specified, then the
contents of the source REXX variable is truncated, or padded with blanks to match this length, and
then copied. However, the source REXX variable is not altered in this process. If this length is omitted,
then the current length of the source REXX variable, is used.
struct_vname
specifies a REXX variable containing a structure definition (or mapping) of the fields in the
GETMAINed storage area. The format of the data in this variable is: field1_name length ...
fieldn_name length. This capability is provided so that field displacements are easily calculated and
changed, from a central location.
struct_name
specifies the structure file ID containing a structure definition (or mapping) of the fields in the
GETMAINed storage area.
Structures are made up of records in the following format: fieldname location length type, where:
fieldname
specifiesa1to12character symbolic name of the field.
location
specifies the position in structure that this field starts (the first position is 1).
length
specifies decimal length of this field in bytes.
type
specifies the field data type: C (character), F (fullword), or H (halfword).
fieldname
isa1to12character symbolic name associated with the destination field for this copy. This name
must exist in the above specified REXX variable or structure definition file. The fieldname must be
specified when struct_vname or struct_name is specified.
Commands
Chapter 25. REXX/CICS Commands 327