× 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.



Another thought keeps arising about the word OPTIONAL in the subject - EVery parameter of a command that is defined with MIN(0) is, in a sense, an "optional" parameter. All we have to do is look at the docs for any command online, where we see the words "Required" and "optional".

The command processor ALWAYS passes something (a pointer, in fact) for EVERY parameter - to the command-processing program. As we have discussed in another thread, this is true even for parameters defined with RTNVAL(*YES), where a NULL pointer is passed. This is from the CL Programming manual -

"If no variable is specified for a RTNVAL(*YES) parameter, a null pointer is passed to the command processing program."

As a side remark, what is interesting is that this follows this statement -

"If RTNVAL (*YES) is specified, a return variable must be coded on the command when it is called, if you want to have the value returned."

This is not quite so bad as the sign I saw on the armory in Minneapolis once - "No trespassing without permission..." - trespassing that is allowed? :-X

Anyhow, my point is, the CPP will always need as many parameters as are defined in the command definition.

Vern

On 4/19/2013 6:05 AM, Vernon Hamberg wrote:
Comments inline
On 4/19/2013 1:08 AM, CRPence wrote:
-snip-
Vernon Hamberg on Thursday, April 18, 2013 4:53 PM wrote:

Your first parameter has to be defined with length 502 - because
the varying puts the length in the first 2 bytes.

If you are current enough, you can set up another 502-long
parameter - I forget, but either *BASED or *DEFINED variables can't
be declared over parameters.
It need not be /another/ parameter, just a redefinition of the
storage for the parameter &text [after correction to include all 502
bytes]. The /current enough/ refers to the availability of the STG()
parameter on the DCL, since v5r4.

Sorry for confusion here - I really did mean to say another variable,
not parameter. I did come across a scenario where I had to copy the
parameter to this variable - I believe it was *BASED on a pointer to the
parameter, because I see that I was able to use *DEFINED over a parameter.

I don't have the source now that showed the behavior, perhaps someone
else can confirm or deny.

-snip-


As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.