×
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.
I am having an issue with *NOPASS and %Parms. The issue is that, when I
pass the parm, %parms is not resolving correctly.
The prototype for the program is:
D ARQ006 PR ExtPgm('ARQ006')
D Type 2a Options(*NOPASS)
D Code 3a Options(*NOPASS)
The interface is:
D ARQ006 PI
D #Type Like(iftype)
D Options(*NoPass)
D #Code Like(ifcde)
D Options(*NoPass)
The program checks for parameters:
IF %parms > *Zeros;
dspOption = *On;
ENDIF;
I invoked the program via:
CALL ARQ006 PARM('X')
When I run the program under debug, the value of #Type = 'X'. But the
program skips right over the dspOption setting.
I have used *NOPASS before (typically when I added parameters to a program
later) and then checked for the extra parms, such as:
IF %parms >= 13;
[do something]
ENDIF;
The only difference that I see here is that I may not want to pass any
parms. By way of explanation, this was an attempt to write an inquiry
program with a subfile. The program could be called as a stand alone
program, or as a selector from another program. I.e., in the latter case
the calling program asks the called program [ARQ006] which records are
available, select one and return its key fields back to the caller. As a
stand alone inquiry, it doesn't care about parameters.
Why isn't the "IF %parms > *Zeros" resulting in a true result when I invoke
it with "CALL ARQ006 PARM('X')"?
Thanks.
Jerry C. Adams
IBM i Programmer/Analyst
You can never tell which way the train went by looking at the track. Only
by the splatter of the blood stains
--
A&K Wholesale
Murfreesboro, TN
615-867-5070
As an Amazon Associate we earn from qualifying purchases.
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.