View previous topic :: View next topic
|
Author |
Message |
sudhakar_lendave
New User
Joined: 21 Nov 2006 Posts: 48 Location: mumbai
|
|
|
|
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 |
|
|
donevin
New User
Joined: 07 Jun 2005 Posts: 70 Location: South Africa
|
|
|
|
PARM is passed to your program, so maybe you should use a symbolic parameter like "&Parm" to hold the value. |
|
Back to top |
|
|
sudhakar_lendave
New User
Joined: 21 Nov 2006 Posts: 48 Location: mumbai
|
|
|
|
i am not getting. just clarify it. |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Hi
Could you please tell what are you doing with the parameters passed into the program??...
Thanks
Arun |
|
Back to top |
|
|
sudhakar_lendave
New User
Joined: 21 Nov 2006 Posts: 48 Location: mumbai
|
|
|
|
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 |
|
|
UmeySan
Active Member
Joined: 22 Aug 2006 Posts: 771 Location: Germany
|
|
|
|
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 |
|
|
|