HPlogo HP 3000 Computer Systems: MPE/iX Architected Interface Facility:
Operating System Reference Manual
> Chapter 3 Architected Interface Descriptions

3.28 AIFKSMREAD

MPE documents

Complete PDF

 

Table of Contents

Index

 

⇓ Page Bottom

Syntax
Parameters
Operation Notes

⇑ Page Top



3.27 AIFKSMCREATE

3.29 AIFKSMWRITE

Sequentially reads a physical block of user-specified size from a KSAM/XL file.

Syntax


 I32                  REC             I32      A       I32
 lgth := AIFKSMREAD ( overall_status, filenum, buffer, bytes,

                      I32
                      user_id );
  

Functional Return

lgth

32-bit signed integer by reference (required)

Returns a positive integer value indicating the length of the information transferred.

Parameters

overall_status

record by reference (required)

Returns the overall status of the call. A zero indicates a successful call. A negative value indicates an error in the overall call. Refer to appendix A for meanings of status values.

filenum

32-bit signed integer by value (required)

An identifier supplying the file number of the file to be read.

buffer

character array by reference (required)

An array to hold a physical block of the KSAM/XL file. The content in the buffer returned from the first AIFKSMREAD after the KSAM/XL file is opened is used by AIFKSMCREATE to duplicate a KSAM/XL file. The contents returned from subsequent AIFKSMREADs are used by AIFKSMWRITEs to copy to the new KSAM/XL file.

The minimum buffer size is 10,240 bytes.

bytes

32-bit signed integer by value (required)

A positive integer specifying the number of bytes to be transferred. If this value is zero, no transfer occurs. If bytes is larger than the remaining physical block size, transfer is limited to the length up to EOF.

user_id

32-bit signed integer by value (optional)

The user ID assigned to a vendor at the time of purchase of the Architected Interface Facility: Operating System product.

Operation Notes

The AIFKSMREAD call reads a block from a KSAM/XL file in its physical sequence. The KSAM/XL file must have been opened in copy mode with MR and NOBUF options and read-only access in order to call this procedure. The first AIFKSMREAD after the file is opened transfers all of the necessary information required by AIFKSMCREATE. The buffer size and the bytes count must be large enough to hold the information to be passed to AIFKSMCREATE. The minimum size required may vary depending on the size of user labels. In the case where no user label exists in the file, the minimum size required is 10240 bytes. It is recommended that the buffer size and the bytes count be multiples of 4096 and 65536 bytes (16 pages). At the end of AIFKSMREAD procedure, the data pointer is positioned to the byte following the last byte being read. AIFKSMREAD transfers only the in-use areas and ignores the unused area in the KSAM/XL file. An end-of-file status is returned if AIFKSMREAD is called after the last byte of the file is transferred.

The AIFKSMREAD procedure returns a positive integer value to lgth showing the length of the information transferred. Both lgth and bytes in the AIFKSMREAD call must be positive numbers representing bytes counts.



3.27 AIFKSMCREATE

3.29 AIFKSMWRITE