View previous topic :: View next topic |
Author |
Message |
arvibala Beginner

Joined: 12 Feb 2008 Posts: 142 Topics: 67
|
Posted: Thu Jan 22, 2009 12:04 pm Post subject: Dynamic PARM - Good Programming practice. |
|
|
Hi,
One of my programs creates Dynamic PARMS to delete some members based on some condition. so my PARM looks like this.
DELETE HLQ.MLQ(MEM1)
DELETE HLQ.MLQ(MEM2)
IF MAXCC EQ 8 THEN SET MAXCC = 0
Then I use this PARM in an IDCAMS utility to delete MEM1 and MEM2.
But in some cases this PARM .. needs to be EMPTY. I tested it with Empty PARM, it works fine. But Can you suggest some good programing practice so that the PARM has some thing to bypass even if there are no members to delete?
Thanks, _________________ Arvind
"You can make a difference with your smile. Have that with you always" |
|
Back to top |
|
 |
bauer Intermediate
Joined: 10 Oct 2003 Posts: 317 Topics: 50 Location: Germany
|
Posted: Fri Jan 23, 2009 3:07 am Post subject: |
|
|
arvibala,
i'm not sure, if my understanding is correct.
You execute a program to create the input cards for idcams and in the next step you execute the idcams utility? Is this correct?
If so, why do you execute the idcams step, if nothing is to do? Don't execute the idcams step in your jcl in this situation.
regards
bauer |
|
Back to top |
|
 |
CraigG Intermediate
Joined: 02 May 2007 Posts: 202 Topics: 0 Location: Viginia, USA
|
Posted: Fri Jan 23, 2009 9:52 am Post subject: |
|
|
Just set the return code in the step that creates the parms so the idcams step will be skipped. |
|
Back to top |
|
 |
Nic Clouston Advanced
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
|
Posted: Fri Jan 23, 2009 1:10 pm Post subject: |
|
|
You could even have your program call IDCAMS directly if it has cretaed records _________________ Utility and Program control cards are NOT, repeat NOT, JCL. |
|
Back to top |
|
 |
arvibala Beginner

Joined: 12 Feb 2008 Posts: 142 Topics: 67
|
Posted: Tue Jan 27, 2009 2:13 pm Post subject: |
|
|
I will go with CraigG .. thats the best thing to do.
bauer,
The members to be deleted is created Dynamic. So to skip IDCAMS step, I will set the return code of my program. _________________ Arvind
"You can make a difference with your smile. Have that with you always" |
|
Back to top |
|
 |
|
|