Ü RTVDTAARA
This is used to retrieve the data area and store the value in a CL
variable.
RTVDTAARA DTAARA(SFTP9140 (1 100)) RTNVAR(&RMTSYS)
RTVDTAARA DTAARA(SFTP9140 (101 50)) RTNVAR(&RMTPATH)
SFTP RMTSYS(SYSTEM01-net.com) ACTION(PUT) FORUSER(ASSH) LOCALTYPE(*IFS) –
LOCALPATH('/tmp') LOCALFILE(LOCAL001.txt) REMOTEPATH(&RMTPATH) -
REMOTEFILE(REMOTE001.txt)
In the example
above:
The dataarea from
length 1 to 100 will be stored in the variable &RMTSYS.
The dataarea from
length 101 to 150 will be stored in the variable &RMTPATH.