HPlogo Using KSAM XL and KSAM 64 > Chapter 9 KSAM Intrinsics

FREADLABEL

MPE documents

Complete PDF
Table of Contents
Index

E0300 Edition 4 ♥
E0394 Edition 3

Syntax Parameters Operation Notes Condition Codes

Reads a user-defined file label.

Syntax



              I16V     UDS     I16V    I16V
  FREADLABEL (filenum, buffer, length, labelid);

Parameters


filenum

16-bit signed integer by value (required)

Passes the file number of the file whose label is to be read.

buffer

user-defined structure (required)

Returns the label that was read. This structure must be large enough to hold the number of halfwords specified by length.

length

16-bit signed integer by value (optional)

Passes the number of halfwords to be transferred from the label. This field must not be greater than 128 halfwords.

Default: 128 halfwords

labelid

16-bit signed integer by value (optional)

Passes the label number. (The first label is numbered zero.)

Default: Zero

Operation Notes


When a disk file is opened, user labels can be read from it, or written to it, in any order, at any time, regardless of access capabilities to the rest of the file. A disk file can have as many as 254 128-halfword user-defined labels.

Condition Codes


CCE

Request granted. The label was read.

CCG

Request denied. A label was referenced beyond the last label written on the file.

CCL

Request denied. The label was not read; an error occurred.

Refer to this intrinsic in the MPE/iX Intrinsics Reference Manual for other codes pertaining to KSAM files.




FREADDIR


FREMOVE