Creating a Directory

Now that we have seen how to access and list the structure of existing directories, let us create a new directory. To create a directory of your own, use the CREATE DIRECTORY command. A sample format of the command follows:
Read syntax diagramSkip visual syntax diagram create directory dirid

Remember, you will always have a top directory whose name is the same as your user ID, followed by a period. Any new directories you create will be subdirectories of your top directory. You cannot change the name of your top directory, and you cannot create new directories that are the same level as your top directory.

For example, to create the directories shown in Figure 1, Tony would have used the following series of commands:
create directory .patti
create directory .tonyjr
create directory .courtney
create directory .nick
In these commands, the period specifies Tony's top directory. Therefore, the first command actually tells SFS to create a directory below Tony's top directory, with the name PATTI. The subsequent commands set up the .TONYJR, .COURTNEY, and .NICK directories.
To create a directory of your own, enter the following command:
create directory .party
This command will create a directory called .PARTY below your top directory. By default, your directory will have the FILECONTROL attribute. To create a directory with the directory control attribute, you must specify the DIRCONTROL option of the CREATE DIRECTORY command.

Figure 1 represents your directory structure after entering the CREATE DIRECTORY command.

Figure 1. The .PARTY Directory
This figure shows the VMSYSU:yourid.PARTY directory is a subdirectory of the VMSYSU:yourid directory.
To create another directory called .PARTY.TREATS below the .PARTY directory, enter:
create directory .party.treats
Figure 2 represents your directory structure.
Figure 2. The .PARTY.TREATS Directory
This figure is described in the surrounding text.

The .PARTY directory is a subdirectory of your top directory; the .PARTY.TREATS directory is a subdirectory of the .PARTY directory.

To see a list of all of your directories, use the DIRLIST command with the name of your top directory or the file mode of your top directory.
Figure 3. Using DIRLIST to List All Directories
yourid   DIRLIST  A0  V 319   l=1 Alt=0
Cmd   Fm Directory Name
 _    A  VMSYSU:yourid.
      -  VMSYSU:yourid.PARTY
      -  VMSYSU:yourid.PARTY.TREATS
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1= Help       2= Refresh  3= Quit   4= Sort(fm)    5= Sort(dir)   6= Auth
7= Backward   8= Forward  9=       10=            11= Filelist   12= Cursor
 
====>
                                                            X E D I T  1 File

The .PARTY and .PARTY.TREATS directories, and any other directories you create, will remain in your hierarchy until you explicitly erase them using the ERASE command. For more information on erasing directories, see z/VM: CMS Commands and Utilities Reference.