General File Information [ Getting System Information Programmer's Guide ] MPE/iX 5.0 Documentation
Getting System Information Programmer's Guide
General File Information
Several commands and intrinsics are available to obtain file information
for a variety of purposes. For example, you may have signed onto an
account or group that you do not use often; you may not be certain
whether a file that you were editing was saved after a system failure;
you may have just loaded a store tape into your account and group and
need to identify all the files that were loaded. The kinds of questions
that you may want to answer include
* Does a file by this name exist in my account or group?
* How large is this file?
* What is the type of this file?
* When and by whom was this file created?
* What security provisions exist for this file?
* What are the contents of this file's label?
You can obtain this information interactively, or you can use commands
and intrinsics to obtain the information and utilize it within an
executing program. The command best suited for getting this information
is LISTFILE. Although you can use LISTF, it is not as powerful as
LISTFILE and is provided only for backwards compatibility.
Obtaining file descriptions using LISTFILE
The LISTFILE command is an important and versatile command in MPE/iX.
Primarily, you use it to list descriptions of files at the level of
detail that you select. You can display the file information on your
terminal ($STDLIST, which is the default) or write it to a file using I/O
redirection:
:LISTFILE > FILELIST
By default, FILELIST is created as a temporary file.
You can obtain the following file information using LISTFILE:
* file name
* file code
* record size
* record format
* blocking factor
* number of sectors in use
* number of extents allocated
* maximum number of extents allowed (for compatibility mode files
only)
* hexadecimal listing of file label
* file creator
* label address
* lockword (if any)
* security matrix for the file (including ACDs, if any)
* Date/time last accessed, modified, and created
Refer to the MPE/iX Commands Reference Manual, Volumes 1 and 2
(32650-90003 and 32650-90364) for a complete description of the LISTFILE
command.
LISTFILE examples
Interactive use of LISTFILE is fairly simple. Entered with no
parameters, the command shows all files in your logon group and account.
You can specify a file name (full or partial) using "wildcard" characters
where desired. You use the format option with either a number or a name
to indicate the level of information to display for the files.
For example, either of the following commands displays the same file
information:
:LISTFILE OVERFLOW.PUB.TELESUP;FORMAT=DETAIL
or
:LISTFILE OVERFLOW.PUB.TELESUP,3
Example 2-1 shows the results of using LISTFILE to display detailed file
information.
_____________________________________________________________________
| |
| |
| :LISTFILE OVERFLOW.PUB.TELESUP;FORMAT=DETAIL |
| ******************* |
| FILE: OVERFLOW.PUB.TELESUP |
| |
| FILE CODE : 1029 FOPTIONS: BINARY,FIXED,NOCCTL,STD |
| BLK FACTOR: 1 CREATOR : ** |
| REC SIZE: 256(BYTES) LOCKWORD: ** |
| BLK SIZE: 256(BYTES) SECURITY--READ : ANY |
| EXT SIZE: 9(SECT) WRITE : ANY |
| NUM REC: 8 APPEND : ANY |
| NUM SEC: 16 LOCK : ANY |
| NUM EXT: 1 EXECUTE : ANY |
| MAX REC: 8 **SECURITY IS ON |
| MAX EXT: 1 FLAGS : NO ACCESSORS |
| NUM LABELS: 0 CREATED : THU, JAN 16, 1992, 10:25 AM |
| MAX LABELS: 0 MODIFIED: THU, JAN 16, 1992, 11:03 AM |
| DISC DEV #: 16 ACCESSED: THU, FEB 20, 1992, 5:38 PM |
| SEC OFFSET: 0 LABEL ADDR: ** |
| VOLCLASS : MPEXL_SYSTEM_VOLUME_SET:DISC |
| |
_____________________________________________________________________
Example 2-1. Using LISTFILE with DETAIL Option
To show certain information (for example, passwords or lockwords), you
must have AM or SM capability. Using the command without any options
lists only the file name. The following examples show some typical uses
of LISTFILE.
Example 2-2 lists all files in your logon account and group with file
names that contain the characters "INFO":
_________________________________________________________
| |
| |
| :LISTFILE @INFO@ |
| |
| FILENAME |
| |
| INFOABST INFOUTLN INFOPREF PSMGINFO WINFOUTQ |
| |
_________________________________________________________
Example 2-2. Using LISTFILE with Wildcard Characters
Example 2-3 uses LISTFILE with the ,2 option to show the file
characteristics including the blocking factor, number of sectors in use,
and number of extents allocated for all files with names beginning with
"X" in the specified account and group.
_________________________________________________________________
| |
| |
| :LISTFILE X@.INTRIN.LOZAR,2 |
| |
| ACCOUNT= LOZAR GROUP= INTRIN |
| |
| FILENAME CODE ------------LOGICAL RECORD--- ---SPACE--- |
| |
| SIZE TYP EOF LIMIT R/B SECTORS #X MX |
| XLHPCICO 80B FA 39 39 3 8 1 1 |
| XLHPCIDE 80B FA 47 47 3 8 1 1 |
| XLHPCIGE 80B FA 27 27 3 8 1 1 |
| XLHPCIPU 80B FA 44 44 3 8 1 1 |
| |
_________________________________________________________________
Example 2-3. Using LISTFILE with DISC Option
You can alternatively specify FORMAT=DISC instead of typing ,2 in the
LISTFILE command to produce the same output.
To display the security information for a file, group, and account, you
can use the FORMAT=SECURITY or ,4 option as shown in example 2-4.
_______________________________________________________________
| |
| |
| :LISTFILE TELEACCT.PUB.SYS;FORMAT=SECURITY |
| ***************************************** |
| FILE: TELEACCT.PUB.SYS |
| |
| ACCOUNT ------ READ : ANY |
| WRITE : AC |
| APPEND : AC |
| LOCK : ANY |
| EXECUTE : ANY |
| |
| GROUP -------- READ : ANY |
| WRITE : GU |
| APPEND : GU |
| LOCK : ANY |
| EXECUTE : ANY |
| SAVE : GU |
| |
| |
| FILE --------- READ : ANY FCODE: 0 |
| WRITE : ANY **SECURITY IS ON |
| APPEND : ANY NO ACDS |
| LOCK : ANY |
| EXECUTE : ANY |
| |
| FOR ALEX.BANK: READ, WRITE, LOCK, APPEND, EXECUTE |
| |
_______________________________________________________________
Example 2-4. Using LISTFILE with SECURITY Option
Access control definitions, also called ACDs, control access to files.
You set ACDs using the ALTSEC command or the HPACDPUT instrinsic. To
determine whether any files have ACDs assigned to them, you can use the
FORMAT=ACD or -2 option. (See example 2-5.)
___________________________________________________________
| |
| |
| :LISTFILE ;FORMAT=ACD |
| ACCOUNT= ACCTG GROUP=PUB |
| |
| FILENAME ------------ACD ENTRIES-------------- |
| |
| ADDRESS NO ACDS |
| CURRENT NO ACDS |
| SMATTER @.ACCTG : R,W |
| @.@ : R |
| |
___________________________________________________________
Example 2-5. Using LISTFILE with ACD Option
In example 2-5, only the file SMATTER has ACDs assigned to it. Members
of the ACCTG account have read and write access to the file. All others
have only read access to the file.
Obtaining descriptions of temporary files with LISTFILE
You can use the TEMP option on the LISTFILE command to display
information about temporary files. The TEMP option can be used with the
following LISTFILE options:
* FORMAT=LABEL or -1
* FORMAT=FILES or 0
* FORMAT=SUMMARY or 1
* FORMAT=DISC or 2
* FORMAT=DETAIL or 3
To display the names of all temporary files in the group in which you are
working:
:listfile ;temp
TEMPORARY FILES FOR JAB.MORAN,PUB
FLIST.PUB.MORAN
To display detailed file information about temporary files, use the TEMP
option with the LISTFILE command. (See example 2-6.)
_______________________________________________________________________
| |
| |
| The file information displayed |
| :LISTFILE ;FORMAT=DETAIL;TEMP |
| ******************** |
| TEMPORARY FILE: FLIST.PUB.MORAN |
| |
| FILE CODE : 0 FOPTIONS: BINARY,FIXED,NOCCTL,STD |
| BLK FACTOR: 1 CREATOR : JAB |
| REC SIZE: 256(BYTES) LOCKWORD: |
| BLK SIZE: 260(BYTES) SECURITY--READ : |
| EXT SIZE: 0(SECT) WRITE : |
| NUM REC: 11 APPEND : |
| NUM SEC: 16 LOCK : |
| NUM EXT: 1 EXECUTE : |
| MAX REC: 10000 **SECURITY IS ON |
| MAX EXT: 1 FLAGS : n/a |
| NUM LABELS: 0 CREATED : THU, JAN 16, 1992, 12:25 AM |
| MAX LABELS: 0 MODIFIED: FRI, JAN 17, 1992, 11:13 AM |
| DISC DEV #: 15 ACCESSED: FRI, FEB 21, 1992, 2:38 PM |
| SEC OFFSET: 0 LABEL ADDR: $000000DD $00287120 |
| VOLCLASS : MPEIX_SYSTEM_VOLUME_SET:DISC |
| |
| |
_______________________________________________________________________
Example 2-6. Using LISTFILE with TEMP Option
In example 2-6, FLIST.PUB.MORAN is the only file matching @.
You can also use the PERMTEMP option with LISTFILE to list permanent and
temporary files. (See example 2-7.)
_________________________________________________
| |
| |
| :LISTFILE ;PERMTEMP |
| |
| FILENAME |
| |
| BLOCK EXAMPLES FILE1 MEMO2 |
| |
| |
| TEMPORARY FILES FOR CYC.CROCKER,PUB |
| |
| TFILE.PUB.CROCKER |
| |
| |
_________________________________________________
Example 2-7. Using LISTFILE with PERMTEMP Option
Listing file equations with LISTEQ
The LISTEQ command allows you to list all file equations in effect for
the job or session from which you issue the command. An optional
parameter, listfile, lets you specify the file to which you will write
the output. The default is $STDLIST. (See example 2-8.)
_____________________________________________________
| |
| |
| :LISTEQ |
| |
| FILE EQUATIONS |
| |
| FILE LP;DEV=PP;ENV=ELITE.XQENV.SYS;CCTL |
| FILE OFFLINE;DEV=PP;ENV=ELITE.XQENV.SYS;CCTL |
| FILE EDTLIST;DEV=PP;ENV=ELITE.ENV2680.SYS |
| |
_____________________________________________________
Example 2-8. Using LISTEQ
Obtaining file information using intrinsics
MPE/iX provides a number of intrinsics that allow you to retrieve file
information. They are described in the following paragraphs.
FFILEINFO.
Use this intrinsic to retrieve information about a specified file. The
file can be on any device, but it must be opened by the calling process
at the time of the FFILEINFO call. If you wish to return label
information from a file that is not opened, use FLABELINFO instead.
Some of the same information may be retrieved by using the FINFO CI
evaluator function. The FINFO evaluator function is discussed later in
this chapter.
FLABELINFO.
The FLABELINFO intrinsic returns information from the file label of a
disk file. The file need not be opened at the time of the intrinsic
call. The information returned by this intrinsic is a subset of the
information returned by FFILEINFO, and the item numbers are the same as
the option numbers used in the FINFO evaluator function.
Comparison table: FFILEINFO and FLABELINFO.
Table 2-2 compares the FFILEINFO and FLABELINFO intrinsics described
previously. Listed are FFILEINFO item parameters and FLABELINFO item
parameters; the item parameters are identified by item number and name
(for example, "2. File options").
NOTE Table 2-2 lists only those parameters that return the same
information for both intrinsics. There are many more FFILEINFO
item parameters unique to that intrinsic, and several unique
FLABELINFO parameters.
Table 2-2. File Information Intrinsics Comparison
---------------------------------------------------------------------------------------------
| | |
| FFILEINFO Item | FLABELINFO Item |
| | |
---------------------------------------------------------------------------------------------
| | |
| 1. File designator | formaldesignator* |
| | |
---------------------------------------------------------------------------------------------
| | |
| 2. File options | 13. File options |
| | |
---------------------------------------------------------------------------------------------
| | |
| 3. Access options | 14. Record size |
| | |
---------------------------------------------------------------------------------------------
| | |
| 8. File code (disk file) | 9. File code (disk file) |
| | |
---------------------------------------------------------------------------------------------
| | |
| 10. # logical records in file | 19. # logical records in file |
| | |
---------------------------------------------------------------------------------------------
| | |
| 11. File limit | 12. File limit |
| | |
---------------------------------------------------------------------------------------------
| | |
| 14. Block size | 15. Block size |
| | |
---------------------------------------------------------------------------------------------
| | |
| 16. Max # extents | 16. Max # extents |
| | |
---------------------------------------------------------------------------------------------
| | |
| 17. # user labels assigned | 11. # user labels not yet written |
| | |
---------------------------------------------------------------------------------------------
| | |
| 18. File creator | 4. File creator |
| | |
---------------------------------------------------------------------------------------------
| | |
| 36. File alloc. date | 21. File alloc. date |
| | |
---------------------------------------------------------------------------------------------
| | |
| 37. File alloc. time | 20. File alloc. time |
| | |
---------------------------------------------------------------------------------------------
| | |
| 52. Last mod. time | 24. Last mod. time |
| | |
---------------------------------------------------------------------------------------------
| | |
| 53. Last mod. date | 8. Last mod. date |
| | |
---------------------------------------------------------------------------------------------
| | |
| 54. Creation date | 6. Creation date |
| | |
---------------------------------------------------------------------------------------------
| | |
| 55. Last access date | 7. Last access date |
| | |
---------------------------------------------------------------------------------------------
| | |
| 57. # user labels written | 10. # user labels written |
| | |
---------------------------------------------------------------------------------------------
| | |
| 62. Lockword | 33. Lockword |
| | |
---------------------------------------------------------------------------------------------
| | |
| 63. UFID | 27. UFID |
| | |
---------------------------------------------------------------------------------------------
| | |
| 67. Record size (bytes) | 30. Record size (bytes) |
| | |
---------------------------------------------------------------------------------------------
| | |
| 68. Block size (bytes) | 31. Block size (bytes) |
| | |
---------------------------------------------------------------------------------------------
| | |
| 69. Extent size (bytes) | 32. Extent size (bytes) |
| | |
---------------------------------------------------------------------------------------------
| | |
| 76. Volume restriction | 34. Volume restriction |
| | |
---------------------------------------------------------------------------------------------
*Note that filename, groupname, and accountname are also returned in
Items 1-3 respectively.
Obtaining file information with FINFO evaluator function
The FINFO evaluator function provides some of the same information as
FLABELINFO, but does not require you to write a program to use it.
FINFO is a function of the CI expression evaluator, available to all CI
commands. If the command is IF, WHILE, SETVAR, or CALC, then FINFO can
be used implicitly; otherwise, it must be used explicitly in the form of
an expression substitution, for example, ![any MPE/iX expression].
FINFO has two parameters. The first is the file name of the file about
which you want to obtain information. This is a string, and it can be a
fully qualified, a partially qualified, or an unqualified file name, or a
file equation backreference. The second parameter is an integer or
integer expression that indicates the nature of the information required.
The options available are listed in Table 2-3 . (The options are
similar to the item number for FLABELINFO.)
For example, entering the following command would give a result of TRUE
if X.PUB.account exists:
:CALC FINFO ('X.PUB','exists')
Table 2-3. FINFO Options
-----------------------------------------------------------------------
| |
| Option Strings Option Return |
| Number |
| |
- -
| |
| EXISTS 0 Boolean: TRUE if file |
| exists, |
| FALSE if it does not |
| |
-----------------------------------------------------------------------
| |
| FULL FILENAME 1 string: fully qualified |
| FULLFNAME file name |
| FULLY QUALIFIED FILENAME |
| |
-----------------------------------------------------------------------
| |
| FILENAME ONLY -1 string |
| FNAME |
| |
-----------------------------------------------------------------------
| |
| GROUP 2 string |
| GROUP NAME |
| |
-----------------------------------------------------------------------
| |
| ACCT 3 string |
| ACCOUNT NAME |
| |
-----------------------------------------------------------------------
| |
| CREATOR 4 string: user ID of the |
| file creator |
| |
-----------------------------------------------------------------------
| |
| FMTSECURITY 5 string: security matrix |
| FORMATTED SECURITY MATRIX in the form |
| R:ANY;A:AL,GU;... |
| |
-----------------------------------------------------------------------
| |
| INTSECURITY -5 integer: security |
| SECURITY MATRIX matrix bit pattern |
| |
-----------------------------------------------------------------------
| |
| CREATED 6 string: creation date |
| CREATION DATE DAY, MMM DD, YYYY |
| FMTCREATED |
| |
-----------------------------------------------------------------------
| |
| CREATION DATE INTEGER -6 integer: creation date |
| INTCREATED YYYYMMDD |
| |
-----------------------------------------------------------------------
| |
| ACCESSED 7 string: last access |
| FMTACCESSED date DAY, MMM DD, YYYY |
| LAST ACCESS DATE |
| |
-----------------------------------------------------------------------
| |
| INTACCESSED -7 integer: format, |
| LAST ACCESS DATE INTEGER YYYYMMDD |
| |
| FMTMODDATE 8 string: last modified |
| LAST MOD DATE date DAY, MMM DD, YYYY |
| MODIFIED |
| |
-----------------------------------------------------------------------
| |
| INTMODDATE -8 integer: last modified |
| LAST MOD DATE INTEGER date YYYYMMDD |
| |
-----------------------------------------------------------------------
| |
| FILE CODE MNEMONIC 9 string: file code |
| FMTFCODE mnemonic or integer file |
| code in string form |
| |
-----------------------------------------------------------------------
| |
| FCODE -9 integer |
| FILE CODE |
| INTFCODE |
| |
-----------------------------------------------------------------------
Table 2-3. FINFO Options (continued)
-----------------------------------------------------------------------
| |
| Option Strings Option Return |
| Number |
| |
-----------------------------------------------------------------------
| |
| USER LABELS WRITTEN 10 integer |
| |
-----------------------------------------------------------------------
| |
| USER LABELS AVAIL 11 integer |
| |
-----------------------------------------------------------------------
| |
| FILE LIMIT 12 integer |
| LIMIT |
| |
- -
-----------------------------------------------------------------------
| |
| FMTFOPT 13 string: format used in |
| FORMATTED FOPTIONS LISTF,3 |
| |
-----------------------------------------------------------------------
| |
| FOPTIONS -13 integer: bit pattern |
| |
| INTFOPT |
| |
-----------------------------------------------------------------------
| |
| RECORD SIZE 14 integer: negative value |
| RECSIZE indicates bytes |
| |
-----------------------------------------------------------------------
| |
| BLKSIZE 15 integer: in words (two |
| BLOCK SIZE bytes per word) as |
| returned by FLABELINFO |
| |
-----------------------------------------------------------------------
| |
| MAX EXTENTS 16 integer |
| MAXEXT |
| |
-----------------------------------------------------------------------
| |
| LAST EXTENT SIZE 17 integer |
| LASTEXTSIZE |
| |
| EXTENT SIZE 18 integer |
| EXTSIZE |
| |
-----------------------------------------------------------------------
| |
| END OF FILE 19 integer |
| EOF |
| |
-----------------------------------------------------------------------
| |
| ALLOC TIME 20 string: format HH:MM |
| FMTALLOCTIME AM/PM |
| |
-----------------------------------------------------------------------
| |
| ALLOC TIME INTEGER -20 integer: format HHMMSS |
| INTALLOCTIME |
| |
| ALLOC DATE 21 string: format DAY, MMM |
| ALLOCATED DD, YYYY |
| FMTALLOCDATE |
| |
-----------------------------------------------------------------------
| |
| ALLOC DATE INTEGER -21 integer: format |
| INTALLOCDATE YYYYMMDD |
| |
-----------------------------------------------------------------------
| |
| NUM OPEN CLOSE RECS 22 integer |
| |
-----------------------------------------------------------------------
| |
| DEVICE NAME 23 string: 8 bytes |
| DEVNAME |
| |
-----------------------------------------------------------------------
| |
| FMTMODTIME 24 string: format HH:MM |
| LAST MOD TIME AM/PM |
| |
-----------------------------------------------------------------------
Table 2-3. FINFO Options (continued)
-----------------------------------------------------------------------
| |
| Option Strings Option Return |
| Number |
| |
-----------------------------------------------------------------------
| |
| INTMODTIME -24 integer: format HHMMSS |
| LAST MOD TIME INTEGER |
| |
-----------------------------------------------------------------------
| |
| FIRST USER LABEL 25 string: 256 bytes |
| |
-----------------------------------------------------------------------
| |
| UFID 27 string: 20 bytes |
| UNIQUE FILE ID |
| |
-----------------------------------------------------------------------
| |
| BYTE FILE LIMIT 28 integer |
| BYTELIMIT |
| |
-----------------------------------------------------------------------
| |
| BYTE DATA OFFSET 29 integer |
| DATASTART |
| |
-----------------------------------------------------------------------
| |
| BYTE RECORD SIZE 30 integer |
| BYTERECSIZE |
| |
-----------------------------------------------------------------------
| |
| BYTE BLOCK SIZE 31 integer |
| BYTEBLKSIZE |
| |
-----------------------------------------------------------------------
| |
| BYTE EXTENT SIZE 32 integer |
| BYTEEXTSIZE |
| |
-----------------------------------------------------------------------
| |
| LOCKWORD 33 string |
| |
-----------------------------------------------------------------------
| |
| VOLRESTR 34 string: 34 bytes |
| VOLUME RESTRICTION |
| |
-----------------------------------------------------------------------
NOTE Users with system manager (SM) capabilities may use options 4 and
33 on any file within the system. Users with account manager (AM)
capabilities may use those options only on files within their
account.
Example 2-9 illustrates the use of FINFO in a command file. The command
file displays file label information for a given file. This command file
provides an extensive routine that analyzes the file name if the file is
not found. A fully qualified file name is returned even if the parameter
input was not qualified.
_________________________________________________________________________________
| |
| PARM FILE |
| IF NOT (FINFO("!FILE","EXISTS")) THEN |
| COMMENT ** FILE DOES NOT EXIST ** |
| IF LFT("!FILE",1) <> "*" AND LFT("!FILE",1) <> "$" THEN |
| COMMENT **QUALIFY FILE BEFORE REPORTING NON-EXISTENCE** |
| IF POS(".","!FILE") > 0 THEN |
| COMMENT ** A GROUP NAME IS SPECIFIED ** |
| IF POS(".","!FILE",2) > 0 THEN |
| COMMENT ** FILE NAME IS FULLY QUALIFIED ** |
| ECHO ![UPS("!FILE")] does not exist. |
| ELSE |
| ECHO ![UPS("!FILE")].!HPACCOUNT does not exist. |
| ENDIF |
| ELSE |
| ECHO ![UPS("!FILE")].!HPGROUP.!HPACCOUNT does not exist. |
| ENDIF |
| ELSE |
| ECHO !FILE does not exist. |
| ENDIF |
| RETURN |
| ENDIF |
| COMMENT ** FORMAL FILE DESIGNATOR ** |
| ECHO (FINFO): Full file description for & |
| ![FINFO("!FILE","FULL FILENAME")] follows: |
| COMMENT ** CREATOR AND CREATE/MODIFY DATES ** |
| ECHO Created by ![FINFO("!FILE","CREATOR")] on & |
| ![FINFO("!FILE","CREATED")]. |
| ECHO Modified on ![FINFO("!FILE","MODIFIED")] at & |
| ![FINFO("!FILE","LAST MOD TIME")]. |
| COMMENT ** FILE CODE ** |
| IF SETVAR(_fcode_str, FINFO("!FILE","FILECODE MNEMONIC")) = "" THEN |
| ECHO FCODE: ![FINFO("!FILE","FILE CODE")]. |
| ELSE |
| ECHO FCODE: !_fcode_str (![FINFO("!FILE","FILE CODE")]). |
| ENDIF |
| COMMENT ** RECORD SIZE, END OF FILE, FILE LIMIT ** |
| ECHO RECSIZE: ![FINFO("!FILE","RECORD SIZE")], EOF: & |
| ![FINFO("!FILE","END OF FILE")], FLIMIT: ![FINFO("!FILE","LIMIT")].|
| COMMENT ** FILE OPTIONS ** |
| SETVAR _FOPT FINFO("!FILE","FOPTIONS") |
| ECHO FOPTIONS: ![FINFO("!FILE","FORMATTED OPTIONS")] (#!_FOPT, & |
| ![OCTAL(FOPT)], !HEX(_FOPT)]). |
| DELETEVAR _FOPT,_fcode_str |
_________________________________________________________________________________
Example 2-9. File Information Command File
This command file searches for a designated file. If found, its formal
file designator, creator and creation date, modification information,
file code, record size, end of file, file limit, and file options are
displayed. Example 2-10 provides a sample of the display provided by the
command file. The name of the command file is FILINFO. SAMPLE is the
file about which information is being obtained.
_______________________________________________________________
| |
| |
| :FILINFO SAMPLE |
| (FINFO): Full description for SAMPLE.PUB.MILL follows: |
| Created by CLM on WED, MAY 10, 1989. |
| Modified on WED, MAY 10, 1989 at 3:21 PM. |
| FCODE: 0. |
| RECSIZE: -80, EOF: 5, FLIMIT:5. |
| FOPTIONS: ASCII, FIXED, NOCCTL, STD (#5, %5, $5). |
| |
_______________________________________________________________
Example 2-10. FINFO Command File--Sample Output
If the file is not found, an extensive routine determines the fully
qualified file name under which the search was performed. This routine
determines if the specified file name is a backreferenced file name or a
system-defined file name. It also determines whether a group or account
designator was included in the original specification. If necessary the
group or account are added to the file name to fully qualify it in a
response to the user.
Getting security information with HPACDINFO or HPACDPUT
Files on the system can be secured using access control definitions
(ACDs). You use the ALTSEC command to assign ACDs. ACDs specify
permissions for access to a device or file. ACDs take precedence over
the the MPE file access matrix and lockwords.
To get information about ACDs programmatically, use the HPACDINFO
intrinsic.
Anyone can find out whether an ACD exists for a particular file or
device. However, only the owner or users granted RACD (read ACD)
authorization can list the ACD contents.
For more information about ACDs, refer to the ALTSEC command in the
MPE/iX Commands Reference Manual, Volumes 1 and 2 (32650-90003 and
32650-90364). Refer also to Accessing Files Programmer's Guide
(32650-90017).
Reading user-defined labels with FREADLABEL
MPE/iX allows you to specify the use of a file by writing to a
user-defined label. This label is not to be confused with the file
label, which contains the permanent characteristics of a disk file. A
user-defined label can be used with either a disk file or a magnetic tape
file, and specialized intrinsics are used to write to and read from it.
The FREADLABEL intrinsic reads a user-defined label from a file. When
you issue the first FREAD intrinsic call for a file, MPE/iX automatically
skips over any unread user labels. To ensure that a user-defined label
is read, use this intrinsic immediately after the HPFOPEN or FOPEN
intrinsic has opened the file.
Determining file relationships with FRELATE
The FRELATE intrinsic is used for one specific purpose--determining
whether a pair of files (input file and list file) is interactive,
duplicative, or both. Interactive means that the file requires human
intervention for all input operations. For example, an input file and a
list file opened to the same terminal are considered an interactive pair
of files. Duplicative means that all input to the input file is echoed
automatically to the list file. For example, input to a keyboard is
duplicated on the associated CRT.
The FRELATE intrinsic has two required parameters: infilenum is the file
number of the input file, and listfilenum is the file number of the list
file. Both of these numbers are returned when you create the files using
HPFOPEN or FOPEN.
The intrinsic returns a 16-bit unsigned integer. If the files are an
interactive pair, bit (15:1) =1, or =0 if they are not. If the files are
a duplicative pair, bit (0:1) =1, or =0 if they are not.
A file can be interactive, duplicative, or both. These attributes do not
change between the time that the files are opened and the time that they
are closed. You can use FRELATE to obtain information about files on all
devices.
You can also obtain this information by using the predefined CI variables
HPDUPLICATIVE and HPINTERACTIVE. For information on how to obtain system
information using variables, refer to chapter 3.
MPE/iX 5.0 Documentation