Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
creation of dataset for certain PARM parameters.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: creation of dataset for certain PARM parameters.
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    Post subject:
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    Post subject:
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: 2285
Location: @my desk

PostPosted: Fri Jan 05, 2007 2:07 pm    Post subject:
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    Post subject:
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: 757
Location: Germany

PostPosted: Fri Jan 05, 2007 4:05 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm
No new posts Where is output from PARM ABEXIT (SNA... packerm CA Products 3 Thu Sep 28, 2017 4:06 pm
This topic is locked: you cannot edit posts or make replies. Selecting two copybooks of different ... Vignesh Sid COBOL Programming 8 Tue Sep 05, 2017 7:28 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us