Using HP 3000 MPE/iX:\Advanced Skills Tutorial: HP 3000 MPE/iX Computer Systems > Chapter 3 Module 2: File ManagementLesson 1 Introducing Files |
|
Lesson 1 presents the following information:
The MPE/iX file system controls the processing of all files, including their storage and transfer between various devices. Most of your work on the system involves files; therefore, you must know about the different kinds of files available for your use, as well as those used by the system. In general, the term "file" is used in MPE/iX in three ways:
Permanent files are sometimes referred to as "user files" since they are created directly by you, the user. You are probably already familiar with the file naming requirements, saving and purging commands, and basic LISTFILE commands to list your permanent files; however, as you continue to create and use more permanent files in MPE/iX, you need to know more about this kind of file, its characteristics, and how to get information about permanent files. Besides being able to provide you with sorted listings of permanent files within groups in your account, the LISTFILE command has a number option that can provide you with detailed information about any or all of your permanent files. The general form of the LISTFILE command is:
Here, # represents an integer. Often, the LISTFILE printout can be quite long. You can press BREAK to return to a system prompt. Depending upon the syntax you use, the LISTFILE, # command gives you specific information:
Make sure that you are currently logged on to the CLASS group. Try entering this command from your keyboard:
What you should see is an alphabetical listing of files in your CLASS group with their logical record size information. How would you go about listing the same information only for MYFILE1? If you're in the CLASS group you only need enter the file name after the LISTFILE command.
Your display should look like this:
The display shows that the SIZE of MYFILE1 is 72 bytes. It also notes that MYFILE1 is a fixed-length ASCII file (TYP) and currently holds 18 records. (EOF means the end of the file.) Can you get logical record information for the file, JOB1? Try that now. Which record size is larger, JOB1 or MYFILE1? (Compare the sizes.) Record size information is helpful when you want to join files together or use a word processing application to make changes to a file. If the application cannot accept the file, you see the message:
Suppose that you want to see how much space your files are occupying on the disk. Try the LISTFILE command with option 2 for files MYFILE1 and JOB1.
Space information, expressed in terms of sectors, is provided in addition to the information from option 1. How would you modify this command so that you get information for all files in the PUB group of your account? Use wildcard options in the command.
Enter this command from your keyboard now. There is only one file in the PUB group. The LISTFILE,2 command option clearly can help you track the amount of permanent space used by your files.
LISTFILE,3 provides information on each file's structure, access codes, creation, and modification dates. For example, how would you find out when MYJOB2 was last modified?
Enter that now and review the information displayed on your screen. When was MYJOB2 created? Last modified?
The purpose of the LISTFILE,4 option is to provide you with complete access information by account, group, and file, for each file in your current group. By entering LISTFILE,4 you see a display of information for all files in your current group.
The LISTFILE,5 command option normally shows exactly the same information displayed by LISTFILE,3. But if any of the files specified are KSAM or spool files, it displays information specific to those specialized files. Since no KSAM or spool files have been created in this lesson, LISTFILE,5 duplicates the LISTFILE,3 information.
This is an easy one. The LISTFILE,6 command option provides you with an alphabetical listing of fully qualified file names. This command can be very helpful if you have a large account with many groups, and need to quickly find the group location of a particular file. Enter the LISTFILE command with option 6 to get a listing of all files in your account. Did you remember to include the wildcard option? If not, enter
The LISTFILE,7 command option displays file information exactly the way that LISTFILE,6 does, But if any of the files specified are KSAM or spool files, LISTFILE,7 displays information specific to those specialized files. Since no KSAM or spool files have been created in this lesson, LISTFILE,7 duplicates the LISTFILE,6 information.
The LISTFILE,-1 command provides you with hex information on your file(s). If you are a programmer or system manager, you may want to explore the displays of this LISTFILE option. Remember that the help facility describes the command parameters of the LISTFILE command.
The LISTFILE,-2 command provides you with security information on specific files. It shows all of the access control definitions that are in effect for a particular file. You can use LISTFILE,-2 to see the access control definitions for the files you that have created. An account manager (AM) can use it to see the access control definitions for the files in the account she or he manages. A system manager (SM) can use LISTFILE,-2 to see the access control definitions for the entire computer system. In order to see the access control definitions for a file that someone else created, you must have RACD (Read and Copy ACD) permission for the that file you wish to examine; or you must have SM capability; or you must be the account manager (AM) of the account in which the file is found. In contrast to permanent files, a temporary file is one that resides in the job or session temporarily, and exists no longer than the job or session that created it. Temporary files can be explicitly created by you, the user, or implicitly created by the system. User-defined temporary files are created with the TEMP option of the BUILD command. The BUILD command is discussed in lesson 2 of this module. System-defined temporary files are also referred to as "system files." These files are automatically created and named by the system. Two such files are $STDIN and $STDLIST. When you log on, your system automatically defines a file called $STDIN that corresponds to your input device, which is your keyboard. It also defines a file called $STDLIST to which the system sends output. $STDLIST refers to your terminal screen. System files are also automatically created during compiling and linking. These temporary files are used by the system to hold data generated during processing. For example, the different steps in compiling and linking a program create several $NEWPASS (output) files. $NEWPASS files automatically change to $OLDPASS (input) files when the files close at the completion of the process. Lesson 3 discusses temporary files.
You can also create a temporary file to hold the output from a LISTFILE command. Enter the following command at your keyboard:
The > instructs MPE/iX to create a temporary file and enter the output from the command into that temporary file. FILELIST contains the file listing generated by LISTFILE,6. The > redirection of output works with any of the LISTFILE options and with almost every other MPE/iX command. To view this temporary file, enter:
PRINT displays the first 23 lines of the file and pauses. It shows the number of the next line to be displayed and the number of the last line in the file, and it asks if you want to continue with the display. You see something like this on the bottom line of your screen:
The next line to be shown is 24. The last line that can be displayed is 37. Press RETURN each time you want to see another 23 lines of the file. If instead you want to see a particular line, enter that line number and press Return:
In this example, PRINT would display line 31 and the next 22 lines following it. If you do not want to see more of the file, enter N (for No) and press Return. How do you list temporary files? Use LISTFILE;TEMP. Enter that now and see if there are any temporary files in your account.
Unless you have been doing some programming or creating additional temporary files, you should only see the FILELIST that you just created.
Purging temporary files is done with the PURGE command as follows:
Enter this command now to purge FILELIST.
Formal files differ from permanent and temporary files in that they do not exist on tape or on disk; however, they follow the same file naming conventions as permanent files. A formal file is an alternate label, or alias. It is a name used by a program or in a file equation and it refers to another actual file or device. This name is referred to as a file designator. A common example of a formal file that you might use one day is the EDTLIST file in the following equation:
The EDTLIST file is now the designated file alias for the line printer (LP). Because this formal file refers to a device, it is often referred to as a "device" file. Since formal files are not stored on disk, they cannot be listed with the LISTFILE command; however, file equations using formal file designators can be listed with the LISTEQ command. Enter the example of a file equation presented earlier:
Now enter LISTEQ to list the formal files on your system.
You should see the following:
On some systems, you might also see additional file equations:
Each of the file designators listed, MAILPRNT and SLLIST, refers to a device. Lesson 4 provides more information regarding these file designators.
********** End of Exercise 2-1 *********** |