Any suggestions on how to code PCL to handle JCL // INCLUDE MEMBER(membername)?

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

The JCL INCLUDE statement is not supported in PCL. (It is listed in the PCL Guide as one of the JCL statements not supported in PCL. Please refer to the section in the guide titled "PCL and JCL Differences".)

However, here are two possible workarounds:

  1. Individual DD statements can be included from elsewhere in the same member to achieve multiple choice, or shared use. For example:
    //STEP1 EXEC ...//SYSLIB DD DSN=xxxx//     DO DD1//STEP2 EXEC ...//SYSLIB DD DSN=xxxx//     DO DD2//STEP3 EXEC ...//SYSLIB DD DSN=xxxx//     DO DD&X//    EXIT//DD1://SYSPRINT DD SYSOUT=X//   EXIT//DD2://SYSPRINT DD DUMMY//   EXIT

    (The last two EXIT statements cause a return to the statement following the DO which called DD1 or DD2, whereas the first exit statement causes the procedure to terminate as no DO is active.)

  2. Have a WHILE statement reading an array varariable which is created by reading an external member which is the actual DD list. This then provides the customer with the ability to change manage the DD list, without admin making any PCL changes.

This Frequently Asked Question applies to all supported releases of ESP Alchemist.