Saturday, 10 August 2013

JCL Miscellaneous Features: Restart, PRTY, and XMIT

A job ends in STEP030, a tape data set crosses a volume boundary, or a remote job stream must be sent to another JES node. JOB, EXEC, and DD statements cover ordinary batch work, but z/OS JCL also supplies less-used controls for these cases. This guide shows what each feature does, where it belongs, and when a dedicated reference is the safer next stop.

JCL miscellaneous features grouped into recovery, data, control, and job-stream categories
Less-used JCL controls cover recovery, record handling, job selection, commands, and network transmission.

JCL miscellaneous features at a glance

RequirementJCL featureMain caution
Restart after a failed stepJOB RESTARTReview bypassed steps, catalog state, and temporary data sets.
Permit or suppress automatic restartJOB or EXEC RDInstallation rules and operator authorization still apply.
Checkpoint a sequential data set at end of volumeDD CHKPT=EOVOnly supported data set and processing combinations qualify.
Store records longer than one blockRECFM=VS or VBSThe program and access method must support segmented records.
Request job-selection priorityJOB PRTYJES policy can ignore or override the request.
End or delimit a job streamNull statement //JES2 and JES3 handling differs.
Issue a system or JES command during conversionCOMMANDIt is not synchronized with step execution.
Transmit records to another network nodeXMITDestination, delimiter, JES support, and security must be checked.

Step restart with the RESTART parameter

Code RESTART on the JOB statement when a resubmitted job must begin at a named step or at a step inside a procedure. The simple forms are RESTART=stepname, RESTART=stepname.procstep, and RESTART=*. The asterisk requests restart at the first step.

//PAYRERUN JOB (ACCT),'PAYROLL',RESTART=STEP030
//STEP010  EXEC PGM=EXTRACT
//STEP020  EXEC PGM=SORT
//STEP030  EXEC PGM=PAYCALC

Restarting at STEP030 does not recreate outputs from skipped steps. Confirm that every required input still exists and that DISP processing from the failed run did not catalog, delete, or retain an incompatible data set. Use the separate JCL RESTART parameter guide for procedure-step and checkpoint forms.

Automatic restart control with RD

The RD parameter can appear on a JOB or EXEC statement. IBM defines four values: R, RNC, NR, and NC. They control whether automatic restart may be offered and whether CHKPT activity is suppressed. For example:

//PAYJOB JOB (ACCT),'PAYROLL',CLASS=A,RD=R
//STEP01 EXEC PGM=PAYRUN

RD=R permits the operator to authorize an automatic step or checkpoint restart after a restartable abend. It does not guarantee that restart will occur. The abend must be eligible, the installation must support the request, and the operator must authorize it. IBM notes that RD is ignored for a started task.

End-of-volume checkpoints with CHKPT=EOV

CHKPT=EOV on a DD statement requests a checkpoint when a sequentially processed data set reaches end of volume. IBM restricts it to qualifying QSAM or BSAM data sets, such as a multivolume data set or a later data set in a sequential concatenation.

//STEP01  EXEC PGM=LONGRUN,RD=NR
//OUTFILE DD DSN=USER.PAYROLL.ARCHIVE,
//            DISP=(NEW,CATLG,DELETE),
//            UNIT=TAPE,VOL=(,,,5),CHKPT=EOV
Do not add CHKPT=EOV as a generic recovery switch. SYSOUT, DDNAME, DYNAM, the checkpoint data set itself, and unsupported processing combinations have specific restrictions. Check the IBM rule for the installed z/OS release.

Spanned records with RECFM=VS or VBS

A variable spanned record can cross block boundaries. VS means variable spanned, while VBS adds blocking. Segments are stored in consecutive blocks and reassembled as one logical record by a supporting access method. This can accommodate a logical record that is larger than a physical block.

//LONGREC DD DSN=USER.LONG.RECORDS,
//           DISP=(NEW,CATLG,DELETE),
//           SPACE=(CYL,(10,5)),
//           DCB=(RECFM=VBS,LRECL=12000,BLKSIZE=0)

The application must be designed for the record format; JCL cannot make an incompatible program process segmented records correctly. Review the separate JCL spanned-record guide before choosing LRECL, access method, and data class attributes.

Data set protection is an authorization decision

RACF data set profiles determine who can read, update, or alter protected data. For a new supported data set, PROTECT=YES can request creation of a discrete RACF profile as part of allocation:

//SECURE DD DSN=USER.PAYROLL.DATA,
//          DISP=(NEW,CATLG,DELETE),PROTECT=YES,
//          SPACE=(CYL,(5,2)),UNIT=SYSDA

DISP, RETPD, and EXPDT manage disposition or retention; they do not replace RACF authorization. Generic RACF profiles are often the site standard. Coordinate naming and access with security administration, and consult the JCL data set protection guide.

Job selection priority with PRTY

PRTY is an optional JOB parameter that requests a job-selection priority within a JES2 class or JES3 class group. A higher value can make a job eligible sooner relative to lower-priority work, but IBM warns that JES2 initialization options may ignore PRTY and that several scheduling factors affect execution order.

