TRNWAIT

By using this function, you can wait for transfers to complete. You can wait for 1 to 10 transfers to complete by entering one or more transaction IDs. Optionally, you can wait for all transfers that have been queued by this script instance to complete by specifying ALL.

As transfers are queued, the scripting program keeps track of up to 200 transfers. TRNWAIT ALL waits for all transfers to compete. If all transfers are successful, the script variable %TRNSTAT is set to SUCCESS. If any transfer fails, the script variable %TRNSTAT is set to FAILED. When a transfer is not found, the status is neither SUCCESS nor FAILED, it is ignored.

Note: %TRNSTAT must includes 8 bytes and spaces must be included.

When using the TRNWAIT parameter to track transfers scheduled by the Script interface, you must use SNA or TCP to communicate with the started task.

The format of this function is TRNWAIT {ALL | TransId1 TransId2…TransId10}.