View previous topic :: View next topic
|
Author |
Message |
richie
New User
Joined: 11 Jun 2005 Posts: 24
|
|
|
|
Hello all,
Is it possible to code a Null statement in a Proc? If not, why?
Thank you all for your answers.
Regards,
Rich B. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
Is it possible to code a Null statement in a Proc? |
No, it is not possible.
It is just one of the rules. Likewise, a proc may not contain "instream" data (i.e. DD * ) or a "/*" statement. |
|
Back to top |
|
|
richie
New User
Joined: 11 Jun 2005 Posts: 24
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
You're welcome
Yes. The suggestion to insert a null into the proc is incorrect. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Hi,
richie wrote: |
Is it possible to code a Null statement in a Proc? If not, why? |
"Null Statement" would behave as an "end scope terminator" for the JCL, the moment system gets Null Indicator in JCL stream it will not "read" the statements following the Null Indicator. Only those statements which appears before Null Indicator will get exectued. |
|
Back to top |
|
|
richie
New User
Joined: 11 Jun 2005 Posts: 24
|
|
|
|
Hi Anuj,
Thanks for your reply.
My question is for the Proc .The reasoning could be same though.
Regards,
Rich B. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Hi,
Quote: |
My question is for the Proc .The reasoning could be same though. |
If coded in PROC, syntax check would give you the following advisry message:
Code: |
.JAAA 0 DSS1018A - EMBEDDED NULL (//) FOUND, FLUSHING TO END OF PROC |
Try to create a dummy PROC, you can check this. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
I may have mis-stated previously. . .
Quote: |
No, it is not possible. . . It is just one of the rules. |
It may no longer be "one of the rules". I've been "away" for the last week+ and have not been able to test before posting (always comes back to bite me in the butt. . .).
Long ago, it was a hard/fast rule that a null would throw a jcl error if found while expanding a proc - the job ended immediately. It was also well documented in the jcl manual - after looking thru 2 of the linked jcl manuals, i am not able find it.
Every system i've worked on (since before mvs was invented) included wording in the standards that a null would not be used in production jcl other than as a job stream terminator. I mention this because if the rule has been relaxed/abandoned, they didn't send me the memo I should be "back" by sometime next week at the latest and can run a test then.
If anyone does so, i'm sure there is interest in the outcome.
Anuj - was your post from a jem/jscan/jck or an actual execution of a cataloged proc with an embedded null?
FWIW - even if it turns out to be possible, i would surely recommend it not be used. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Hi Dick,
Quote: |
Anuj - was your post from a jem/jscan/jck or an actual execution of a cataloged proc with an embedded null? |
It was a result of a JEM. |
|
Back to top |
|
|
|