× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi Arthur,

I have a situation where some option(*omit) parms which are input to
a proc must then be passed to another proc. If the parms are actually
passed to the first proc, no problem when calling the second proc.
But what if they're not?

As long as you really mean options(*OMIT) and NOT options *NOPASS, then you shouldn't have a problem, so long as the procedure you call also has options(*NOPASS).

i.e. let's say if PROC1 has an options(*OMIT) parameter, and someone has passed *OMIT to it. If PROC1 calls PROC2 it'll pass that *OMIT along so that PROC2 receives it, and can check for it with %addr(parm)<>*NULL or with CEETSTA. It should work just fine.

On the other hand, if you have options(*omit:*nopass) or just options(*nopass) then you have a bigger problem -- if the parameter wasn't passed, it'll be in a random spot in memory, and trying to access it's contents will give you the dreaded 'unpredictable results'. So passing that along would pass the 'unpredictable results' on as a parameter to the next procedure... *omit doesn't have that problem (unless *nopass is also specified), with *omit the parameter is ALWAYS passed, so you're safe. When the special value of *omit is passed for the parameter, SOMETHING is still passed, and that can be forwarded on to the next procedure down the stream...

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.