FLABELINFO
NM and CM callable.
Returns information from the file label of a disk file.
Syntax
_______________________________________________
| |
| CA I16V I16 |
| FLABELINFO(formaldesig,mode,fserrorcode,|
| I16A REC I16A |
| itemnum,item,itemerror); |
_______________________________________________
Parameters
formaldesig character array (required)
Passes a formal file designator interpreted
according to MPE-escaped semantics. The file name
must be terminated by a nonalphanumeric character
other than a period (.), a slash (/), a hyphen (-),
and an underscore (_). The file referred to by
formaldesig can be either an MPE file (i.e., one
that uses MPE syntax), or it can be an HFS syntax
name beginning with a dot or a slash.
If formaldesig is an escaped pathname:
* you cannot reference remote files
* it cannot express a name equivalent to
filename:envid
* you cannot use the device parameter
(device=node#) to specify the remote
location of a device
If formaldesig follows MPE syntax, the file name
can include password, group, and account
specifications. The file name can backreference a
file equation and optionally be preceded by an
asterisk.
The file referred to by formaldesig may reside
either in an MPE group or in an HFS directory. For
files located in HFS directories, traverse
directory entries (TD) access is required to all
directories specified in formaldesig. If there is
no TD access, FLABELINFO fails and a file system
error code (398) is returned in the fserrorcode
parameter.
If the file can be named using both MPE syntax and
HFS syntax (for example, FILEA.MYGROUP.MYACCT and
/MYACCT/MYGROUP/FILEA), the file can be either
permanent or temporary. If a temporary and a
permanent file have the same name, FLABELINFO
returns information about the temporary file only.
mode 16-bit signed integer by value (required)
Passes an option specifying the valid
backreferencing to file equations for the file.
Bits Value/Meaning
0:11 Reserved for future use.
11:1 Symbolic Link Traversal
0 To
traverse
through
symbolic
links,
if they
exist.
1 Do not
traversing
through
symbolic
links,
if they
exist.
12:2 Caller Privilege Level
Allows the caller to pretend
to be less privileged. The
privilege level is passed in
this field.
14:2 File Equations
0 Use
file
equations
if they
exist.
1 A file
equation
must be
used.
2 Do not
use a
file
equation.
fserrorcode 16-bit signed integer by reference (required)
Returns a value indicating whether an error or
warning occurred when FLABELINFO attempted to
return requested information:
* A value of zero indicates that no errors
were encountered.
* A positive value is a file system error code
and indicates that an error was encountered
and no information was returned in item.
* A -1 indicates that an item error or warning
has occurred. Check the itemerror parameter
to determine which item(s) has an
error/warning and what it is.
itemnum 16-bit signed integer array (required)
Specifies which item value is to be returned.
(Refer to Table 4-8 .)
To indicate the end of the list, place a zero in
the element following the last itemnum.
item record (required)
Returns the value of the item specified in the
corresponding itemnum. (Refer to Table 4-8 .)
Itemnum/items are paired such that the nth field of
the item record corresponds to the nth element of
the itemnum array.
itemerror 16-bit signed integer array (required)
Returns an error number corresponding to the items
specified in the itemnum array. The itemnum/item
and itemerror parameters are paired such that the
nth element of the itemerror array corresponds to
the nth element of the itemnum array.
If a value in the itemerror array is negative, a
warning exists for the corresponding item. If the
value is positive, an error was detected for the
corresponding item. The absolute value of each
value is a file system error number.
Table 4-8. FLABELINFO Itemnum/Item Values
-----------------------------------------------------------------------------------------------
| | | |
| Itemnum | Mnemonic | Item Description |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| 1 | CA | File name (8 bytes): |
| | | |
| | | The file name component for the file referenced in formaldesig is |
| | | returned as the value. If the file name is not expressible using |
| | | MPE-only semantics, a file system error code (391) is returned in the |
| | | associated itemerror. |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| 2 | CA | Group name (8 bytes): |
| | | |
| | | The group name component for the file referenced in formaldesig is |
| | | returned as the value. If the group name is not expressible using |
| | | MPE-only semantics, a file system error code (391) is returned in the |
| | | associated itemerror. |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| 3 | CA | Account name (8 bytes): |
| | | |
| | | The account name component for the file referenced in formaldesig is |
| | | returned as the value. If the account name is not expressible using |
| | | MPE-only semantics, a file system error code (391) is returned in the |
| | | associated itemerror. |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| 4 | CA | File creator name (8 bytes): |
| | | |
| | | An unqualified form of the file owner's name is returned as the |
| | | value. The file owner is not necessarily the file's creator. |
| | | |
| | | A symbolic zero (ASCII 48 in decimal) is returned as the file owner |
| | | for root directories, MPE accounts, and MPE groups created prior to |
| | | release 4.5. |
| | | |
| | | If the file is not located in the account where the file owner is a |
| | | member, a blank file owner name is returned. Use itemnum=43 to |
| | | obtain the full file owner name. |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| 5 | U32 | Security matrix for access: |
| | | |
| | | Returns the file's security matrix. This value does not indicate the |
| | | actual security enforced for a file, since group and account security |
| | | masks can also restrict access. This field is ignored if an ACD is |
| | | active on a file. |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| 6 | U16 | File creation date: |
| | | |
| | | The date in CALENDAR intrinsic format. Either creator (C) or manager |
| | | (AM if file is within account, otherwise SM) access required. |
| | | |
| | | Zero is returned as the creation date for root directories, MPE |
| | | accounts, and MPE groups created prior to release 4.5. |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| 7 | U16 | Last access date: |
| | | |
| | | The date in CALENDAR intrinsic format. May not be up-to-date when |
| | | the file is open. |
| | | |
| | | Zero is returned as the last access date for root directories, MPE |
| | | accounts, and MPE groups created prior to release 4.5. |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| 8 | U16 | Last modification date: |
| | | |
| | | The date in CALENDAR intrinsic format. May not be up-to-date when |
| | | the file is open. |
| | | |
| | | Zero is returned as the modification date for root directories, MPE |
| | | accounts, and MPE groups created prior to release 4.5. |
| | | |
-----------------------------------------------------------------------------------------------
Table 4-8. FLABELINFO Itemnum/Item Values (cont.)
-----------------------------------------------------------------------------------------------
| | | |
| Itemnum | Mnemonic | Item Description |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| 9 | I16 | File code of disk file |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| 10 | U16 | Number of user labels written: |
| | | |
| | | May not be up-to-date when the file is open. |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| 11 | U16 | Number of user labels available: |
| | | |
| | | May not be up-to-date when the file is open. |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| 12 | I32 | Total number of logical records possible in the file: |
| | | |
| | | Equivalent to the file limit measured in logical records. |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| 13 | U16 | File options: |
| | | |
| | | The record format extension bit is returned as the foption (1:1) bit. |
| | | Byte stream record format is represented as a record format extension |
| | | of one with a variable record format (foption (8:2) bits equal to |
| | | 01). |
| | | |
| | | Directories, symbolic links, device links, pipes and FIFO's cannot be |
| | | represented by foption. If the object referenced by filenum is is an |
| | | object, MPE error 399 is returned in the associated itemerror. |
| | | |
| | | Refer to the foption figure. |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| 14 | I16 | Record size: |
| | | |
| | | Maintained for compatibility with MPE V/E-based systems. (If a zero |
| | | is returned, use itemnum 30 instead.) |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| 15 | I16 | Block size: |
| | | |
| | | Maintained for compatibility with MPE V/E-based systems. (If a zero |
| | | is returned, use itemnum 31 instead.) |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| 16 | I16 | Maximum number of extents: |
| | | |
| | | Maintained for compatibility with MPE V/E-based systems. (If a zero |
| | | is returned, use itemnum 32 instead.) |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| 17 | I16 | Last extent size: |
| | | |
| | | Indicates sectors. May not be up-to-date when the file is open. |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| 18 | I16 | Extent size: |
| | | |
| | | Indicates sectors. (If a zero is returned, use itemnum 32 instead.) |
| | | |
-----------------------------------------------------------------------------------------------
Table 4-8. FLABELINFO Itemnum/Item Values (cont.)
-----------------------------------------------------------------------------------------------
| | | |
| Itemnum | Mnemonic | Item Description |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| 19 | U32 | Number of logical records in file: |
| | | |
| | | Equivalent to EOF. May not be up-to-date when the file is open. |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| 20 | U32 | File allocation time: |
| | | |
| | | The time when file was last restored (in CLOCK intrinsic format). |
| | | |
| | | Zero is returned as the file allocation time for root directories, |
| | | MPE accounts, and MPE groups created prior to release 4.5. |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| 21 | U16 | File allocation date: |
| | | |
| | | The date when the file was last restored (in CALENDAR intrinsic |
| | | format). |
| | | |
| | | Zero is returned as the file allocation date for root directories, |
| | | MPE accounts, and MPE groups created prior to release 4.5. |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| 22 | I32 | Number of open/close records: |
| | | |
| | | MSG files only. May not be up-to-date when the file is open. |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| 23 | CA | Device name (8 bytes) |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| 24 | U32 | Last modification time: |
| | | |
| | | The time when the file was last modified (in CALENDAR intrinsic |
| | | format). May not be up-to-date when the file is open. |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| 25 | CA | First user label (user label 0) (256 bytes): |
| | | |
| | | May not be up-to-date when the file is open. For all but PM files, |
| | | Manager capabilitiy (AM if file is within account, otherwise SM) or |
| | | read/write (R/W) access required. For PM files, Manager capability |
| | | is required; otherwise, FLABELINFO fails with FSERR93. |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| 27 | REC | Unique file identifier (UFID) (20 bytes) |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| 28 | U32 | Total number of bytes allowed in file: |
| | | |
| | | Equivalent to the file limit measured in bytes. May not be |
| | | up-to-date when the file is open. |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| 29 | U32 | Start of file offset: |
| | | |
| | | Indicates the byte offset where user data starts. |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| 30 | U32 | Record size (indicates bytes |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| 31 | U32 | Block size (indicates bytes) |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| 32 | U32 | Extent size (indicates bytes) |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| 33 | CA | File lockword (8 bytes): |
| | | |
| | | Returned if you are the file creator, account manager, or system |
| | | manager. |
| | | |
-----------------------------------------------------------------------------------------------
Table 4-8. FLABELINFO Itemnum/Item Values (cont.)
-----------------------------------------------------------------------------------------------
| | | |
| Itemnum | Mnemonic | Item Description |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| 34 | CA | Volume restriction (34 bytes): |
| | | |
| | | The last two characters indicate the type of restriction, as follows: |
| | | |
| | | |
| | | 0 File is placed on the specified volume at creation |
| | | 1 File can be placed on any volume containing the specified class |
| | | at creation |
| | | 2 File can be placed on any volume within the specified volume set |
| | | at creation (Default) |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| 35 | CA | Volume set names (32 bytes): |
| | | |
| | | No restrictions. |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| 36 | U32 | Transaction management log set id (4 bytes) |
| | | |
| | | No restrictions. |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| 37 | U16 | Logical device number |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| 38 | REC | Terminated HFS-syntax system absolute pathname: |
| | | |
| | | Upon input, the first four bytes are interpreted as a 32-bit unsigned |
| | | integer specifying the maximum available buffer size in bytes. This |
| | | maximum available buffer size does not include the four bytes used to |
| | | represent this size. Upon output, the first four bytes represent the |
| | | pathname length excluding the null terminator as a 32-bit unsigned |
| | | integer. The pathname is returned in bytes following the pathname |
| | | length. Bytes beyond the pathname terminator are undefined. If the |
| | | maximum available buffer size is incorrect upon input, variables |
| | | allocated near the buffer can be overwritten or a bounds violation |
| | | could occur. A zero pathname length is returned for unnamed new |
| | | files and when an error occurs. Zero is the minimum buffer length |
| | | upon input for this itemnum. |
| | | |
| | | Format of the buffer on input: |
| | | |
| | | byte #1 #2 #3 #4 | #1 ... #N |
| | | +----+----+----+----+----+ ... +----+ |
| | | | maximum | | |
| | | | length = N | | |
| | | +----+----+----+----+----+ ... +----+ |
| | | |
| | | Format of the buffer on output: |
| | | |
| | | byte #1 #2 #3 #4 | #1 ... #L ... #N |
| | | +----+----+----+----+----+ ... +----+ ... +----+ |
| | | | length = | / | | \0 | | | |
| | | | (L - 1) | | | | | | |
| | | +----+----+----+----+----+ ... +----+ ... +----+ |
| | | |
| | | |
-----------------------------------------------------------------------------------------------
Table 4-8. FLABELINFO Itemnum/Item Values (cont.)
-----------------------------------------------------------------------------------------------
| | | |
| Itemnum | Mnemonic | Item Description |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| 39 | U32 | The current number of hard links to the file |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| 40 | I32 | Time of last file access (clock format): |
| | | |
| | | The bit assignments are: |
| | | |
| | | bits 0-7 = hours |
| | | bits 8-15 = minutes |
| | | bits 16-23 = seconds |
| | | bits 24-31 = tenths of seconds |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| 41 | I32 | Time of last file status change (clock format): |
| | | |
| | | The bit assignments are: |
| | | |
| | | bits 0-7 = hours |
| | | bits 8-15 = minutes |
| | | bits 16-23 = seconds |
| | | bits 24-31 = tenths of seconds |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| 42 | U16 | Date of the last file status change (calendar format): |
| | | |
| | | The bit assignments are: |
| | | |
| | | bits 0-7 = year of century |
| | | bits 8-15 = day of the year |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| 43 | CA | File owner (32 bytes): |
| | | |
| | | The full file owner name. Unused characters are filled with blanks. |
| | | A symbolic zero (ASCII 48 in decimal) is returned as the file owner |
| | | for root directories, accounts, and MPE groups created prior to |
| | | release 4.5. |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| 44 | I32 | File owner identifier: |
| | | |
| | | The file owner identifier (UID). Zero is returned as the file owner |
| | | ID for root directories, MPE accounts, and MPE groups created prior |
| | | to release 4.5. |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| 45 | CA | File group (32 bytes): |
| | | |
| | | The file group name. Unused characters are filled with blanks. A |
| | | symbolic zero (ASCII 48 in decimal) is returned as the group for root |
| | | directories where GIDs have not been explicitly assigned. |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| 46 | I32 | File group identifier: |
| | | |
| | | The file group identifier (GID). Zero is returned as the group ID for |
| | | root directories where GIDs have not been explicitly assigned. |
| | | |
-----------------------------------------------------------------------------------------------
Table 4-8. FLABELINFO Itemnum/Item Values (cont.)
-----------------------------------------------------------------------------------------------
| | | |
| Itemnum | Mnemonic | Item Description |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| 47 | U32 | File type: |
| | | |
| | | Following are valid file types that can be returned: |
| | | |
| | | 0 = Ordinary file |
| | | 1 = KSAM/3000 |
| | | 2 = RIO |
| | | 3 = KSAM XL |
| | | 4 = CIR |
| | | 5 = Native Mode Spool File |
| | | 6 = MSG |
| | | 7 = N/A |
| | | 8 = N/A |
| | | 9 = Directory |
| | | 10-11= N/A |
| | | 12 = Pipe |
| | | 13 = FIFO |
| | | 14 = Symbolic Link |
| | | 15 = Device Link |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| 48 | U32 | Record type: |
| | | |
| | | Following are valid record types that can be returned: |
| | | |
| | | 0 = fixed |
| | | 1 = variable |
| | | 2 = undefined |
| | | 3 = spool block |
| | | 4 = root directory |
| | | 5 = N/A |
| | | 6 = account directory |
| | | 7 = group directory |
| | | 8 = N/A |
| | | 9 = byte stream |
| | | 10 = hierarchical directory |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| 49 | I64 | Current file size (in bytes): |
| | | |
| | | The value returned represents the current position of the end-of-file |
| | | (EOF) and may not reflect the number of bytes actually occupied by |
| | | the file on disk if the file is sparsely allocated. |
| | | |
-----------------------------------------------------------------------------------------------
Table 4-8. FLABELINFO Itemnum/Item Values (cont.)
-----------------------------------------------------------------------------------------------
| | | |
| Itemnum | Mnemonic | Item Description |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| 50 | I32 | KSAM XL File Version: |
| | | |
| | | This item returns a value indicating the version number of a KSAM XL |
| | | file. A value of 1 indicates an original type KSAM XL file. A value |
| | | of 2 indicates the next generation KSAM XL file. A value of zero is |
| | | returned if the file is not a KSAM XL file. |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| 51 | I32 | KSAM XL Parameters: |
| | | |
| | | This item returns the ksamparam for KSAM XL files, which is an array |
| | | that specifies the characteristics for up to 16 keys for the file. |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| 52 | I32 | MPE/iX Device Type: |
| | | |
| | | This item returns the following values for the following types of |
| | | devices: |
| | | |
| | | 0=Disk device |
| | | 1=Tape device |
| | | 2=Terminal device |
| | | 3=Printer device |
| | | 4=Remote device |
| | | 5=Ports device |
| | | 6=Reserved |
| | | 7=Streams device |
| | | 8=Sockets device |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| 53 | I16 | Secure/Release: |
| | | |
| | | This item returns a value indicating whether the file is currently |
| | | secured or released. A value of 1 indicates that the file is |
| | | secured. A value of zero indicates that the file is released. |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| 54 | I32 | Setuid flag |
| | | |
| | | This item returns a value indicating whether or not the setuid flag |
| | | is on for the specified file. When the setuid flag is on for a |
| | | program file (the value is 1), the program will execute under the |
| | | identity of the file's owner rather than assuming the identity of the |
| | | process that invoked the program. A value of zero indicates the flag |
| | | is off. |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| 55 | I32 | Setgid flag |
| | | |
| | | This item returns a value indicating whether or not the setgid flag |
| | | is on for the specified file. When the setgid flag is on for a |
| | | program file (the value is 1), the program will execute with the GID |
| | | membership of the file rather than assuming the GID membership of the |
| | | invoking process. A value of zero indicates that the flag is off. |
| | | |
-----------------------------------------------------------------------------------------------
Figure 4-7. Foption Bit Summary
Condition Codes
CCE (2) Request granted.
CCG (0) Not returned. U\CCL (1)\Request denied. An error
occurred. Refer to the fserrorcode and itemerror
parameters for more information.
Related Information
Intrinsics None
Commands None
Manuals Getting System Information Programmer's Guide
(32650-90018)