>>-CD--+-------+----------------------------------------------->< '-dirid-'
CD changes the RFS file system directory.
If dirid is not specified, the current working directory is retrieved and placed in the REXX special variable RESULT, instead of changing the current working directory.
A full directory ID is in the form: poolid:\dirid1\...\diridn
When a full directory ID is specified, it completely replaces the previous directory setting.
A partial directory ID does not begin with a poolid. In this case, the partial directory ID is appended to the end of the existing directory ID. If the partial directory ID begins with two periods, this indicates that one directory level is removed (from the right), before the new partial directory ID is appended to the end. In this case, a backslash is required before the directory ID.
For example: If the current directory is POOL1:\USERS\USER1\ABC and you enter CD ..\XYZ the new current directory will be POOL1:\USERS\USER1\XYZ.
The default directory ID for you is poolid:\USERS\userid\, where poolid: is the file pool identifier of the first RFS file pool defined and userid is your CICS signon user ID. If you are not signed onto CICS, userid defaults to the value in CICS DFLTUSER.
'CD \USERS\USER2\XYZ'
This example changes your current working directory to \USERS\USER2\XYZ in the file pool you are currently using regardless of the previous directory setting.
If your current directory is \USERS\USER2 and you enter:
'CD XYZ'
then your current directory is changed to \USERS\USER2\XYZ.
The CD command works in conjunction with the PATH command identifying the search order for the execution of REXX execs. The current directory (specified by the CD command) is always searched first for execs.