HP 3000 Manuals

Lesson 1 Displaying Qualified File Names [ Using the 900 Series HP 3000: Fundamental Skills Module 5: Working with Files ] MPE/iX 5.0 Documentation


Using the 900 Series HP 3000: Fundamental Skills Module 5: Working with Files

Lesson 1 Displaying Qualified File Names 

Lesson 1 presents displaying file names.

   *   accessing files from other groups

   *   displaying file names on the screen:  LISTFILE

   *   using wildcard characters to display qualified file names to the
       screen


NOTE Many of the lessons in this module refer to files that were created in module 3 of this tutorial.
Accessing files in other groups and accounts A time may come when you need to use a file that resides in another group or account. * In order to use a file from another group, you must use the file name plus the name of the group in which the file is found. * To use a file in another account, you must use the file name plus the group name plus the account name. Partly qualified name This technique of adding a group name creates a partly qualified file name (DOCUMENT.MYGROUP). Fully qualified name A fully qualified file name is the file name, plus a group name, plus an account name. This information instructs the system to look for the file in the designated group and account. (DOCUMENT.MYGROUP.ANYACCT). Forming a fully qualified file name You need to know: * the file name (ACCTSREC) * the name of the group where the file is found (MYGROUP) * the name of the account where the file is found (ANYACCT) The fully qualified name of the file above is ACCTSREC.MYGROUP.ANYACCT The punctuation is important.
NOTE Did you note the period or dot ( . ) between each part of the name? Each part of a qualified file name must be separated from another part with a period.
You can enter the file name in uppercase or lowercase letters or in a combination of uppercase and lowercase letters. When to use the fully qualified file name How much of the fully qualified file name you need to use depends upon where the file is found and how you logged on. Table 5-1. Qualified File Names ----------------------------------------------------------------- | | | You need If | | | ----------------------------------------------------------------- | | | Simple file name alone You are logged on to the | | group in which the file | | is found. | | | | filename.groupname You are logged on to the | | same account but in a | | different group from the | | one in which the file is | | found. | | | | filename.groupname. accountname You are logged on to a | | different account from | | the one in which the | | file is found. | | | | When you specify a file | | in a different account, | | you must specify the | | fully qualified file | | name. | | | ----------------------------------------------------------------- File name and logon--the differences Logon identifiers and fully qualified file names are very similar in appearance, and the similarity can be confusing. In fact, something like ROTOR.CAD could be either of these: * a file name and a group name * a user name and an account name The only way of telling which it is, is to examine the way it is used. What command precedes it? If the command is HELLO, you know that you are looking at a logon identifier; that is, a user name and an account name. If a text or file-handling command precedes it (COPY, PURGE, RELEASE, SECURE, which you learn about later in this module), you know that you are looking at a file name and a group name. Fully qualified name. If you see ROTOR.CAD.MANUF, you would know immediately that you are looking at a fully qualified file name. How would you know? * The only valid delimiter (punctuation) in a file name is the period, or dot ( . ). * A logon identifier having more than two elements must contain at least one comma delimiter. The patterns. Examine the two patterns together (the extra spaces are for clarity only). LOGON: session , user . account , group FILE NAME: file . group . account Recall that a session name and a group name are optional in a logon identifier. Those optional elements are always set off from the user name and account name by a comma ( , ). So.... JJ,ROTOR.CAD--is a session name tied to a logon identifier. ROTOR.CAD,DESIGN--is a logon identifier tied to a group name. JJ,ROTOR.CAD,DESIGN--is a session name tied to a logon identifier tied to a group name. JJ,ROTOR.CAD.DESIGN--cannot exist. JJ.ROTOR.CAD,DESIGN--cannot exist either. JJ.ROTOR.DESIGN--can only be a file name. JJ.DESIGN--cannot be determined out of context. Displaying all of the file names in your group Do you recall what command shows you all of the files in your current group? Log on to your PUB group. Enter: LISTFILEReturn Do the file names in the PUB group appear on the screen? They should. If you work in more than one group, it may become difficult to keep track of all of your files. Fortunately, LISTFILE can be selective about the file names that it displays. It can also display file names outside your current group. Displaying selected file names in your group Log on to your home group. Your logon group should be MYGROUP (or its equivalent if you do not have MYGROUP). Using your username and accountname, enter: HELLO username.accountnameReturn MPE/iX allows you to display file names that are alike in some way. This is useful if you have established a naming convention for files that contain related information. To display all of the file names that begin with D, do this: LISTFILE D@Return You will see the names of all of the files in your home group that begin with the letter "D." The @ symbol. The @ Symbol (Shift2 on your keyboard) is the symbol for all combinations of letters. The symbol @ is called a wildcard character. In some card games, a "wild card" can take on any legitimate value that the player wants. In MPE/iX, @ can represent anywhere from zero to eight characters and take on all of the possible letter and number values (A - Z and 0 - 9). D@ means, literally, all of the files that begin with the letter "D" followed by any other combination of zero to seven characters. What do you suppose this will show? LISTFILE @2@ Try it. It shows all of the file names that contain the number 2, if there are any. * The first @ tells the computer to search for any file that begins with any combination of letters. * The last @ tells it to search for any file that ends with any combination of letters. * But the 2 in the middle restricts the search to file names that have the number 2 in them. Display file names in other groups and accounts You can use the @ symbol to have LISTFILE display the file names found in other groups and accounts. To see all of the file names in PUB group, enter: LISTFILE @.PUBReturn The names of the files in PUB should appear on the screen. To see the names of files in OTHERGRP that begin with R, do this: LISTFILE R@.OTHERGRPReturn Now enter this: LISTFILE @.@Return You should see all of the file names in all of the groups in your account. If there are many files, the names will scroll by quickly. Use STOP or CTRLS to stop the scroll. Use another STOP or CTRLQ to resume the scroll. Or, use PREV to jump backwards, one screen at a time. Use NEXT to return to your starting position.
NOTE For the next example, be ready to use BREAK.
What happens if you enter this? LISTFILE @.@.@Return You should see all the file names in all the groups in all the accounts on your MPE/iX system--and that could be many files. To stop the display, press the BREAK key. To restrict the search to some account, such as SYS, you could specify: LISTFILE @S.PUB.SYS You would see all of the file names ending in the letter "S" that are found in the PUB group of the SYS account. This is a fully qualified file name, but the wildcard character @ is used to specify a set of the files in the PUB group of SYS. What would you see if you entered this? LISTFILE K@.@.SYS You would see all of the files that begin with the letter K in all of the groups of the SYS account. Be ready to use BREAK. Try this: LISTFILE D@.MYGROUP.@Break You should see a listing of all of the files beginning with the letter "D" in any group called MYGROUP anywhere on your system. Finding files Are you having difficulty recalling exactly which group contains the file you are looking for? There is a solution, and it involves another way of using the LISTFILE command. Recall that @ means all file names. Recall, too, that @.@ means all of the files in all of the groups of the account to which you are logged on. Now do this: LISTFILE @.@,6Return What happened? Did you get a list of file names, perhaps quite a few file names, that are in the account to which you are logged on? All of the names are in their fully qualified form. Now that you have the fully qualified file name, you can see at a glance not only the name of the file, but the group and account in which the file is found. To find the location of one particular file, try this: LISTFILE filename.@,6Return The ,6 tells LISTFILE to list the fully qualified file name that identifies (and locates) the file called FILENAME. The LISTFILE command has other features, not covered here. If you are interested in finding out what those features are, refer to the help facility.


MPE/iX 5.0 Documentation