View previous topic :: View next topic
|
Author |
Message |
krrp
New User
Joined: 23 Oct 2015 Posts: 12 Location: canada
|
|
|
|
Hi
I've a requirement to create an output dataset with processing date as qualifer which is in the input file.
Currently I use bpxwdyn within the cobol program to dynamically allocate dataset during runtime.
Is there another way to do it from JCL using Rexx? The problem with above is the dataset is cataloged even the job fails with an error, ex s0c7.
Thanks for your time
krrp |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
Quote: |
The problem with above is the dataset is cataloged even the job fails with an error |
That is not a problem - you may need the dataset for problem determination. You can have an automatic clean-up by having a housekeeping step as the first step which will delete the dataset if it exists. |
|
Back to top |
|
|
krrp
New User
Joined: 23 Oct 2015 Posts: 12 Location: canada
|
|
|
|
Nic, I meant problem because the created dataset will be picked up by downstream application online. The failed incomplete dataset will impact the downstream application as well. |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
Then your scheduling is wrong. Downstream jobs requiring that dataset should wait until it is successfully created. That is one of the things that schedulers are for. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Have a look at the JCL Reference and see what DISP does.
As NicC says, if the JOB has failed, why is anything "downstream" running? |
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 712 Location: Denmark
|
|
|
|
If you are on z/OS 2.1 then you can use system symbols in JCL. |
|
Back to top |
|
|
krrp
New User
Joined: 23 Oct 2015 Posts: 12 Location: canada
|
|
|
|
Nic, Bill,
Like I said...it is an Online application which picks up the file not the downstream batch application.
Regards
krrp |
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 712 Location: Denmark
|
|
|
|
hm, make it into a 2 step process where step1 will create the data in a temp file and step2 will rename that to the final name if step1 completes rc 0 ? |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
When you say the dataset is catalogued we assume you mean a PS dataset.
What are you reading that with, online? |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3048 Location: NYC,USA
|
|
|
|
Why do you overlook Bill's advise on DISP, it looks like you are confused about what is happening and what do you want actually? |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3048 Location: NYC,USA
|
|
|
|
Quote: |
I meant problem because the created dataset will be picked up by downstream application online. The failed incomplete dataset will impact the downstream application as well. |
If you don't want to answer my previous post then please chage it to create a GDG instead of PS file so that online would still be find with earlier GDG ( of cource, if your Business accepts that way) but DISP still needs to be (NEW, CATLG, DELETE) and not (NEW, CATLG, CATLG). |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
You did not specify that it was an online program.
What is an online program doing creating a sequential file? Can you not initiate a batch job to create the file when the data is ready and make the downstream dependent on that? |
|
Back to top |
|
|
|