The IOAMEM module attributes are
RENT, AMODE=31 RMODE=24
Upon entry, the value of AMODE is saved. AMODE is set to 31 to handle addresses above the 16MB line. Upon return, the original value of AMODE is restored.
Storage for the handler is obtained below the 16 MB line and is saved in the handler address. The caller must not modify the handler address between the first call and the FINISH request call to module IOAMEM.
The handler address is returned in field IMHNDLR, which is mapped by macro IOAMMEM.
When invoking macro IOAMEM with parameter HANDLE=addr, the field that contains the handler address is not modified by macro IOAMEM. If more than one handler is used in the same program, save the handler address and invoke macro IOAMEM with the proper handler address in parameter HANDLE=addr.
It is not necessary to provide a buffer address for GETMEM, DIRECTOR, DIRALL, and DIRFULL requests.
If the buffer address is not passed (field value is zero), module IOAMEM obtains storage above or below the 16MB line. The number of records in the storage buffer is determined as follows:
The actual buffer size is the number of records in the buffer times the LRECL of the input dataset, plus 16 bytes for the header.
Module IOAMEM does not free any buffer the caller uses. If module IOAMEM obtains a storage buffer address on behalf of a caller, the caller must free this storage. The caller can free the buffer by using macro IOAXAGR. Field IMBUFARD points to the real buffer address + 16 bytes. The length of the buffer is in offset 4 from the beginning of the header.
If the buffer address is passed (field value is not zero), IOAMEM treats the value of IMRECNUM as the actual buffer size (in records). Therefore, to prevent storage protection violations, do NOT specify a value of IMRECNUM that exceeds the actual buffer size (in records).
If the buffer address is passed (field value is not zero) and the buffer size is insufficient, module IOAMEM ends with a return code of 08 and a reason code of 24. The actual number of records the member contains is returned in field IMRECNUM.
If the buffer address is not passed (field value is zero), module IOAMEM returns with a buffer that contains the entire member. The number of records in the buffer is returned in field IMRECNUM.
Macro IOAMEM checks whether parameter IOAMEMA has been supplied. If this parameter has been supplied, macro IOAMEM uses the supplied address. Otherwise, macro IOAMEM loads the IOAMEM module before invoking it and deletes it upon return.
GETMEM, GETLINE and PUTMEM requests support reading and writing members with record lengths other than 80 bytes. The GETLINE request can read members with variable record lengths.
The DIRECTOR, DIRALL, and DIRFULL functions accept a member name in the MEMBER sub-parameter of the IOAMEM macro. The member name may include masking characters. For example
MEMBER==CL8’*’ |
All members are included in the directory list (the same as a null MEMBER= parameter or MEMBER=0)
MEMBER==CL8'A?*' |
All members that begin with the character A and have a total length of at least 2 characters are included in the directory list.
The DIRALL request provides similar functionality as the DIRECTOR function and additionally supports concatenated files for the given DD name. When DIRECTOR is used, each buffer entry length is 11 bytes — 8 bytes for the member name, and 3 bytes for the TTR. When DIRALL is used, each buffer entry length is 52 bytes — 8 bytes for the member name, and 44 bytes for the library name in which the member exists.
The FINISH request cleans up the environment, closes all opened DCBs, and frees all I/O buffers and the handler storage.
Module IOAMEM must be called with a FINISH request. Otherwise, some DCBs may remain open and some storage buffers may remain allocated.
When trying to access a DFHSM migrated dataset, IOAMEM will behave as follows:
The parameter list passed to IOAMEM is mapped by the IOAMMEM macro as follows:
Table 324 Mapping of Parameter List by IOAMMEM Macro
Type |
Field Name |
Input/Output Fields |
Length |
---|---|---|---|
In |
IMREQ |
Request/Function |
CL8 |
In/Out |
IMHNDLR |
Handler address |
AL4 |
In/Out |
IMBUFADR |
Buffer address |
AL4 |
In/Out |
IMRECNUM |
Buffer size in records unit |
AL4 |
In |
IMFRMREC |
Read from record number |
AL4 |
In |
IMMCTADR |
MCT address |
AL4 |
In |
IMDSNAME |
Dataset name |
CL44 |
In |
IMMEMBER |
Member name |
CL8 |
In |
IMDDNAME |
DD name |
CL8 |
In |
IMUSERID |
User ID |
CL8 |
In |
IMBUFFMT |
Buffer format |
CL1 Vector/Double pointers |
In |
IMACT |
Action for PUTMEM |
CL1 Add/Replace |
In |
IMISPFS |
ISPF statistics |
CL1 Yes/No/Blank |
In |
IMBFLOC |
Buffer location |
CL1 Above/Below |
In |
IMESTAE |
ESTAE |
CL1 Yes/No |
In |
IMDUMP |
DUMP when ESTAE is yes |
CL1 Yes/No |
Out |
IMRC |
Return code |
AL2 |
Out |
IMRSN |
Reason code |
AL2 |
Out |
IMLRECL |
LRECL of dataset |
AL2 |
Out |
IMBLKSIZ |
Blocksize of dataset |
AL2 |
Out |
IMRECFM |
RECFM of dataset |
CL2 |
Out |
IMDSORG |
DSORG of dataset |
CL2 |
Out |
IMABENDC |
Abend code |
CL10 |
Table 325 Return Codes and Reason Codes
RC |
RSN |
DIRFULL |
DIRECTOR/DIRALL |
DELMEM |
MEMSTAT |
---|---|---|---|---|---|
00 |
00 |
OK |
OK |
OK |
OK |
04 |
00 |
|
|
|
|
|
04 |
|
|
Requested member does not exist in dataset |
|
08 |
00 |
Directory list is empty |
Directory list is empty |
Member name has not been supplied |
Same |
|
04 |
Dataset is not PDS or PDSE |
Same |
Same |
Same |
|
08 |
Insufficient storage GETMAIN failed |
Same |
Same |
Same |
|
12 |
OPEN for dataset failed |
Same |
Same |
Same |
|
16 |
|
|
|
|
|
20 |
|
|
|
Member does not exist |
|
24 |
Buffer is full Actual number of records returned |
Same |
|
|
|
28 |
|
|
ENQ failed |
|
|
32 |
The dataset is migrated and a RECALL request has been submitted to HSM |
Same |
Same |
Same |
12 |
Reason code from STOW |
|
|
STOW for DELETE failed |
|
Table 326 Return Codes and Reason Codes (GETMEM, GETLINE, PUTMEM)
RC |
RSN |
GETMEM |
GETLINE |
PUTMEM |
---|---|---|---|---|
00 |
00 |
OK |
OK |
OK |
04 |
00 |
|
End of file reached |
|
|
04 |
|
|
Replace was specified for a non-existing member, changed to Add |
08 |
00 |
Member name has not been supplied |
Same |
Same |
|
04 |
Dataset is not PDS or PDSE |
Same |
Same |
|
08 |
Insufficient storage GETMAIN failed |
Same |
Same |
|
12 |
OPEN for dataset failed or |
Same |
Same |
|
16 |
RECFM is not F or FB |
|
Same |
|
20 |
Requested member does not exist |
Same |
Add was specified for an existing member |
|
24 |
Buffer is full Actual number of records returned |
|
|
|
28 |
|
|
ENQ failed |
|
32 |
The dataset is migrated and a RECALL request has been submitted to HSM |
Same |
Same |
12 |
Reason code from STOW |
|
|
STOW for ADD/REPLACE failed |
Table 327 Return Codes and Reason Codes (ALLOC, DEALLOC)
RC |
RSN |
ALLOC |
DEALLOC |
RECALL |
---|---|---|---|---|
00 |
00 |
OK |
OK |
The request has been submitted |
04 |
00 |
|
DDNAME is not allocated |
|
08 |
00 |
DDNAME is already allocated |
|
|
|
04 |
|
|
The environment is not authorized to issue SVC 34 |
|
08 |
|
|
Unable to obtain storage for ARCHSEND macro, total length required is 54+200 bytes below the 16 MB line |
|
32 |
The dataset is migrated and a RECALL request has been submitted to HSM |
|
|
16 |
RC |
|
|
RC is the return code from ARCHSEND macro |
Table 328 Return Codes, Reason Codes and Descriptions
RC |
RSN |
Description |
---|---|---|
16 |
00 |
Unknown request type |
|
04 |
Neither dsname nor ddname have been supplied |
|
08 |
Requested dataset is not cataloged |
|
12 |
Dynamic allocation failed for the requested dataset |
|
16 |
ESTAE caught an ABEND |
|
20 |
The requested DSNAME is not in the concatenation of the given DDNAME. |
|
24 |
Requested dataset does not exist on the volume pointed to by the catalog |
|
28 |
Dynamic allocation/deallocaton failed for the requested dataset/ddname |
|
32 |
Requested dataset is migrated by HSM |
Table 329 Return Codes and Reason Codes from Librarian/Panvalet
RC |
RSN |
All functions |
---|---|---|
20 |
04 |
EOD reached |
|
08 |
Open failed for Librarian/Panvalet dataset |
|
12 |
Member not found |
|
16 |
Read record error |
Parent Topic |