MPE/iX Intrinsics Reference Manual (32650-90875)

Chapter 6 291
Command Definitions (FLUSHLOG-GETUSERMODE)
FWRITELABEL
FWRITELABEL
NM and CM callable.
Writes a user-defined label onto a disk file or magnetic tape file that is labeled with an
ANSI-standard or IBM-standard label. It also overwrites old user labels.
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 half words in length.
length
16-bit signed integer by value (optional)
Passes the number of half words or bytes passed by
buffer
. A positive
value is in half words; 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. If the file is on labeled magnetic tape, the
user-defined label must be 40 half words in length to conform to the length of the
ANSI-standard or IBM-standard label.
Condition Codes
CCE (2) Request granted.
CCG (0) 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 (1) Request denied. An error occurred.
Related Information
Manuals Accessing Files Programmer's Guide, Using KSAM XL, and KSAM/3000