var1 = '' /* set REXX variable VAR1 to null */
struct1 = 'flda 4 fldb 2 fldc 3 fldd 8 flde 5'
'COPYS2R WORKANC VAR1 STRUCT1 FLDC'
This example copies three bytes of data from positions 7 through 9 of the earlier GETMAINed storage area anchored by the fullword address in REXX variable WORKANC, and copies it to REXX variable VAR1.