Under the RFS command environment you issue commands to interface with RFS. If you set the command environment to RFS, you should not specify RFS in front of RFS commands.
Example:
'RFS DISKR POOL1:\USERS\USER1\TEST.EXEC DATA.'
This example reads the contents of the RFS file TEST.EXEC into the REXX compound variable DATA. TEST.EXEC is in the fully qualified directory: POOL1:\USERS\USER1\.
The syntax for the RFS commands follow.
.-PRIVATE-. >>-RFS--AUTH--dirid--+---------+------------------------------->< +-PUBLICR-+ +-PUBLICW-+ '-SECURED-'
AUTH authorizes access to RFS directories.
See the RFS command, section RFS.
'RFS AUTH POOL1:\USERS\USER1\DOCS PUBLICR'
This example makes directory DOCS a public directory. All users have read/only access to the files in directory DOCS.
>>-RFS--CKDIR--dirid-------------------------------------------><
CKDIR checks for an existing RFS directory level.
See the RFS command, section RFS.
'RFS CKDIR POOL1:\USERS\USER1\DOCS'
This example checks for a directory called DOCS in the existing directory POOL1:\USERS\USER1.
>>-RFS--CKFILE--fileid-----------------------------------------><
CKFILE checks to see if the specified, partially or fully qualified, file ID exists.
See the RFS command, section RFS.
'CKFILE POOL1:\USERS\USER1\TEST.EXEC'
This example checks for a file called TEST.EXEC in the existing directory POOL1:\USERS\USER1.
>>-RFS--COPY--fileid1--fileid2---------------------------------><
COPY copies a file.
See the RFS command, section RFS.
'RFS COPY POOL1:\USERS\USER1\TEST1.EXEC POOL1:\USERS\USER1\TEST2.EXEC'
This example copies TEST1.EXEC to TEST2.EXEC within the directory POOL1:\USERS\USER1.
>>-RFS--DELETE--fileid-----------------------------------------><
DELETE deletes an RFS file.
See the RFS command, section RFS.
'RFS DELETE POOL1:\USERS\USER1\TEST1.EXEC'
This example deletes file TEST1.EXEC within directory POOL1:\USERS\USER1.
.-DATA.-. >>-RFS--DISKR--fileid--+-------+------------------------------->< '-stem.-'
DISKR reads records from an RFS file.
See the RFS command, section RFS.
'RFS DISKR POOL1:\USERS\USER1\TEST.DATA DATA.'
This example stores the entire contents of the RFS file POOL1:\USERS\USER1\TEST.DATA in the DATA. REXX compound variable.
DATA.0 is set to the number of records read from the file. DATA.n contains the nth record read from the file.
.-DATA.-. >>-RFS--DISKW--fileid--+-------+------------------------------->< '-stem.-'
DISKW writes records to an RFS file from a stem. The file is overlaid with the data in the stem.
See the RFS command, section RFS.
'RFS DISKW POOL1:\USERS\USER1\TEST.EXEC DATA.'
This example stores the contents of the DATA. REXX compound variable into the RFS file POOL1:\USERS\USER1\TEST.EXEC.
Set DATA.0 to the number of records to be written to the file.
>>-RFS--GETDIR--stem.--+-------+------------------------------->< '-dirid-'
GETDIR returns a list of the contents of the current or specified directory into the specified REXX array.
See the RFS command, section RFS.
'RFS GETDIR DIRDOC. POOL1:\USERS\USER1\DOCS'
This example places the contents of directory DOCS in the DIRDOC. REXX compound variable.
>>-RFS--MKDIR--dirid-------------------------------------------><
MKDIR creates a new RFS directory level.
See the RFS command, section RFS.
'RFS MKDIR POOL1:\USERS\USER1\DOCS'
This example creates a new directory called DOCS in the existing directory POOL1:\USERS\USER1.
Only authorized users can create directories outside of their \USERS\userid directory structure.
>>-RFS--RDIR--dirid--------------------------------------------><
RDIR removes the specified RFS directory.
Refer to the RFS command, section RFS.
'RFS RDIR POOL1:\USERS\USER1\DOCS'
This example deletes a directory called DOCS in the existing directory POOL1:\USERS\USER1.
>>-RFS--RENAME--fileid1--fileid2-------------------------------><
RENAME renames an RFS file to a new name.
See the RFS command, section RFS.
'RFS RENAME POOL1:\USERS\USER1\TEST1.EXEC POOL1:\USERS\USER1\TEST2.EXEC'
This example renames the file POOL1:\USERS\USER1\TEST1.EXEC to POOL1:\USERS\USER1\TEST2.EXEC.