Previous Topic Next topic Print topic


CBL_OPEN_VFILE

Opens a heap.

Syntax:

call "CBL_OPEN_VFILE" using     heap-id
                                status-word
                      returning status-code

Parameters:

  Using call prototype (see Key) Picture
heap-id cblt-vfile-handle. pic x(2) comp-5.
status-word cblt-vfile-handle. pic x(2).
status-code See Library Routines - Key.

On Entry:

None

On Exit:

heap-id
The heap handle assigned. A heap handle of zero means the open failed.
status-word
The status word for the heap, set to zero on the open. When status-word (1:1) = '9', binary values in the second status byte are:
000 Heap closed by user request
001 Heap access failure - out of buffers
002 Heap deallocated while program inactive
014 Backing-file failure: too many files
037 Backing-file failure: file access denied
201 Backing-file failure: I/O failure
status-word remains associated with the heap until the heap is closed; the first byte is set to ASCII zero by a successful OPEN; status-word is written as file status data by a subsequent heap READ, WRITE or CLOSE that encounters allocation or I/O errors (but is not reset to zero by successful operations).
If a program in which a heap status word actually exists (that is, it is not in a Linkage Section) is canceled, all heaps with status words in that program are automatically canceled, and the heap identifiers (which might have been passed to other programs) should not be used any more.
Previous Topic Next topic Print topic