IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

symbolic parm - allocate dsn


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
krrp

New User


Joined: 23 Oct 2015
Posts: 12
Location: canada

PostPosted: Sat Oct 31, 2015 8:27 pm
Reply with quote

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
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Sat Oct 31, 2015 9:56 pm
Reply with quote

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
View user's profile Send private message
krrp

New User


Joined: 23 Oct 2015
Posts: 12
Location: canada

PostPosted: Sun Nov 01, 2015 5:58 pm
Reply with quote

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
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Mon Nov 02, 2015 3:50 pm
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Nov 02, 2015 4:32 pm
Reply with quote

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
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 712
Location: Denmark

PostPosted: Tue Nov 03, 2015 12:56 am
Reply with quote

If you are on z/OS 2.1 then you can use system symbols in JCL.
Back to top
View user's profile Send private message
krrp

New User


Joined: 23 Oct 2015
Posts: 12
Location: canada

PostPosted: Tue Nov 03, 2015 2:08 am
Reply with quote

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
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 712
Location: Denmark

PostPosted: Tue Nov 03, 2015 2:30 am
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Nov 03, 2015 3:01 am
Reply with quote

When you say the dataset is catalogued we assume you mean a PS dataset.

What are you reading that with, online?
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3051
Location: NYC,USA

PostPosted: Tue Nov 03, 2015 3:10 am
Reply with quote

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
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3051
Location: NYC,USA

PostPosted: Tue Nov 03, 2015 3:37 am
Reply with quote

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
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Tue Nov 03, 2015 2:09 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts JCL EXEC PARM data in C Java & MQSeries 2
No new posts Need to specify PARM='POSIX(ON) Java & MQSeries 4
No new posts How to pass the PARM value to my targ... COBOL Programming 8
No new posts pass data as symbolic parameter from ... CLIST & REXX 2
No new posts Passing parm from JCL to Assembler, b... PL/I & Assembler 2
Search our Forums:

Back to Top