RLS commands

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.

Example:

'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.

CKDIR

Read syntax diagramSkip visual syntax diagram>>-RLS--CKDIR--dirid-------------------------------------------><
 

CKDIR checks for an existing RLS directory level.

Operands

dirid
specifies a REXX List System directory level identifier. This is partially or fully qualified. See the CLD command, section CLD, for more information.

Return Codes

See the RLS command, section RLS.

Example

'RLS CKDIR \USERS\USER1\DOCS'

This example checks for a directory called DOCS in the existing directory \USERS\USER1.

DELETE

Read syntax diagramSkip visual syntax diagram>>-RLS--DELETE--listname---------------------------------------><
 

DELETE deletes an RLS list.

Operands

listname
specifies a REXX List System list identifier. This is partially or fully qualified. See the CLD command, section CLD, for more information.

Return Codes

See the RLS command, section RLS.

Example

'RLS DELETE \USERS\USER1\TEST.DATA'

This example deletes RLS list TEST.DATA.

LPULL

Read syntax diagramSkip visual syntax diagram                        .-*QUEUE*-.
>>-RLS--LPULL--varname--+---------+----------------------------><
                        '-queid---'
 

LPULL pulls a record from the top of the RLS queue.

Operands

varname
specifies a simple REXX variable name. It does not end in a period, distinguishing a variable name from a stem name.
*QUEUE*
is a keyword specifying the special default name.
queid
specifies the identifier for a special type of RLS list accessed by LPULL, LPUSH, or LQUEUE.

Return Codes

See the RLS command, section RLS.

Example

'RLS LPULL VARA QUEUE1'

This example pulls a record from the top of the RLS queue QUEUE1.

LPUSH

Read syntax diagramSkip visual syntax diagram                        .-*QUEUE*-.
>>-RLS--LPUSH--varname--+---------+----------------------------><
                        '-queid---'
 

LPUSH pushes a record onto the top of the RLS queue (LIFO).

Operands

varname
specifies a simple REXX variable name. It does not end in a period, distinguishing a variable name from a stem name.
*QUEUE*
is a keyword specifying the special default name.
queid
specifies the identifier for a special type of RLS list accessed by LPULL, LPUSH, or LQUEUE.

Return Codes

See the RLS command, section RLS.

Example

'RLS LPUSH VARA QUEUE1'

This example pushes a record (the contents of VARA) onto the top of the RLS queue QUEUE1.

LQUEUE

Read syntax diagramSkip visual syntax diagram                         .-*QUEUE*-.
>>-RLS--LQUEUE--varname--+---------+---------------------------><
                         '-queid---'
 

LQUEUE adds a record to the end of the RLS queue (FIFO).

Operands

varname
specifies a simple REXX variable name. It does not end in a period, distinguishing a variable name from a stem name.
*QUEUE*
is a keyword specifying the special default name.
queid
specifies the identifier for a special type of RLS list accessed by LPULL, LPUSH, or LQUEUE.

Return Codes

See to the RLS command, section RLS.

Example

'RLS LQUEUE VARA QUEUE1'

This example adds a record (the contents of VARA) to the end of the RLS queue QUEUE1.

MKDIR

Read syntax diagramSkip visual syntax diagram>>-RLS--MKDIR--dirid-------------------------------------------><
 

MKDIR creates a new RLS directory level.

Operands

dirid
specifies a REXX List System directory level identifier. This is partially or fully qualified. See the CLD command, section CLD, for more information.

Return Codes

See the RLS command, section RLS.

Example

'RLS MKDIR \USERS\USER1\DOCS'

This example creates a new directory called DOCS in the existing directory \USERS\USER1.

READ

Read syntax diagramSkip visual syntax diagram                        .-DATA.-.
>>-RLS--READ--listname--+-------+--+--------+------------------><
                        '-stem.-'  '-(--UPD-'
 

READ reads records from an RLS list.

Operands

listname
specifies the list identifier.
stem.
specifies the name of a stem. (A stem must end in a period.) See section Stems for more information. The default stem is DATA..
UPD
is a keyword that enqueues on a file for update.

Return Codes

See the RLS command, section RLS.

Example

'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.

Note

DATA.0 is set to the number of records read from the list. DATA.n contains the nth record read from the list.

VARDROP

Read syntax diagramSkip visual syntax diagram>>-RLS--VARDROP--varname--dirid--------------------------------><
 

VARDROP deletes an RLS saved variable.

Operands

varname
specifies a simple REXX variable name. It does not end in a period, distinguishing a variable name from a stem name.
dirid
specifies a REXX List System directory level identifier. This is partially or fully qualified. See the CLD command, section CLD, for more information.

Return Codes

See the RLS command, section RLS.

Example

'RLS VARDROP VAR1'

This example deletes variable VAR1 from the current directory.

VARGET

Read syntax diagramSkip visual syntax diagram>>-RLS--VARGET--varname--dirid---------------------------------><
 

VARGET takes an RLS saved variable and copies it into a REXX variable of the same name.

Operands

varname
specifies a simple REXX variable name. It does not end in a period, distinguishing a variable name from a stem name.
dirid
specifies a REXX List System directory level identifier. This is partially or fully qualified. See the CLD command, section CLD, for more information.

Return Codes

See the RLS command, section RLS.

Example

'RLS VARGET VAR1'

This example copies the value of variable VAR1 from the current directory into a REXX variable named VAR1.

VARPUT

Read syntax diagramSkip visual syntax diagram>>-RLS--VARPUT--varname--dirid---------------------------------><
 

VARPUT takes a REXX variable and copies it into an RLS saved variable of the same name.

Operands

varname
specifies a simple REXX variable name. It does not end in a period, distinguishing a variable name from a stem name.
dirid
specifies a REXX List System directory level identifier. This is partially or fully qualified. See the CLD command, section CLD, for more information.

Return Codes

See the RLS command, section RLS.

Example

'RLS VARPUT VAR1'

This example takes the value of REXX variable VAR1 and copies it into variable VAR1 in the current directory.

WRITE

Read syntax diagramSkip visual syntax diagram                         .-DATA.-.
>>-RLS--WRITE--listname--+-------+-----------------------------><
                         '-stem.-'
 

WRITE writes records to an RLS list.

Operands

listname
specifies the list identifier.
stem.
specifies the name of a stem. (A stem must end in a period.) See section Stems for more information. The default stem is DATA..

Return Codes

See the RLS command, section RLS.

Example

'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.

Note

Set DATA.0 to the number of records to be written to the list.