UNET

Using CMS: Working with Files

Contents
Working with Files
Creating and Editing Files Using XEDIT
File Transfer and Printing to a Microcomputer Printer
The SPOOL Command, More on Printing, Spool Files
Using Tapes

Using CMS: Contents Next Chapter Previous Chapter


 

Working with Files

Your CMS account is allocated a certain amount of disk space for your private use. No one can see what you have stored there except yourself and the mainframe system managers at UNET, unless you tell someone your id and password or deliberately set up file sharing.

Mainframe files are named according to the following rules: there are three parts to the name of each file - the "filename" which is eight characters or less, the "filetype" which is eight characters or less, and the directory name where the file is stored. CMS uses blanks to separate each part of the name from the next. For example, a file in the top level directory (which does not have a name, but can be referred to by a period), could be called:

     NEW LOG 
If that file were in the "MYDIR" directory, it would be called:
     NEW LOG .MYDIR
Note the period in front of the "MYDIR." The period tells CMS that the MYDIR is a directory in the top level of your disk space.

Older CMS accounts have the old "minidisk" file system where directories are not allowed. In that system, the third part of the file name is a disk letter - A for your private files. Newer accounts can ignore the entire directory scheme, and just use the old-style disk letters if they wish. This means that the files at the top level of your personal disk space (that is, files that aren't in directories you've created) can also be named using A as the third part of the name:

     NEW LOG A
Many CMS commands require this "disk letter" naming scheme while others use the directory name format.

In addition to your personal disk space, you have access to shared disks that contain parts of the CP and CMS operating systems, programs, tools, etc. You can also share other people's personal disks or parts of their disks if they have set up sharing. The system disks you share are identified by disk letters: "S", "Y", etc.

For information on what disks you have available - personal and shared - use the CMS command:

     QUERY DISK
Your results will look something like this:
Q DISK screen
In this screenshot note the column labeled "M." Here you find the disk letter your account is using for each of these disks (there is one line for each disk accessed by your account). Your "A" disk is the top one listed and notice that the information shown here is different than the info for the other disks. This is because the A disk is in the new format (where directories are permitted), while all the other disks listed here are "old-style."

In the above screenshot, each old-style disk reported how much space is currently used and how much is free. If you want that information about your personal "new-style" disk, use the command:

     QUERY LIMITS *
and you will see a report that looks like:
Q LIMITS
Note the "blocks committed" item in this report, which tells you the percentage of your personal space that is currently used by files and directories.

For information on what files and directories you have in your personal disk space, use the FILELIST command or in Shell, select "Working with Files" and in there, "Filelist of personal files." The list of files will look something like this:
filelist screen
Note that in this listing files are named using the "disk letter" format (each file identifier has "A" as its third part), but directories are indicated with a "DIR" label. Each item, files and directories, is dated, and for the files, format and size information is also given. As in the "QUERY LIMITS" report, sizes are always given in "block" units. If you want the size in bytes, multiply the number of blocks in a file by the number of bytes in a block (see the QUERY LIMITS report for your block size).

At the bottom of the filelist screen are the F key assignments. As usual, you use F1 to get HELP (in this case, help with the FILELIST command), F3 quits you from the FILELIST command and returns you to Shell or whereever you were when you invoked FILELIST, F8 and F7 are used to navigate lists that are longer than one screen. F5 and F6 are used to reorder the list by certain criteria. F2 redraws the screen if you have made changes such as erasing or renaming a file, and F11 is used to view the contents of a file or a directory. You use the F11 key by moving your cursor onto the file or directory in the list that you want to see, and then pressing F11. You can move your cursor with TAB, the arrows or by clicking your mouse.

For example, if I want to see the contents of my ".VMWEBSERVER" directory, I hit TAB or the down arrow until my cursor is blinking on the "VMWEBSERVER" line, and I press F11. The screen changes to show me a filelist of that directory:
subdirectory filelist
There are files in this directory but no subdirectories. If I want to view or edit the contents of one of these files, I hop my cursor to the line containing the file's name and press F11. This invokes XEDIT, the CMS editor (see next section to learn about XEDIT):
editing a file

I can quit from XEDIT (if I have not changed the file) by pressing F3. This returns me to the filelist for the VMWEBSERVER directory. I quit that filelist by pressing F3 again, which returns me to the top level filelist. A final F3 quits me from filelist entirely and I am back in Shell.

You will need certain basic tools to work with files in addition to XEDIT, which is used to create, view and change files. You need to know how to rename and erase files, how to create and delete directories, how to move a file from one directory to another, how to copy files from one disk to another (using the disk letters). In addition, you need to know how to transfer files from your desktop computer to the mainframe - a topic dealt with in a section below.

