The FILE Command
The FILE command is used to determine how a file will be accessed. You
may use FILE to describe any of the characteristics available with
HPFOPEN/FOPEN or BUILD, but you cannot actually create a file with the
FILE command. While HPFOPEN/FOPEN and BUILD physically allocates space
for a file and define its characteristics, the FILE command may only
define how a file will be accessed at run time.
To be effective, a FILE command must be issued before your file is
opened; it takes effect when the file is opened. A FILE command remains
in effect until the job or session ends, until it is canceled with a
RESET command, or until it is overridden by another command for the same
file. Thus, if you enter a FILE command equating the formal designator
DATAFL to the actual designator DISCFILE (indicating a disk file) and
then run three programs that reference DATAFL, all three programs will
access the file DISCFILE. If you wish to define other characteristics for
the file, simply issue another FILE command; if you want to nullify the
FILE command completely so that the formal designator has the
characteristics originally specified by the program that is using it,
issue a RESET command.
For example, suppose that you run two programs, both referencing a new
temporary file named DFILE located on disk. Before you un the first
program, you want to redefine the file so that it is output to the
standard list device. To do this, you would issue a FILE command
equating DFILE with the actual designator $STDLIST. In the second
program, the file is again to be a temporary file on disk. You issue a
RESET command so that the specifications supplied by the second program
(rather than those in the FILE command) apply.
JOB JNAME,UNAME.ANAME
:
FILE DFILE=$STDLIST
RUN PROG1
:
RESET DFILE
RUN PROG2
:
A comparison of the parameters for FILE, FOPEN, and HPFOPEN is given in
Table 2-4 . For more information about using the FILE command, refer
to the MPE/iX Commands Reference Manual (32650-90003).
Table 2-4. FILE, FOPEN, and HPFOPEN Parameters
-------------------------------------------------------------------------------------------------
| | | | |
| CHARACTERISTIC | :FILE | FOPEN | HPFOPEN |
| | PARAMETER | PARAMETER | PARAMETER |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| Formal file | formaldesignator | formaldesignator | formaldesignator |
| designator | | | |
| | | | option |
| | | | (itemnum=2) |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| Actual file | filereference | Default file | designator option |
| designator | $NEWPASS | designator foption | (itemnum=5) |
| | $OLDPASS | (Bits 10:3) | |
| | $NULL | | |
| | $STDIN | | |
| | $STDINX | | |
| | $STDLIST | | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| Domain | NEW | Domain foption (Bits | domain option |
| | OLD | 14:2) | (itemnum=3) |
| | OLDTEMP | | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| Logical record size | recsize | recsize | record size option |
| | | | (itemnum=19) |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| Block/buffer size | blockfactor | blockfactor | block factor |
| | | | option |
| | | | (itemnum=40) |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| Record format | F | Record format foption | record format |
| | V | (Bits 8:2) | option |
| | U | | (itemnum=6) |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| ASCII/Binary Code | ASCII | ASCII/Binary foption | ASCII/Binary option |
| | Binary | (Bits 13:1) | (itemnum=53) |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| Carriage-control | CCTL | Carriage-control | carriage-control |
| characters supplied | NOCCTL | foption (Bits 7:1) | option |
| in FWRITE | | | (itemnum=7) |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| Access mode | IN | Access-type aoption | access type option |
| | OUT | (Bits 12:4) | (itemnum=11) |
| | OUTKEEP | | |
| | APPEND | | |
| | INOUT | | |
| | UPDATE | | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| Number of buffers | numbuffers | numbuffers (Bits | numbuffers option |
| | NOBUF | 11:5) | (itemnum=44) |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| Exclusive/Share | EXC | EXCLUSIVE access | exclusive option |
| access | SEMI | aoption (Bits 8:2) | (itemnum=13) |
| | SHR | | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| Multi access | MULTI | Multiaccess mode | multiaccess option |
| | NOMULTI | aoption (Bits 5:2) | (itemnum=14) |
| | GMULTI | | |
| | | | |
-------------------------------------------------------------------------------------------------
Table 2-3. :FILE, FOPEN, and HPFOPEN Parameters (Continued)
-------------------------------------------------------------------------------------------------
| | | | |
| CHARACTERISTIC | :FILE | FOPEN | HPFOPEN |
| | PARAMETER | PARAMETER | PARAMETER |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| Multirecord | MR | Multirecord aoption | multirecord option |
| | NOMR | (Bits 11:1) | (itemnum=15) |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| File disposition | DEL | N/A | final disposition |
| | SAVE | | option |
| | TEMP | | (itemnum=50) |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| Device class name or | device | device | device class option |
| logical device number | | | (itemnum=42) |
| | | | |
| | | | device name option |
| | | | (itemnum=20) |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| Output priority | outputpriority | numbuffers (Bits 0:4) | output priority |
| | | | option |
| | | | (itemnum=27) |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| NOWAIT input/output | NOWAIT | NOWAIT I/O aoption | nowait I/O option |
| | WAIT | (Bits 4:1) | (itemnum=16) |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| Number of copies | numcopies | numbuffers (Bits 4:7) | spooler copies option |
| | | | (itemnum=34) |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| File code | filecode | filecode | filecode option |
| | | | (itemnum=37) |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| File capacity | numrec | filesize | filesize option |
| | | | (itemnum=35) |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| Total number of | numextents | numextents | numextents option |
| extents | | | (itemnum=47) |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| Extents initially | initalloc | initalloc | initial allocation |
| allocated | | | option |
| | | | (itemnum=36) |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| FILE command | N/A | Disallow FILE | disallow file equation|
| prohibition | | equation foption | option |
| | | (Bits 5:1) | (itemnum=9) |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| Dynamic file locking | LOCK | Dynamic locking | disallow file equation|
| | NOLOCK | aoption (Bits 10:1) | dynamic locking |
| | | | option |
| | | | (itemnum=12) |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| Forms-alignment | FORMS | formmsg | spooled message option|
| message | | | (itemnum=28) |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| User labels for disk | N/A | userlabels | user labels option |
| file | | | (itemnum=33) |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| File labels for | LABEL | Labeled tape foption | labeled tape label |
| magnetic tape files | NOLABEL | (Bit 6:1) | option |
| | | | (itemnum=8) |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| File type | STD CIR | file type foption | file type option |
| | MSG RIO | (Bits 2:3) | (itemnum=10) |
| | | | |
-------------------------------------------------------------------------------------------------
Table 2-3. :FILE, FOPEN, and HPFOPEN Parameters (Continued)
-------------------------------------------------------------------------------------------------
| | | | |
| CHARACTERISTIC | :FILE | FOPEN | HPFOPEN |
| | PARAMETER | PARAMETER | PARAMETER |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| Mapped access method | N/A | N/A | short mapped option |
| | | | (itemnum=18) |
| | | | |
| | | | long mapped option |
| | | | (itemnum=21) |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| Restrict file access | N/A | N/A | privileged access |
| according to | | | option |
| execution level | | | (itemnum=29) |
| | | | |
| | | | file privilege |
| | | | option |
| | | | (itemnum=38) |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| Determine optimum | N/A | N/A | will access option |
| pre-fetch algorithm | | | (itemnum=39) |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| Fast file open | N/A | N/A | UFID option |
| | | | (itemnum=43) |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| Fill character for | N/A | N/A | fill character option |
| record padding | | | (itemnum=45) |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| Formal file | N/A | N/A | Pascal/iX string |
| designator Pascal/iX | | | option |
| string type | | | (itemnum=51) |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| File equation string | N/A | N/A | file equation string |
| for file open | | | option |
| | | | (itemnum=52) |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| KSAM key file record | N/A | KSAM param | KSAM parm option |
| | | | (itemnum=54) |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| User object class | N/A | N/A | object class option |
| number | | | (itemnum=56) |
| | | | |
-------------------------------------------------------------------------------------------------