HP 3000 Manuals

Ch 2. Getting File Information [ Getting System Information Programmer's Guide ] MPE/iX 5.0 Documentation


Getting System Information Programmer's Guide

Chapter 2  Getting File Information 

MPE/iX provides a number of commands and intrinsics that enable you to
obtain information about files on the system.  Types of information
available include

   *   File characteristics.  The physical and operational features of
       your file.  File characteristics are defined by FOPEN parameters,
       FILE commands, file label contents, and file system defaults.

   *   Current file status.  Information such as the placement of the
       end-of-file (EOF) indicator, the location of the record pointer,
       and the logical and physical record transfer count.

   *   Error information.  Description of the last error associated with
       a file or the last FOPEN error.

A number of commands and intrinsics return the same type of information.
Which one you use in a certain situation is determined by the context and
by the purpose for which you need the information. 

          Table 2-1.  Commands and Intrinsics Used to Obtain File Information 

---------------------------------------------------------------------------------------------
|                                                    |                                      |
|                  To obtain this:                   |              Use this:               |
|                                                    |                                      |
---------------------------------------------------------------------------------------------
|                                                    |                                      |
| File information                                   | LISTFILE command or FINFO            |
|                                                    |                                      |
---------------------------------------------------------------------------------------------
|                                                    |                                      |
| Temporary file information                         | LISTFILE command or FINFO            |
|                                                    |                                      |
---------------------------------------------------------------------------------------------
|                                                    |                                      |
| File equations for your job/session                | LISTEQ command                       |
|                                                    |                                      |
---------------------------------------------------------------------------------------------
|                                                    |                                      |
| A file opened by the calling process               | FFILEINFO intrinsic                  |
|                                                    | or FINFO                             |
|                                                    |                                      |
---------------------------------------------------------------------------------------------
|                                                    |                                      |
| Disk file label information                        | FLABELINFO intrinsic or FINFO        |
|                                                    |                                      |
---------------------------------------------------------------------------------------------
|                                                    |                                      |
| User label information (opened file)               | FREADLABEL intrinsic                 |
|                                                    |                                      |
---------------------------------------------------------------------------------------------
|                                                    |                                      |
| Security information about files                   | LISTFILE command or                  |
|                                                    | HPACDINFO intrinsic                  |
|                                                    |                                      |
---------------------------------------------------------------------------------------------
|                                                    |                                      |
| Interactive and/or duplicative files               | FRELATE intrinsic or                 |
|                                                    | HPDUPLICATIVE variable,              |
|                                                    | HPINTERACTIVE variable               |
|                                                    |                                      |
---------------------------------------------------------------------------------------------
|                                                    |                                      |
| Error number of most recent file system error      | FCHECK utility or HPFSERR variable   |
| (does not apply to HPFOPEN or other HPXXX          |                                      |
| intrinsics since they have a STATUS parameter)     |                                      |
|                                                    |                                      |
---------------------------------------------------------------------------------------------
|                                                    |                                      |
| File system error message based on FCHECK number   | FERRMSG intrinsic                    |
|                                                    |                                      |
---------------------------------------------------------------------------------------------
|                                                    |                                      |
| File information error display                     | PRINTFILEINFO intrinsic              |
|                                                    |                                      |
---------------------------------------------------------------------------------------------



MPE/iX 5.0 Documentation