1 | Operation type | Input | Binary(4) |
2 | Operation status | Output | Binary(4) |
3 | Save data | Input | Char(*) |
4 | Length of save data | Input | Binary(4) |
5 | Save bytes read | Output | Binary(4) |
6 | Qualified user space name | Input | Char(20) |
7 | User space format name | Input | Char(8) |
The Save to Application exit program enables an application program to receive the save records that are generated by a save-to-save-file operation using the Save to Application (QaneSava) API.
The API calls the exit program once to start the transfer sequence, multiple times to transfer each block of save records, and once to end the transfer sequence.
The API passes to the exit program the operation type, the save data, the length of the save data, the qualified name of the user space and the format name of the user space.
The exit program must return the number of save bytes read, and status on the success or failure of the requested operation.
At any time following the initial call, the API could call the exit program that requires an abnormal end to the transfer sequence.
The exit program must read and store the save records in the order presented, without modification, for the objects to be successfully restored.
See Save to Application (QaneSava) API.
The type of operation that the exit program is required to run.
1 | Start The exit program must use this operation type to prepare for the save records transfer. |
2 | Transfer The exit program must use this operation type to transfer (copy, store, and so forth) a block of save records. |
3 | End The exit program must use this operation type to end the save records transfer. |
4 | Abnormal end The exit program must use this operation type to prematurely end the save records transfer. |
Normal-operation-type order is 1 (start), 2 (transfer), 2 (transfer), ..., 2 (transfer), 3 (end).
Operation type 1 (start) is issued only once at the beginning of the save operation before any save records are transferred.
Operation type 2 (transfer) is issued multiple times during the save operation as each block of save records becomes available. The exit program must read the entire block of save records.
Operation type 3 (end) is issued only once at the end of the save operation after all save records are transferred.
Operation type 4 (abnormal end) is issued only once following operation types 1 (start) or 2 (transfer), under abnormal conditions to prematurely end save records transfer. These conditions are:
The ending status of the requested operation.
0 | Good The exit program must return this status value to indicate successful completion of the operation. |
1 | Error The exit program must return this status value to indicate unsuccessful completion of the operation. |
A block of save records. This parameter is passed only on operation type 2 (transfer).
For operation types 1 (start), 3 (end), and 4 (abnormal end), this value is zero.
For operation type 2 (transfer), this is the length of the block of save records. The value for this parameter currently is 1 048 832 bytes for all but the last operation, which may be less.
For operation types 1 (start), 3 (end), and 4 (abnormal end), this value must be set to zero.
For operation type 2 (transfer), the exit program must return a value that indicates the number of save record bytes successfully read. The API abnormally ends the transfer sequence if the returned value does not equal the length of save data.
The qualified user space name specified by the application on the call to the Save to Application (QaneSava) API. The first 10 characters contain the user space name. The second 10 characters contain the name of the library where the user space is located.
The user space format name that is specified by the application on the call to the Save to Application API. For the format of the structure, see the SVRS0100 Format in the Save to Application (QaneSava) API. The exit program uses the length of application data field to determine if the structure contains application data, and the offset to application data field to locate this information.
Applications should consider the following when coding the exit program:
Top | Backup and Recovery APIs | APIs by category |