Determining the Return Code for TYPE=SCHEDULE Transfers Using TYPE=INQUIRE

Document ID : KB000027731
Last Modified Date : 14/02/2018
Show Technical Document Details

Summary: 
How to determine if a transfer is successful when it is scheduled to another server with TYPE=SCHEDULE?

Background:  

Add a TYPE=INQUIRE job to capture the results of the transfer. The primary use of TYPE=INQUIRE is in batch job streams where some jobs or job steps are dependent upon the successful completion of other jobs or job steps that transfer files. The dependent steps can execute conditionally based on the return code issued by TYPE=INQUIRE.  

Unlike the TYPE=EXECUTE and TYPE=SCHEDULE modes, TYPE=INQUIRE does not initiate a file transfer. TYPE=INQUIRE examines the status of transfers that were previously initiated by TYPE=SCHEDULE. TYPE=INQUIRE waits until the transfers have completed or the specified timeout (INQWAIT) has passed and issues a return code reflecting the status of the transfers.  

There must be a unique XCOMINQ dataset for each group of interdependent transfers and the same //XCOMINQ DD dataset must be specified for each transfer in the group. Sample JCL for creating an XCOMINQ dataset is included in the CBXGJCL dataset for 11.6 and the  CBXGSAMP dataset for r12.  The XCOMINQ dataset must NOT be created in the same job step as the TYPE=SCHEDULE job.

Answer: 

  • When the //XCOMINQ DD card is included in a TYPE=SCHEDULE transfer, XCOM saves the request number assigned to that transfer in the dataset along with the time stamp for the transfer.
  • The timestamp ensures that the correct transfer will be examined in cases where there are duplicate request numbers in the history file.
  • TYPE=INQUIRE removes request numbers and time stamps from the XCOMINQ file if the requests have completed.
  • Request numbers and time stamps for transfers that have not completed are not removed from the XCOMINQ file.
  • At the termination of the job, the XCOMINQ dataset will not be empty if there were transfers that did not complete or file transfers with errors, and will need to be recreated before being used again.

TYPE=INQUIRE examines the transfer requests every 10 seconds until all the transfers have completed or the amount of time specified in the SYSIN01 INQWAIT= parameter has elapsed:

INQWAIT=hhmmss

If INQWAIT is omitted, the INQWAIT value from the xcom default table is used. If INQWAIT is not specified in the default table, INQWAIT defaults to 000100 (1 minute).

Additional Information:

The location of the Sample JCL is also included in Appendix C, Sample Files Of the CA XCOM User Guide.  Here is the link to the documentation for CA XCOM Data Transport for z/OS - 12.0

 

TEC312093 What return codes should I expect to receive with a TYPE=INQUIRE job?