Using KSAM/XL and KSAM 64 (32650-90886)

Chapter 9 153
KSAM Intrinsics
HPFOPEN
HPFOPEN
Establishes access to a file and creates a file.
Syntax
I32 I32 I32V *
HPFOPEN(
filenum,status
[,
itemnum,item
] [...]);
NOTE
Up to 41
itemnum/item
pairs can be specified.
Parameters
filenum
32-bit signed integer by reference (required)
Returns a file number used to identify the opened file in subsequent
intrinsic calls.
Can be used safely with all file system intrinsics that require a 16-bit file
number to be passed in the intrinsic call (for example, FREAD, FWRITE,
FCLOSE).
status
32-bit signed integer by reference (optional)
Returns the status of the HPFOPEN call. If no errors or warnings are
encountered,
status
returns 32 bits of zero. If errors or warnings are
encountered,
status
is interpreted as two 16-bit fields:
Bits Value/Meaning
0:16 status.info
A negative value indicates an error condition, and a
positive value indicates a warning condition.
16:16 status.subsys
The value represents the subsystem that set the status
information. Refer to the MPE/iX Error Message Manual
Volumes 1, 2 and 3 for status messages.
CAUTION
If an error or warning is encountered and the
status
parameter was not
specified, HPFOPEN causes the calling process to abort.
itemnum
32-bit signed integer by value (optional)
Passes the item number, refer to Table 9-1.
item
type varies by reference (optional)
Passes and/or returns the option indicated by the corresponding
itemnum
parameter, refer to Table 9-1.