//MONTHEND JOB (ACCT),'CLOSE',CLASS=A,PRTY=10

Do not use PRTY as a dependency mechanism. If JOBB must wait for JOBA, use the scheduler or the site's supported dependency controls. The JCL JOB card guide covers the rest of the JOB statement.

The JCL null statement

A null statement contains // in columns 1 and 2 with the remaining columns blank. IBM's statement table describes it as an end-of-job marker, but JES behavior matters: JES2 normally ignores a null statement in a job, whereas JES3 uses it to mark the end. JES2 can be configured with NULLJCL=EOF to honor end-of-job semantics.

//JOBONE  JOB (ACCT),'ONE'
//STEP01  EXEC PGM=IEFBR14
//

A null statement is different from //*, which begins a JCL comment, and from /*, which is the default in-stream data delimiter. Those three short forms are easy to confuse during manual edits.

In-stream operator commands

The COMMAND statement asks the system to issue an MVS or JES command when the submitted JCL is converted. IBM recommends COMMAND over the older JCL command form because it uses standard JCL syntax and can be continued when necessary.

//SHOWIPL COMMAND 'D IPLINFO'

Execution is normally tied to conversion, not to the execution of a particular job step. The system can notify the operator and request authorization, depending on installation policy. Do not place a production action here when it must occur at an exact point in the job. Use the JCL command quick reference for statement forms and site checks.

Program control groups with CNTL and ENDCNTL

CNTL and ENDCNTL surround program-control statements that are passed to a subsystem. Do not place ordinary JCL statements inside that group. A labeled CNTL group can be referenced by a DD statement in the applicable job or procedure context.

//CTL01    CNTL
  subsystem program-control statements
//CTL01    ENDCNTL

The permitted statements and reference method depend on the subsystem. Keep the group next to its documented use and follow the placement rules in the JCL CNTL and ENDCNTL guide.

Network transmission with XMIT

XMIT sends a sequence of 80-character input-stream records to another network node. IBM documents support on JES2 and JES3, with differences such as JES2 not supporting the SUBCHARS operand. The transmitted records continue until the default /* delimiter or the delimiter named by DLM.

//SENDJOB XMIT DEST=NODE2.USER01
//REMOTE  JOB (ACCT),'REMOTE'
//STEP01  EXEC PGM=IEFBR14
/*

Do not nest XMIT statements. Confirm the destination naming convention, routing authority, delimiter, and receiving-node requirements with operations. The JCL XMIT guide provides a focused example.

How these features fit together

These controls operate at different stages. RESTART is evaluated for a resubmitted job; RD and CHKPT affect recovery policy; DCB attributes describe records; RACF checks access; PRTY influences JES selection; COMMAND can run during conversion; CNTL groups feed a subsystem; and XMIT routes an input stream. Similar-looking placement does not make them interchangeable.

Scope rule: use this page to identify the right control, then use the dedicated article and current IBM documentation for its full syntax. Start with the JCL tutorial when JOB, EXEC, and DD statement roles are not yet familiar.

Common mistakes and diagnostic clues

  • Restarting past required work: STEP030 runs with a stale or missing file because STEP010 and STEP020 were skipped.
  • Expecting RD=R to force recovery: the abend or installation policy is not eligible for automatic restart.
  • Using CHKPT=EOV on an unsupported DD: the job receives a JCL error or no checkpoint is taken.
  • Treating VBS as only a JCL change: the program cannot process spanned input correctly.
  • Using retention as security: a data set is retained but not protected by the required RACF profile.
  • Assuming PRTY guarantees sequence: the scheduler or JES policy selects another job first.
  • Confusing //, //*, and /*: a comment or data stream ends unexpectedly.
  • Expecting COMMAND to wait for a step: conversion issues it before the intended program event.

Submission review checklist

  1. Identify whether the requirement concerns conversion, selection, execution, recovery, data, security, or routing.
  2. Confirm whether JES2, JES3, the scheduler, or another subsystem owns the behavior.
  3. Check statement placement, continuation, and columns 1 through 71.
  4. Validate symbolic names, node names, data set attributes, and step names against the target system.
  5. Run a JCL syntax check when the site provides one.
  6. Save JESJCL, JESMSGLG, JESYSMSG, allocation messages, and subsystem diagnostics when a test fails.

IBM z/OS references

JCL miscellaneous features FAQ

Does PRTY guarantee that my job runs first?

No. PRTY requests a selection priority, but JES initialization, class policy, scheduling controls, and available initiators also affect when a job runs.

What is the difference between //, //*, and /* in JCL?

// with the remaining columns blank is a null statement, //* starts a comment, and /* is the default delimiter for in-stream data.

Can a COMMAND statement run after a specific job step?

Do not depend on that timing. The system normally issues an in-stream COMMAND during JCL conversion, so it is not synchronized with step execution.

When should I use RECFM=VBS?

Use VBS when variable logical records may span physical blocks and the program, access method, and data set design all support segmented records.

Final check: identify which z/OS component owns the requested behavior before adding a rare keyword to production JCL.

No comments:

Post a Comment

New In-feed ads