Rename, erase and copy can all be performed from within the FILELIST screen. Hop your cursor next to the file you want to operate on. Your cursor should be in the left column (labeled "Cmd"). To erase the file, simply type

     ERASE
in that column and press ENTER or Return. The file is erased (be careful!).

To rename a file, hop your cursor to its line and type (in the "cmd" area)

     RENAME / newname newtype =
and press ENTER or Return, where "newname newtype" is the new name you want the file to have. Note that the "=" means "keep the same disk letter or directory (because RENAME cannot be used to move a file from one disk to another or one directory to another).

To move a file from one directory to another use the command:

     RELOCATE fn ft dir1 TO dir2
where "fn ft" is the two part name of the file, "dir1" is the current directory location of the file (use a simple period for dir1 if the file is at the top level) and "dir2" is the target directory. For example, we could write:
     RELOCATE INDEX HTML . TO .VMWEBSERVER
to move the file called "INDEX HTML" from the top level to the VMWEBSERVER directory.

To copy a file from one disk to another we use the COPYFILE command (COPY for short). This command uses the old-style diskletter naming convention to refer to files and doesn't "understand" directory names. For example, to copy a file called "SOFTWARE MEMO" from the Y disk to your personal disk, use the command:

     COPY SOFTWARE MEMO Y SOFTWARE MEMO A

To create a directory at the top level of your personal disk space, use the command:

     CREATE DIR .dirname
and press ENTER or return. This creates a new directory called "dirname" at the top level. Then if you want to have a new directory inside "dirname" (a subdirectory), you can use:
     CREATE DIR .dirname.newone
This creates directory "newone" as a subdirectory inside of "dirname." And so on. You can erase a directory using the same ERASE command in FILELIST as you use for erasing files (but make sure the directory is empty first).

For much more information on working with files and directories, including sharing files and directories with other mainframe users, use command:

     HELP SFS

Chapter Top


 

Creating and Editing Files Using XEDIT

See the "Quick Guide to XEDIT."

Chapter Top


 

File Transfer and Printing to a Microcomputer Printer

File transfer means sending a copy of a disk file across some kind of connection from one computer to another. How this is done depends on how the two computers are connected and what program are running on them.

Prior to widespread use of the Internet to connect computers, UNET users most often used Kermit file transfer to copy files between their desktop systems and CMS. We will not discuss Kermit here - contact the UNET user services personnel for information on this protocol. Instead we will discuss transfer using Internet connections.

People can communicate over the Internet using electronic mail and sometimes they send files along with their letters as "attachments." This is not a suitable method if all you want to do is just transfer a file. For information on attachments and e-mail see the e-mail documentation on the UNET Web site.

The time-honored method of Internet file transfer is called FTP. As a user, you would be sitting at the keyboard of your Windows machine or your Mac, and you would run some FTP "client" program to perform the file transfer. Assuming your machine was already connected to the Internet, you would tell your FTP client to connect to your target computer - the remote computer whose disks you want to access. Once connected, you either "put" (that is, send) or "get" (that is, receive) copies of files. The remote computer has to "understand" what you are trying to do - it will "understand" if it is running a FTP "server" program. The mainframe always runs such a server.

For more information on file transfer between a microcomputer and the mainframe, see File Transfer Between a Mac or Windows PC and CMS via TCP/IP and Using FTP.

A related issue is printing. You can always use the CMS command PRINT to print a mainframe file, but the printer used is not your personal printer, but a machine in the UNET offices or some administrative office somewhere on a campus. Generally, people want to print their files on the printer in their home or office. If you use our distributed products, Host Explorer and TN3270, it is very easy to print mainframe files (and e-mail) locally.

Chapter Top


 

The SPOOL Command, More on Printing, Spool Files

Under construction. The SPOOL command is used to set parameters for files in transit, such as print files or files sent to another user via the SENDFILE command. The parameters include routing a print file to a specific printer (this applies only to printers recognized by the mainframe - which generally excludes printers connected to microcomputers), setting a form code that specifies a kind of paper for the printer, such as 3 ply or pay checks, etc.

For more information on this command, see HELP CP SPOOL in CMS.

Chapter Top


 

Using Tapes

Please refer to the separate document Tape User's Guide. Tapes are an alternative storage medium for files. Tapes are relatively inexpensive and portable. UNET can handle 9-track tapes in densities 1600 and 6250 BPI, and cartridge tapes.

Using CMS: Contents Chapter Top Next Chapter Previous Chapter


Topic Index Frequently Asked Questions Document List Return to User Services Home


University of Maine System Network for Education and Technology Services, Copyright © 1999, revision date 2/18/99.