DIR
DIR displays the current directory contents or optionally returns the directory contents in a REXX compound variable.
Operands
- dirid
- specifies the partial or full REXX File System directory that is displayed. If you omit this, then the current directory is displayed.
- stem.
- specifies the name of a stem. A stem must end in a period; see Stems. Stem.0 contains the number of elements in the entry. If you omit this, the contents are displayed on the screen.
Return codes
- 0
- Normal return
- 321
- Cannot access current RFS directory information
- 322
- Invalid stem name
- 325
- Error retrieving RFS directory
Example
'DIR \USERS\USER2 (X.'This example places the directory contents of \USERS\USER2 into the REXX compound variable
X.1 through X.n. X.0 contains the number of
elements returned.
Note: The current directory is specified by the CD command.
