HPlogo Using KSAM XL: 900 Series HP 3000 Computer Systems > Chapter 9 KSAM XL Intrinsics

FGETINFO

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

Returns access and status information about a file.

NOTE: FGETINFO is provided for compatibility with MPE V/E-based systems only. It is recommended that FFILEINFO be used to access data.

Syntax

             I16V      CA      U16   U16

   FGETINFO(filenum,formaldesig,foption,aoption

             I16    I16    U16    U16   I16

            lrecsize,devtype,ldevnum,hdaddr,filecode,

             I32  I32 I32     I32    I32    I16

            lrecptr,eof,filelimit,logcount,physcount,blksize,

             U16     I16      I16      CA    I32

            extsize,numextent,userlabels,creatorid,labaddr);

Parameters

filenum

16-bit signed integer by value (required)

Passes the file number of the file for which information is requested.

formaldesig

character array (optional)

Returns the actual designator of the file being referenced, in the following format:

   filename.groupname.accountname

The formaldesig array must be at least 28 bytes in length. When the actual designator is returned, unused bytes in the array are filled with blanks on the right. A nameless file returns an empty string.

foption

16-bit unsigned integer by reference (optional)

Returns seven different file characteristics by setting corresponding bit groupings. The file characteristics are those specified for foptions in the FOPEN intrinsic.

aoption

16-bit unsigned integer by reference (optional)

Returns up to seven different access options represented by bit groupings as described for the aoptions parameter of FOPEN.

lrecsize

16-bit signed integer by reference (optional)

Returns the logical record size associated with the file:

  • If the file was created as a binary file, this value is positive and expresses the size in halfwords.

  • If the file was created as an ASCII file, this value is negative and expresses the size in bytes.

devtype

16-bit signed integer by reference (optional)

Returns the type and subtype of the device being used for a KSAM, RIO, circular, or message file, or devices such as a tape drive, printer, or terminal where bit (0:8) indicate device subtype, and bit (8:8) indicate device type. For standard disk files, bit (8:8)=00000011 and bit (0:8)=00001000 (indicate a 7933/35 disk drive).

ldevnum

16-bit unsigned integer by reference (optional)

Returns the logical device number (ldev) associated with the device where the file label resides:

  • If the file is a disk file, ldevnum is the location of the file label. (File data may reside on the same device as the file label.)

  • If the file is spooled, ldevnum is a virtual device number that does not correspond to the system configuration I/O device list.

  • If the file is located on a remote computer, linked by a DS point-to-point or X.25 link, the left eight bit (0:8) are the logical device number of the distributed system (DS) device.

  • If the remote computer is linked by NS 3000/XL, the left eight bit (0:8) are the remote environment of the connection. The right eight bit (8:8) are the ldev of the device on the remote computer where the file label resides.

  • If the DS device for the RFA or the LDEV is 0, then ldevnum returns a 0.

hdaddr

16-bit unsigned integer by reference (optional)

Returns 2048. Maintained to provide backward compatibility with MPE V/E-based systems.

filecode

16-bit signed integer by reference (optional)

Returns the file code of a disk file.

lrecptr

32-bit signed integer by reference (optional)

Returns the current physical record pointer setting. Remember that physical record numbers can begin with zero or one, depending on how the file was built.

eof

32-bit signed integer by reference (optional)

Returns the pointer setting of the last logical record currently in the file (equivalent to the number of logical records currently in the file). If the file does not reside on disk, this value is zero. For interprocess communication (IPC), when a call to FCONTROL with itemnum=46 is in effect, the number of records returned in eof includes open, close, and data records.

filelimit

32-bit signed integer by reference (optional)

Returns a number representing the last logical record that could exist in the file (the physical limits of the file). If the file does not reside on disk, this value is zero.

logcount

32-bit signed integer by reference (optional)

Returns the total number of logical records passed to and from the program during the current file access.

physcount

32-bit signed integer by reference (optional)

Returns the total number of physical I/O operations performed within the process, against the file, since the last FOPEN/HPFOPEN call.

blksize

16-bit signed integer by reference (optional)

Returns the file block size:

  • If the file is binary, the value is positive and the size is in halfwords.

  • If the file is ASCII, the value is negative and the size is in bytes.

extsize

16-bit unsigned integer by reference (optional)

Maintained to provide backward compatibility with MPE V/E-based systems.

numextent

16-bit signed integer by reference (optional)

Maintained to provide backward compatibility with MPE V/E-based systems.

userlabels

16-bit signed integer by reference (optional)

Returns the number of user labels defined for the file during creation. If the file is not a disk file, this number is zero. When an old file is opened for overwrite output, the value of userlabels is not reset, and old user labels are not destroyed.

creatorid

character array (optional)

Returns the name of the file creator (8-character array). If the file is not a disk file, blanks are returned.

labaddr

32-bit signed integer by reference (optional)

Returns a zero. Maintained for backward compatibility with MPE V/E-based systems.

Operation Notes

Returns access and status information about a file located on any device. The file must be opened by the calling process at the time of the FGETINFO call.

Condition Codes

CCE

Request granted.

CCG

Not returned.

CCL

Request denied. An error occurred.

Refer to this intrinsic in the MPE/iX Intrinsics Reference Manual (32650-90028) for other codes pertaining to KSAM files.

Feedback to webmaster