• Rajesh A R

F1 for Mainframe

F1 for Mainframe

Tag Archives: referback

JCL TIPS

26 Thursday Jan 2012

Posted by rajeshar in JCL

≈ Leave a comment

Tags

ACCIDENT, AMORG, COMMENT, COND, DATASET, DELETE, DUMMY VSAM, iefbr14, JCL, jes2, JES3, JOBLIB, mainframe, NULL, PEND, referback, RESTART, STEPLIB, SYSUID, TAPE, TIME

——————————————————————————————————————–
TIP # JCL

Hero’s Method:
If you prefer a dataset to be not deleted accidentally, then
———————————————————————————————————————
USING IDCAMS USING JCL COMMENTS
———————————————————————————————————————
TO(04365) LABEL=RETPD=04365 Will protect till end of 2004
FOR(30) LABEL=RETPD=10 Will protect for 30 days
———————————————————————————————————————
Villain’s Method:
If by chance of fate, you want to delete a dataset that is protected by the above method…
Use IDCAMS DELETE command with PURGE option.
e.g.,
//STEP1 EXEC PGM=EXEC
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DELETE TOP.SECRET.DATA –
PURGE
/*

——————————————————————————————————————–
TIP # JCL

Is it possible to execute a program from any library using the referback?
The Answer is Yes!
//STEP1 EXEC PGM=IEFBR14
//PROGRAM DD DSN=SYSTEM.PGM.LOADLIB(COBOLPGM),DISP=SHR
//STEP2 EXEC PGM=*.STEP1.PROGRAM

——————————————————————————————————————–
TIP # JCL

How does the system differentiates between JCL comment statements (i.e., //* statements) and
JES3 Statements (which also start with //* ) ?
If the 4th column contains JES3 keyword, the line is considered to be JES3 statement, else it is
considered as normal JCL statement.

——————————————————————————————————————–
TIP # JCL

We know JES2 and JES3 , but is there any JES1?
OS/VS1 (the forefather of MVS) supported only one job entry subsystem namely JES1

——————————————————————————————————————–
TIP # JCL

Consider this situation.
I have a JCL with 10 steps.
For reasons known only to me, I want to execute step 5 only.
How can I do it?

One way to do it is to use RESTART from STEP05, but it will try to execute the
subsequent steps too.
We have to insert null statement after step05 to prevent the execution of
subsequent steps.
But one decent way is there in which we don’t need to touch the job steps
code, but alter only the Jobcard.
And that is….
In the JOBCARD, code COND parameter. Then, when the Job is executed , only
the Step mentioned in the RESTART parameter will get executed.
e.g., RESTART=STEP05,COND=(0,LE)

——————————————————————————————————————–
TIP # JCL
We know that JOBLIB statement must be placed after the JOB statement and before the first
EXEC statement in the job.
But, the STEPLIB statement can be placed anywhere in the particular step’s JCL (not necessarily
the first DD statement in the STEP).

——————————————————————————————————————–
TIP # JCL

Here is a quick question. Can Catalog Procedure have PEND
statement?
Yes! Now it can have PEND Statement.
Do check it out….

——————————————————————————————————————–
TIP # JCL

How much data can TAPE store??
A typical tape reel might contain 170 MB whereas tape cartridges can contain as much as
10GB.
(Source: System 390 JCL by Gary DeWard Brown)

——————————————————————————————————————–
TIP # JCL
Do you know why null statement was introduced in JCL?
Back when punched cards were used, a null coded on distinctive colored cards was used to help
operators separate card decks. ( Hence , it helped to identify the end-of-job card, and the start of
next job for the operators)
(Source: System 390 JCL by Gary DeWard Brown)

——————————————————————————————————————–
TIP # JCL

Do you know why JCL has ‘//’ in col 1& 2 in each Statement??
The Slashes date back from when PUNCHED CARDS were used to submit JCL code for
execution. If the cards were mistakenly put back to front in the reader, the slashes wouldn’t be
read first and so the card deck could be rejected. So ‘//’ ensures that the punched cards are placed
properly!!
(Source: System 390 JCL by Gary DeWard Brown)

——————————————————————————————————————–
TIP # JCL

How can I specify dummy VSAM dataset in a JCL?
Code AMP=’AMORG’ . This parameter tells the OS to treat the file as VSAM file.
//NOVSAMIO DD DUMMY,AMP=’AMORG’

——————————————————————————————————————–
TIP # JCL
I can specify the max limit of TIME parameter as
TIME=NOLIMIT or
TIME=MAXIMUM.

Now which specification gives maximum time for a JOB?
TIME=MAXIMUM will allow the job to run for 357912 minutes (248.55 days)
TIME=NOLIMIT will allow the job for unlimited amount of time
Another advantage of NOLIMIT option is that it can remain in wait status for more than the installation
time limit.

——————————————————————————————————————–
TIP # JCL
I want to delete a member in a PDS, but someone is using it. How can I delete it?
One can use the following JCL
//DELMEMB EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//PDS DD DSN=libraryname,DISP=SHR
//SYSIN DD *
ALLOC DDN(INFILE) SHR REUSE DSN(‘libraryname’)
DELETE libraryname(membername) FILE(PDS)

——————————————————————————————————————–
TIP # JCL
&SYSUID is a “system symbol” for which the system substitutes your TSO ID.
It is the only system symbol that can be used in a batch job, and can be useful when more than one
individual submits the same JCL.

——————————————————————————————————————–
TIP # JCL
I am overriding 2 DD statements in a PROC from my JCL. The first DD statement is in step 10 and
second DD statement is in step 40.
Usually , I specify as
//PS010.INPUT DD DSN=MYID.DATASET
//PS040.SYSIN DD DSN= MYID.NEW.DATASET
What will happen if I specify step 40 first and step 10 next?
zOS JCL will process it! It will override irrespective of the order it is specified. Formerly out-of-order DD
overrides were ignored.


If you would like to Earn Free Stocks, Credit card Points and Bank account Bonuses, Please visit My Finance Blog

You may also like to look at:

Important SQL CODES and ABEND CODES
SORT JOIN – TO JOIN TWO FILES BASED ON A KEY
KNOW YOUR MAINFRAME
REXX – INITIAL SETUP
IDCAMS – Define VSAM ESDS
IDCAMS – Define VSAM RRDS
IDCAMS – Define VSAM KSDS
IDCAMS – Define Alternate Index (AIX)
IDCAMS – Define PATH for Alternate Index
IDCAMS – Define GDG
IDCAMS – Alter GDG, VSAM or PS File
IDCAMS – Delete GDG, VSAM or PS File
IDCAMS – Print VSAM File
IDCAMS
Recovery of Deleted Tape data set (Using Volume Serial)
JCL – SYSIN CONCATENATION
JCL – RUN ONLY ONE MIDDLE STEP (RESTART)
GDG – Delete Just Versions Not BASE
JCL – COPY DCB OF INPUT FILE TO OUTPUT FILE
HOW TO SUBMIT A JOB AUTOMATICALLY AFTER A JOB FINISHES
DELETE ALL GDG VERSIONS WITHOUT DELETING BASE
LISTCAT – BATCH JOB
IEBCOPY Examples
IEBGENER – INTERNAL READER TO SUBMIT
Delete Multiple datasets with same HLQ
JCL INTERVIEW QUESTIONS
JCL TIPS
Advertisement

Rate this:

Subscribe

  • Entries (RSS)
  • Comments (RSS)

Archives

  • November 2020
  • July 2020
  • February 2020
  • January 2020
  • September 2019
  • August 2019
  • October 2018
  • April 2018
  • March 2018
  • December 2017
  • October 2017
  • August 2017
  • July 2017
  • June 2017
  • April 2017
  • March 2017
  • February 2017
  • January 2017
  • December 2016
  • May 2016
  • March 2016
  • February 2016
  • January 2016
  • May 2015
  • September 2013
  • August 2013
  • July 2013
  • June 2013
  • May 2013
  • January 2013
  • December 2012
  • November 2012
  • April 2012
  • March 2012
  • February 2012
  • January 2012
  • April 2011
  • March 2011
  • August 2009
  • June 2009
  • April 2009

Categories

  • Azure
  • CA7
  • CICS
  • COBOL
    • Keywords
  • DB2
  • EASYTRIEVE
  • FILEAID
  • FILEMAXX
  • IMS
  • ISPF
  • JCL
  • KNOW YOUR MAINFRAME
  • Mainframe Migration
  • MAINFRAMES
  • Others
  • REXX
  • SDSF
  • SORT
  • Training
  • TSQL
  • VSAM

Meta

  • Register
  • Log in

Create a free website or blog at WordPress.com.

  • Follow Following
    • F1 for Mainframe
    • Join 88 other followers
    • Already have a WordPress.com account? Log in now.
    • F1 for Mainframe
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar