difference between KEEP and PASS while using in JCL

All sort of Mainframes Interview Questions.
Nikhil Aryan
New Member
Posts: 9
Joined: Mon Feb 29, 2016 8:47 pm

difference between KEEP and PASS while using in JCL

Post by Nikhil Aryan »

Hi,

What is the difference between KEEP and PASS while using in JCL for dispositional parameters. Do they behave same for temp dataset but different for regular dataset?
User avatar
Anuj Dhawan
Founder
Posts: 2838
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:

Re: difference between KEEP and PASS while using in JCL

Post by Anuj Dhawan »

The KEEP and PASS parameters in JCL are used in the disposition (DISP) of a dataset. While they may appear similar at first glance, they have distinct behaviors, particularly when dealing with temporary datasets versus permanent datasets.

1. KEEP Disposition
  • Purpose: Retains the dataset after the job or step ends.
  • For Temporary Datasets (&&temp):
    • KEEP is not valid for temporary datasets. If specified, the job will result in an error because temporary datasets are automatically deleted at the end of the job unless passed explicitly.
  • For Permanent Datasets:
    • When KEEP is specified, the dataset is retained, but no catalog entry is created or updated unless explicitly defined elsewhere (e.g., VOL=SER parameter is provided).
    • If no VOL=SER or catalog information is provided, the dataset is not retrievable unless the exact volume serial number is known.
2. PASS Disposition
  • Purpose: Passes the dataset to the next job step.
  • For Temporary Datasets (&&temp):
    • PASS is used to pass the temporary dataset to a subsequent step in the same job.
    • The dataset is automatically deleted when the job ends, even if passed between steps.
  • For Permanent Datasets:
    • PASS is not typically used for permanent datasets because they are meant to be retained or cataloged, not passed temporarily between steps.
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Nikhil Aryan
New Member
Posts: 9
Joined: Mon Feb 29, 2016 8:47 pm

Re: difference between KEEP and PASS while using in JCL

Post by Nikhil Aryan »

Thank you for the explanation this really helps. I had been confusing it all over. 
Post Reply Previous topicNext topic

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “Interview Questions.”