HPlogo Using KSAM XL: 900 Series HP 3000 Computer Systems > Chapter 3 Obtaining File Information

Accessing File Information from a Program

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

The FGETINFO intrinsic obtains a file's access and status information based on the parameters identified in the intrinsic call. Embedded parameters that are not desired are indicated by commas. Parameters omitted from the end of the list do not need to be indicated.

In the following example, the intrinsic call returns the end of file in the variable named LSTREC. This number represents the physical number of the last record in the file if the REUSE option has not been specified. This variable can be used to position a pointer to read the last physical record with the FREADC or FREADDIR intrinsic.

   FGETINFO(FILENO,,,,,,,,,,LSTREC);

The FGETINFO intrinsic returns the following file information.

  • The fully qualified file name.

  • The foptions specified in the format of the FOPEN intrinsic.

  • The aoptions specified in the format of the FOPEN intrinsic.

  • The logical record size associated with the file.

  • The type and subtype of the device being used for the file.

  • The logical device number associated with the device on which the file resides.

  • The hardware address of the device.

  • The data file code.

  • The current physical record pointer setting.

  • The number of logical records currently in the data file.

  • The number of the last logical record that could be contained by the file.

  • The total number of logical records passed to and from the user during the current access of the file.

  • The block size of the file.

  • The disk extent size associated with the file.

  • The maximum number of disk extents allowed for the file.

  • The number of user labels allowed for the file.

  • The name of the user who created the file.

  • The sector address of the label of the file.

Feedback to webmaster