Current directory and path – IBM SC34-5764-01 User Manual

Page 280

Advertising
background image

Example:

POOL1:

File Pool

\

Root Directory

TEST1.EXEC

File

USERS\

Subdirectory

USER1\

Subdirectory

TEST2.EXEC

File

DOCS\

Subdirectory

TEST3.DOCUMENT

File

USER2\

Subdirectory

LETTER.DOCUMENT

File

PROJECT1\

Subdirectory

PROD1.EXEC

File

DATA\

Subdirectory

PROD1.DATA

File

WORK:\

File Pool and Root Directory

TEST1.DATA

File

CHARTS\

Subdirectory

CHART1.DATA

File

CHART2.DATA

File

This example shows two file pools (POOL1 and WORK). File pool POOL1 contains a file (TEST1.EXEC)
and two subdirectories (USERS and PROJECT1). Inside the USERS subdirectory are two subdirectories
(USER1 and USER2) that correspond to user IDs (USER1 and USER2). User USER1 has a file
(TEST2.EXEC) and a subdirectory (DOCS) inside its directory. Inside the DOCS subdirectory there is
another file (TEST3.DOCUMENT). User USER2 has a file (LETTER.DOCUMENT) inside its directory. File
pool WORK contains a file (TEST1.DATA) and a subdirectory (CHARTS). Inside subdirectory CHARTS are
two files (CHART1.DATA and CHART2.DATA).

Current Directory and Path

The current directory is the current working directory, and is first in the search order when working with
REXX File System (RFS). The current directory can be set using the CD command, see section “CD” on
page 321.
The CD command has a similar format to the IBM Personal Computer OS/2 and IBM Personal
Computer DOS CD commands. The syntax is CD followed by the partially or fully qualified directory name.
To change from a subdirectory back to the parent directory, type CD ... To change to another subdirectory,
CD can be followed by the subdirectory name.

In the following example, the first command sets the current directory to POOL1:\USERS\USER1 and the
second command sets the current directory to POOL1:\USERS\USER1\DOCS. The third command
changes the current directory back to POOL1:\USERS\USER1.

Example:

'CD POOL1:\USERS\USER1'
'CD DOCS'
'CD ..'

The PATH command is used to define the search order for REXX execs, after the current directory is
searched. See the PATH command, section “PATH” on page 361, for more information. The syntax is:
PATH, followed by a list, separated by spaces, of fully qualified directory names.

The following example first sets a current directory, then defines the search order.

Example:

'CD POOL1:\USERS\USER1\EXECS'
'PATH POOL1:\ POOL1:\USERS\USER1'
'EXEC TEST2.EXEC'

File System

258

CICS TS for VSE/ESA: REXX Guide

Advertising