Under the RLS command environment you issue commands to interface with RLS. If you set the command environment to RLS, you should not specify RLS in front of RLS commands.
'RLS READ \USERS\USER1\TEST.DATA DATA.'
This example reads the contents of the RLS list \USERS\USER1\TEST.DATA into the DATA. REXX compound variable.
The syntax for the RLS commands follow.
>>-RLS--CKDIR--dirid-------------------------------------------><
CKDIR checks for an existing RLS directory level.
See the RLS command, section RLS.
'RLS CKDIR \USERS\USER1\DOCS'
This example checks for a directory called DOCS in the existing directory \USERS\USER1.
>>-RLS--DELETE--listname---------------------------------------><
DELETE deletes an RLS list.
See the RLS command, section RLS.
'RLS DELETE \USERS\USER1\TEST.DATA'
This example deletes RLS list TEST.DATA.
.-*QUEUE*-. >>-RLS--LPULL--varname--+---------+---------------------------->< '-queid---'
LPULL pulls a record from the top of the RLS queue.
See the RLS command, section RLS.
'RLS LPULL VARA QUEUE1'
This example pulls a record from the top of the RLS queue QUEUE1.
.-*QUEUE*-. >>-RLS--LPUSH--varname--+---------+---------------------------->< '-queid---'
LPUSH pushes a record onto the top of the RLS queue (LIFO).
See the RLS command, section RLS.
'RLS LPUSH VARA QUEUE1'
This example pushes a record (the contents of VARA) onto the top of the RLS queue QUEUE1.
.-*QUEUE*-. >>-RLS--LQUEUE--varname--+---------+--------------------------->< '-queid---'
LQUEUE adds a record to the end of the RLS queue (FIFO).
See to the RLS command, section RLS.
'RLS LQUEUE VARA QUEUE1'
This example adds a record (the contents of VARA) to the end of the RLS queue QUEUE1.
>>-RLS--MKDIR--dirid-------------------------------------------><
MKDIR creates a new RLS directory level.
See the RLS command, section RLS.
'RLS MKDIR \USERS\USER1\DOCS'
This example creates a new directory called DOCS in the existing directory \USERS\USER1.
.-DATA.-. >>-RLS--READ--listname--+-------+--+--------+------------------>< '-stem.-' '-(--UPD-'
READ reads records from an RLS list.
See the RLS command, section RLS.
'RLS READ \USERS\USER1\TEST.DATA DATA.'
This example stores the entire contents of the RLS list \USERS\USER1\TEST.DATA in the DATA. REXX compound variable.
DATA.0 is set to the number of records read from the list. DATA.n contains the nth record read from the list.
>>-RLS--VARDROP--varname--dirid--------------------------------><
VARDROP deletes an RLS saved variable.
See the RLS command, section RLS.
'RLS VARDROP VAR1'
This example deletes variable VAR1 from the current directory.
>>-RLS--VARGET--varname--dirid---------------------------------><
VARGET takes an RLS saved variable and copies it into a REXX variable of the same name.
See the RLS command, section RLS.
'RLS VARGET VAR1'
This example copies the value of variable VAR1 from the current directory into a REXX variable named VAR1.
>>-RLS--VARPUT--varname--dirid---------------------------------><
VARPUT takes a REXX variable and copies it into an RLS saved variable of the same name.
See the RLS command, section RLS.
'RLS VARPUT VAR1'
This example takes the value of REXX variable VAR1 and copies it into variable VAR1 in the current directory.
.-DATA.-. >>-RLS--WRITE--listname--+-------+----------------------------->< '-stem.-'
WRITE writes records to an RLS list.
See the RLS command, section RLS.
'RLS WRITE \USERS\USER1\TEST.DATA DATA.'
This example stores the entire contents of the REXX compound variable DATA. into the RLS list \USERS\USER1\TEST.DATA.
Set DATA.0 to the number of records to be written to the list.