HP 3000 Manuals

Lesson 2 File Names [ Using the 900 Series HP 3000: Fundamental Skills Module 3: Creating Text Files ] MPE/iX 5.0 Documentation


Using the 900 Series HP 3000: Fundamental Skills Module 3: Creating Text Files

Lesson 2 File Names 

Lesson 2 presents the concept of file names.

   *   understanding valid (acceptable) file names

   *   understanding invalid (unacceptable) file names

MPE/iX is very strict about the file names it accepts.

File naming conventions 

A valid (acceptable) file name:

          Table 3-1.  File Names 

-------------------------------------------------------------------------------------------
|                                                                                         |
|               Valid File Name                                 Notes:                    |
|                                                                                         |
-------------------------------------------------------------------------------------------
|                                                                                         |
| Starts with a letter                        A - Z or a - z (uppercase and lowercase are |
|                                             the same to MPE/iX)                         |
|                                                                                         |
-------------------------------------------------------------------------------------------
|                                                                                         |
| Consists of only letters and numbers (      A - Z or a - z or 0 - 9                     |
| alphanumeric characters)                                                                |
|                                                                                         |
-------------------------------------------------------------------------------------------
|                                                                                         |
| Contains no special characters              + or - or * or !  or & or ?  are not        |
|                                             acceptable (/ is allowed, but it causes     |
|                                             trouble.)                                   |
|                                                                                         |
-------------------------------------------------------------------------------------------
|                                                                                         |
| Has no more than eight (alphanumeric)                                                   |
| characters in all                                                                       |
|                                                                                         |
-------------------------------------------------------------------------------------------

All of these are valid (acceptable) file names:

       NOTEREV1

       NOTEREV2

       MYFILE

       LETTER10

What is wrong with saving an editor file as FIRSTFILE?

If you said there are too many characters, you are right.  FIRSTFILE
contains nine characters in all.

If you try to keep a file with an unacceptable name, you see something
like this on the screen:
________________________________________________________________________
|                                                                      |
|                                                                      |
| /KEEP FIRSTFILE                                                      |
|                                                                      |
| +-F-I-L-E---I-N-F-O-R-M-A-T-I-O-N---D-I-S-P-L-A-Y+                   |
| !  ERROR NUMBER: 54    RESIDUE: 0                !                   |
| !  BLOCK NUMBER: 0            NUMREC: 0          !                   |
| +------------------------------------------------+                   |
| *41*FAILURE TO OPEN KEEP FILE   (54)                                 |
| INVALID FILE REFERENCE  (FSERR 54)                                   |
| /                                                                    |
|                                                                      |
________________________________________________________________________

            

The solution is to choose another name -a valid name- for your file.

A troublesome character.   

Although it is possible to put the slash character (/) in a file name,
the slash has a special function in file names.


CAUTION Do not put a slash (/) in a file name. Putting a slash (/) in a file name tells the computer to put a lockword on that file. If you do that accidentally, you might have difficulty getting to the file later. The concept of "locking" files is a separate topic not covered in this course but discussed in the 900 Series HP3000: Advanced Skills course.
Invalid file names Table 3-2. File Naming Errors ------------------------------------------------------------------------------------------ | | | Unacceptable Name What is Wrong A Better Name | | | ------------------------------------------------------------------------------------------ | | | 1STFILE Starts with a number FILE1ST | | | | FIRSTFILE Too many characters FIRSTFIL | | | | FILE_1 The underbar ( _ ) is a special FILE1 | | character | | | | FILE/ Slash (/) puts a lockword on a file FILE1 | | | ------------------------------------------------------------------------------------------ Although you can choose any file naming convention that is valid and suits your purpose (or your group's purpose), some general rules may help: * A file name should suggest its content or purpose in some way that has value for you or your group. * Files that have related contents or purpose should have names that are clearly related in some fashion.


MPE/iX 5.0 Documentation