MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Dynamic PARM - Good Programming practice.

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
arvibala
Beginner


Joined: 12 Feb 2008
Posts: 142
Topics: 67

PostPosted: Thu Jan 22, 2009 12:04 pm    Post subject: Dynamic PARM - Good Programming practice. Reply with quote

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
View user's profile Send private message Yahoo Messenger
bauer
Intermediate


Joined: 10 Oct 2003
Posts: 317
Topics: 50
Location: Germany

PostPosted: Fri Jan 23, 2009 3:07 am    Post subject: Reply with quote

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


Joined: 02 May 2007
Posts: 202
Topics: 0
Location: Viginia, USA

PostPosted: Fri Jan 23, 2009 9:52 am    Post subject: Reply with quote

Just set the return code in the step that creates the parms so the idcams step will be skipped.
Back to top
View user's profile Send private message
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Fri Jan 23, 2009 1:10 pm    Post subject: Reply with quote

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


Joined: 12 Feb 2008
Posts: 142
Topics: 67

PostPosted: Tue Jan 27, 2009 2:13 pm    Post subject: Reply with quote

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
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group