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

FWRITELABEL

MPE documents

Complete PDF
Table of Contents
Index

E0300 Edition 4 ♥
E0394 Edition 3

Syntax Parameters Operation Notes Condition Codes

Writes a user-defined file label.

Syntax



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

Parameters


filenum

16-bit signed integer by value (required)

Passes the file number of the file to be labeled.

buffer

user-defined structure (required)

Passes the label to be written. If the file is a labeled magnetic tape file, this label must be 40 halfwords in length.

length

16-bit signed integer by value (optional)

Passes the number of halfwords or bytes to be written. A positive value is in halfwords; a negative value is in bytes.

labelid

16-bit signed integer by value (optional)

Passes the number of the label to be written. The first label is zero. This parameter is ignored for labeled tapes. The next sequential tape label is written. The default is zero.

Operation Notes


Once a disk file is opened, it is possible to read from or write to user-defined labels regardless of the access to the rest of the file.

Condition Codes


CCE

Request granted.

CCG

Request denied. The calling process attempted to write a label beyond the limit specified in the FOPEN/HPFOPEN intrinsic when the file was created.

CCL

Request denied. An error occurred.

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




FWRITE


HPFOPEN