Question

  Asked: Jul 10 2006   7:18 AM GMT
  Asked by: programming44


problem while accessing a Temporary dataset


Mainframe, 390, DB2, Zseries



hello,

i have about 25 steps in my jcl, in the 4th step i have created a temporary data set and passed it to subsequent steps(5th,6th,9th and so on).

while accesing it in the 7th step an ABEND occurs and the job terminates abnormally.
now i want my jcl to RESTART from step 7th itself.

how would i do that.

thanx in advance

Subscribe to Alerts! Get questions and answers delivered to your Inbox.


E-mail me updates on this question



   SUBSCRIBE

hidden modal window

Answer Wiki (Improve, edit or add to this answer)


 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0



Assuming you are running the job by yourself and not using something like CA7 to run the job, you will have to "RESTART" at the job step that creates the temp data set. Because once the original job terminated the temp data set is gone, you will have to recreate it. On the job card you use the "RESTART=STEP?" job card parameter. You would restart in step4 because that's the step that created the temp data set.

example:
//JOBNAM01 JOB(12345),'JOB DESCRIPT',MSGCLASS=X,CLASS=B,
// RESTART=STEP4
//*

Tom
  • AddThis Social Bookmark Button

Browse more Questions and Answers on DataCenter and Database.

Looking for relevant DataCenter Whitepapers? Visit the SearchDataCenter.com Research Library.


Discuss This Answer


You must be logged-in to discuss a question. Log-in/Register

pscJohnD  |   Jul 10 2006  11:59AM GMT

An alternative is to create the dataset as a permanent (cataloged) dataset, then delete it after the job steps that use it have completed successfully.
Note: In practice, it is a good idea to add two job steps, one at the beginning of the job to delete the dataset if it was left over from a previous failed job and one at the end of the job to delete the dataset on success of previous job steps.

 

programming44  |   Jul 11 2006  9:59AM GMT

thanx for your invaluable suggetions but still i would like to know to if thez any altenative method, provided that i am not using any job schedulers(CA7 or CA11).

 

roscom  |   Jul 11 2006  11:02AM GMT

No I’m afraid there is not an alternative.

You will have to restart your job from the step that creates the TEMP dataset.

If your job is a long running job, TEMP datasets are not advisable for this very reason. Best to alter your JCL to write your dataset out. That way if it fails again you will be able to restart it from the failing step.

Hope this helps.

 

anettis  |   Jul 12 2006  7:59AM GMT

How about trying the RESTART= command in the job card?

 

anettis  |   Jul 12 2006  8:03AM GMT

And as stated by another poster you must use use a cataloged dataset.