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

creation of dataset for certain PARM parameters.


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

New User


Joined: 21 Nov 2006
Posts: 48
Location: mumbai

PostPosted: Fri Jan 05, 2007 12:13 pm
Reply with quote

hi friends,
i am facing a situation as below.
//step1 exec pgm=PGM1,parm='_'
//dd1 dd dsn=ABC,disp=(,catlg,delete),...
//dd2 dd dsn=XYZ,disp=(,catlg,delete),...
//sysout dd sysout=*
..
...
here i want to create the XYZ when PARM value is 'P', 'Q' or 'R'
for other values of PARM i don't want to create the XYZ.
how to do that?
Back to top
View user's profile Send private message
donevin

New User


Joined: 07 Jun 2005
Posts: 70
Location: South Africa

PostPosted: Fri Jan 05, 2007 1:23 pm
Reply with quote

PARM is passed to your program, so maybe you should use a symbolic parameter like "&Parm" to hold the value.
Back to top
View user's profile Send private message
sudhakar_lendave

New User


Joined: 21 Nov 2006
Posts: 48
Location: mumbai

PostPosted: Fri Jan 05, 2007 1:46 pm
Reply with quote

i am not getting. just clarify it.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Fri Jan 05, 2007 2:07 pm
Reply with quote

Hi

Could you please tell what are you doing with the parameters passed into the program??...

Thanks
Arun
Back to top
View user's profile Send private message
sudhakar_lendave

New User


Joined: 21 Nov 2006
Posts: 48
Location: mumbai

PostPosted: Fri Jan 05, 2007 2:22 pm
Reply with quote

hi arcvns,
i am writing records to XYZ file only when the PARM value is P Q or R
If i pass other PARM value XYZ file should not be created.
Back to top
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 771
Location: Germany

PostPosted: Fri Jan 05, 2007 4:05 pm
Reply with quote

Hi !

A simple solution. Your Cobol is ending with diffrent return-codes for JES.
Use a Move 'NN' to return-code for that.

Return with 0 -> both files have data
Return with 4 -> File one has data
Return with 8 -> File two has data

Then in jcl next Steps you could use If-Then-Else conditions to delete
unnessesary files via jcl.

I can not really detect a reason for such an requirement, but this way will work.

Regards, UmeySan
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 FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Allocated cylinders of a dataset DB2 12
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts JCL EXEC PARM data in C Java & MQSeries 2
Search our Forums:

Back to Top