File allocated-next gdg created

5 pts.
Tags:
GDG
Generation Data Groups
Have a scenario of a job that will run everyday, but should only create new gdg file, if it is Saturday. How can I keep from producing an empty dataset,Mon-Fri?

Answer Wiki

Thanks. We'll let you know when a new response is added.

I’m a bit rusty on this.

I’m assuming you are using one job to create both scenarios?

I believe you can use an ‘<b>if’</b>’ statement between job steps.

If you can identify when a Saturday run is executed, then you can duplicate the job steps where this file is created. On all days, except Saturday, the output for this file is dumped into the current ‘(0)’ version of this file or a null file, and on Saturday, the other step is executed (based on the ‘if’ statement) and the next version ‘(+1)’ is created.

I think if you use catalogued procedures and symbolic variables, you can achieve the same thing while using only one job step. As an example, the variable for the GDG could be called &GDG1. and it would be stored in the JCL as DSN=??????(&GDG1). The default value for this variable would be GDG1=’0′. On Saturday, this variable (again using some type of key to indicate Saturday), change this variable to GDG1=’+1′.

Another technique is to use the deferred data name JCL statement. On Saturdays, this DD statement points to the +1 (new) version. On all the other days, it points to the current (0) version or a null file.

The key is to identify a Saturday run. Your ‘if’ job step could issue a return-code of 7, thus letting the rest of the job-steps know that this is a Saturday run.

Perhaps you can run a utility to check the day of the week, then issue a unique return-code?

Just some foggy recollections.

Good Luck

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following