z/OS MVS JCL Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF

Testing a procedure

z/OS MVS JCL Reference

Before putting a procedure into a system procedure library, you should test it. There are two ways to test a procedure:
  • Place a PROC statement before the procedure and a PEND statement after it and place it in a job input stream. For the test, call this in-stream procedure with an EXEC statement that appears later in the same job.
  • Put a procedure to be tested in a private library, identify the library on a JCLLIB statement, and call the procedure with an EXEC statement.
After testing a procedure, the type of environment in which you are running the job determines where you can catalog it.
  • In an APPC scheduling environment: Catalog the procedure in a private library, and define the library with a JCLLIB statement.
  • In a non-APPC scheduling environment: Catalog the procedure in the system procedure library SYS1.PROCLIB, an installation-defined procedure library, or a private library. Cataloging the procedure in the system procedure library allows anyone to use the procedure by calling it with an EXEC statement.

Cataloged and in-stream procedures are not checked for correct syntax until an EXEC statement that calls the procedure is checked for syntax. Therefore, a procedure can be tested only if an EXEC statement calls it.

Go to the previous page Go to the next page

Copyright IBM Corporation 1990, 2014