View previous topic :: View next topic
|
Author |
Message |
bvarun.
New User
Joined: 05 Jul 2013 Posts: 34 Location: India
|
|
|
|
Hi we have different files used in our proc, to differentiate we used overides for the file, high level qualifiers.
However there is a single IEFBR14 step as first step of proc which has parm of override fields
Code: |
//BR14 EXEC PGM=IEFBR14,PARM='&CV&EHLQ'
//* |
me and my teamies are clueless on what this particular step does. |
|
Back to top |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1315 Location: Vilnius, Lithuania
|
|
|
|
It makes sure that the parms are used in the proc, to prevent JCL errors, and it sets an RC=0 that may be needed to enable condition code checking on the first real step. |
|
Back to top |
|
|
bvarun.
New User
Joined: 05 Jul 2013 Posts: 34 Location: India
|
|
|
|
wow I learnt new stuff in jcl today,, thanks prino |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Well, I've either learned something, misunderstood something, or fallen for somehting :-) |
|
Back to top |
|
|
bvarun.
New User
Joined: 05 Jul 2013 Posts: 34 Location: India
|
|
|
|
Bill,
i am pondering What could be misunderstood something, or fallen for somehting here ?
Would you please share if you dont mind. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Why would the first step need to check an RC?
What would the importance be of "making sure" that the parms are used? |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1205 Location: Dublin, Ireland
|
|
|
|
prino wrote: |
It makes sure that the parms are used in the proc, to prevent JCL errors, and it sets an RC=0 that may be needed to enable condition code checking on the first real step. |
I don't see how it makes sure that parms are used in the proc ? If they're there and unresolved you still get JCL error.
Garry. |
|
Back to top |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1315 Location: Vilnius, Lithuania
|
|
|
|
Bill Woodger wrote: |
Why would the first step need to check an RC?
What would the importance be of "making sure" that the parms are used? |
In order to bypass it with a stepxxx.cond override. If there is no condition code, you cannot bypass the first step of a proc.
Suppose you've got one dataset using these symbolics and it's removed from the possibly long proc. By having the symbolics in the IEFBR14 parameter, the proc will not give a JCL error, because the symbolics are still used. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Showing only this BR14 step does not provide the info needed (at least for me) to answer.
If you post the PROC, we will probably be able to provide different replies. |
|
Back to top |
|
|
bvarun.
New User
Joined: 05 Jul 2013 Posts: 34 Location: India
|
|
|
|
prino is right..
It makes sure that the parms are used in the proc.
For example: if some symbolic overide is used in job, but commented in proc. It will give you jcl syntax error. if we use BR14 step with overrides in parm in proc as a first step, whether overrides are used or not in the proc later. it will not give jcl syntax error.
It will be helpful for DEV testing. i tried it in my shop |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
It makes sure that the parms are used in the proc. |
The way this is often addressed is by placing initial/default values on the PROC statement. I see no reason to have an extra step.
Maybe i am missing something? |
|
Back to top |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1315 Location: Vilnius, Lithuania
|
|
|
|
dick scherrer wrote: |
Hello,
Quote: |
It makes sure that the parms are used in the proc. |
The way this is often addressed is by placing initial/default values on the PROC statement. I see no reason to have an extra step.
Maybe i am missing something? |
Yes you are. If the use a procedural parameter is removed from a proc by commenting out the JCL statement on which it occurs, without it also being removed from the proc itself, you will get a JCL error for an unused symbol. The dummy parm for IEFBR14 will prevent this from happening. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Ahh - now i see what you are getting at
I just haven't had that "opportunity" yet . . .
Thanks,
d |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
It was "learned something". Thanks prino. Probably means I've never tried to bounce the first step in a PROC, but now when I try and it doesn't work, I'll remember :-)
I think the "JCL Boys" usually tridy-up symbols which are no longer used. I guess, but if I see it somewhere, I'll now know (and not bust someone for it, and afterwards find out what it does....). |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
Would be nice to have the step commented though - but then we would not come across these little gems. OTH, if the symbolics become unused then they should be removed otherwise it is an incomplete change. |
|
Back to top |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1315 Location: Vilnius, Lithuania
|
|
|
|
Nic Clouston wrote: |
Would be nice to have the step commented though - but then we would not come across these little gems. OTH, if the symbolics become unused then they should be removed otherwise it is an incomplete change. |
Yes, but if you need to come in at 02:42 and use a temporary copy of the procedure, not having to check if a variable is used does have its advantages. |
|
Back to top |
|
|
|