Lesson 2 presents the concept of 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 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 ( 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.
Although it is possible to put the slash character (/) in a file name, the slash has a special function in file names.
Invalid file names |
 |
Table 4-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 character | FILE1 |
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.