Overview | Statement List


阅读文件头

Synopsis

FHREAD/'filespec'[,IFERR,label:]

Description

This reads the header information of a specified file in the directory. The header information which is obtained is stored in the respective global parameter listed below.

Global Parameters

&CAREA

&CRDATE

&CRTIME

&DESCR

&DIR

&DIRPTH

&FLEN

&FNAME

&FORMAT

&FSTAT

&LADATE

&LATIME

&LMDATE

&LMTIME

&MCHFMT

&OWNER

&PCLASS

&RELNO

NOTE: &CRDATE, &CRTIME, &CAREA, &DESCR, &FSTAT, &MCHFMT and &RELNO are supported on native part files.

If your current file system does not support any of these header fields, the corresponding GPA will be set to:

If you want to use Global Parameter Access (GPA) symbols to extract the current file header information of a file before you modify it using the FHMOD statement, you must perform the FHREAD first, to load the current file header information into the GPAs.

NOTE: The FHREAD and DNEXT statements store information in the same global parameters and will overwrite each others data.

NOTE: FHREAD and FHMOD should be used together, as should PHREAD and PHMOD. Do not mix their usage (i.e., don't use FHREAD with PHMOD).

Parameters

Parameter

Description

'filespec'

The filespec is the pathname plus the filename you want. If the file you need is in your current directory, the filename will be sufficient to find it. If it is not, the full pathname to the directory will be required. The FHREAD statement requires that the file extension (e.g. .PRT, or .GRS) be specified if there is one. This command supports all file types.

IFERR,label:

Specifies a label to which the program jumps if an error occurs.


Copyright ©2015 胡君NX二次开发官网(www.UGapi.com) QQ:85585969 All Rights Reserved.