/* Needed if entering example from the REXXTRY utility */
'PSEUDO OFF'
'CICS GETMAIN SET(WORKANC) LENGTH(200)'/* get 200 bytes of working storage */
VAR1 = '00000000'x /* set a REXX variable with 4 bytes of hex */
'COPYR2S VAR1 WORKANC 4'
This example requests 200 bytes of virtual storage and copies the hex value of '00000000'x into bytes 4 through 7 of that area.
'CICS GETMAIN SET(WORKANC) LENGTH(200)'/* get 200 bytes of working storage */
VAR1 = 'ABC' /* set a REXX variable with 3 characters */
struct1 = 'flda 4 fldb 2 fldc 3 fldd 8 flde 5'
'COPYR2S VAR1 WORKANC STRUCT1 FLDC'
This example requests 200 bytes of virtual storage and copies the character string ABC to position 7 of the GETMAINed area referenced by anchor WORKANC.