JCL: Identify and Correct a Syntax Error
Part Two - Challenge #06

In this challenge you are introduced to identifying and correcting JCL syntax errors.Let’s fix some JCL.

Background:

You will identify and correct a JCL error

JCL with errors do not execute. Therefore, JCL errors are harmless.

System messages report the syntax error for you to correct. Do not worry about being perfect with JCL. If a syntax error exists, the system helps identify error.


System Utilities

System utility programs are shipped with the operating system. Experienced z/OS technicians take time to learn about the system utility programs. Reason - why write a program to accomplish a task when a system utility program exists to accomplish the task.

A simple system utility, IEBGENER, is used in this challenge.

IEBGENER documentation explains the following:

  • IEBGENER utility is a copy program.
  • SYSPRINT ddname is required for program execution messages.
  • SYSUT1 ddname is input.
  • SYSUT2 ddname is output.
  • SYSIN ddname is required and used for more complex copy operations requiring control command input that IEBGENER understands.

Assumptions made in challenge 6 instructions

Assumption is made that you understand how to:

  • Use ISPF 3.4 panel or DSLIST command to list data set names
  • Use ISPF Editor to modify data set names and/or data set member names
        Remember ISPF Editor Command Summary in References drop down
        and F1 for online ISPF Editor help tutorial
  • Use SDSF to locate and view your JCL job output

If you struggle with the increasingly abbreviated instructions related to
ISPF, ISPF Editor, and SDSF, then review previous challenges such as this challenge.

Challenge 6 is without explicit screen shots demonstrating you know how to accomplish various tasks using briefly written instructions.


Challenge:

Create a new member in your JCL partitioned data set
  1. List and edit your JCL partitioned data set.
  2. Select s p2ch6 to create a new member named p2ch6
      which is initially an empty member in your JCL partitioned data set
  3. From ISPF editor primary command line enter copy 'zos.public.jcl(p2ch6)'

Review JCL syntax in member name P2CH6
Observe the following:
  1. EXEC PGM=IEBGENER
  2. SYSPRINT ddname output is redirected to JES spool using SYSOUT=*
  3. SYSIN ddname input is redirected to DUMMY meaning no control commands are given to the program.
  4. SYSUT1 ddname is the copy input where DD * means what follow is text data.
    *Note: SYMBOLS=CNVTSYS is a relatively new JCL feature enabling substitution of system known variables.
  5. SYSUT2 ddname is the copy output redirected to member name #06 in your P2.OUTPUT partitioned data set.

Submit JCL and review JCL job output to identify JCL syntax error
  1. From the ISPF editor primary command line, enter submit ; =sd ; st
  2. From the SDSF status panel, tab to the left of P2CH6 JCL job output owned by your id, and enter s to select the JCL job output
  3. Observe the following in P2CH6 JCL job output:
      Message P2CH6 - JOB NOT RUN - JCL ERROR
      Last line 3 IEFC662I INVALID LABEL
      Look up a few lines and find JCL line 3
      Big Hint - JCL DDNAMEs must be uppercase - you might have observed it earlier
The simple example is how to identify JCL syntax errors. The bottom of the output in the JESYSMSG will report the JCL line number where the system recognized a problem existed with brief explanation of the problem.

A quick word about those JCL errors, from Colton and Sara...


Fix the JCL syntax error, resubmit the corrected JCL, and review the output for success
  1. List and edit your JCL partitioned data set.
  2. Select s a new member name, P2CH6
  3. Correct the JCL syntax error using ISPF editor
  4. From the ISPF editor primary command line, enter submit ; =sd ; st
  5. From the SDSF status panel, tab to the left of P2CH6 JCL job output owned by your id, and enter s to select the JCL job output
  6. If P2CH6 JCL job output shows 00 under column RC, then a return code of 00 is success
  7. If P2CH6 JCL error persists, then you will need to identify and correct the JCL error to complete the challenge

Review successful completion
  1. List and browse b your P2.OUTPUT partitioned data set.
  2. Select s member name #06 to be browsed.
  3. Observe values were written into member #06 for system symbols &YYMMDD &HHMMSS &SYSNAME
If you are curious and want to see available system symbols that can be used in variety of ways, then from SDSF primary option menu, enter sym. Other uses of system symbol substitution are explored in future challenges.

You practiced what you learned in the previous challenge and demonstrated ability to use the classic z/OS interfaces to accomplish tasks with brief instructions. Congratulations!

Next: Challenge #07