HPlogo Using HP 3000 MPE/iX: Fundamental Skills Tutorial: HP 3000 MPE/iX Computer Systems > Chapter 4 Creating Text Files

Lesson 2 File Names

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Glossary

 » Index

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 4-1 File Names

Valid File NameNotes:
Starts with a letterA - Z or a - z (uppercase and lowercase are the same to MPE/iX)
Consists of only letters and numbers ( alphanumeric characters) A - Z or a - z or 0 - 9
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 4-2 File Naming Errors

Unacceptable NameWhat is WrongA Better Name
1STFILEStarts with a numberFILE1ST
FIRSTFILEToo many charactersFIRSTFIL
FILE_1The underbar ( _ ) is a special characterFILE1
FILE/ Slash (/) puts a lockword on a fileFILE1

 

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.

Lesson 2 Exercise

  1. Which of the following names are unacceptable file names on the MPE/iX system and why?

    1. MYFILE

    2. yourfile2

    3. 1BIGMEMO

    4. a

    5. FRED**8

    6. The_Quick_Brown_Fox

    7. filenum4

Feedback to webmaster