× 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 Joep,

Notice that Rob's command is returning data to variables (in the command
definition the PARM's RTNVAR parameter is *YES).  As I understand it, this
means the command processor is passing a pointer for each parameter with
RTNVAR(*YES) so the CPP knows where to put the return value.  If the program
using the command does not specify a return variable for one of those
parameters, the CPP gets a null pointer, and must make sure it either tests
for the null pointer, or ignores the MCH3601 error that occurs when you try
to return the value using that null pointer.

Regards,
Peter Dow
Dow Software Services, Inc.
909 425-0194 voice
909 425-0196 fax



----- Original Message -----
From: "Joep Beckeringh" <joep@beckeringh.myweb.nl>
To: <rpg400-l@midrange.com>
Sent: Wednesday, November 28, 2001 2:54 PM
Subject: Re: Using *OMIT & *NOPASS


> Rob,
>
> When you define a command, you define the parameter interface for the
> command processing program.  All the parameters you define will be passed
to
> your program.  If you define a 10A parameter with no default value and the
> user does not enter anything for it, you receive a 10A field containing
> blanks.
>
> Joep Beckeringh
>
> ----- Original Message -----
> From: <rob@dekko.com>
> To: <rpg400-l@midrange.com>
> Sent: Wednesday, November 28, 2001 5:18 PM
> Subject: Re: Using *OMIT & *NOPASS
>
>
> >
> > David,
> >
> > I don't think there is any easy answer.  What is really fun is when
> > parameters in the middle may be missing, then your example of checking
the
> > number of parameters is irrelevant.  For example, I wrote a command in
> > which the cpp is an rpgle program.  The name of the command is RTVJOBD.
> > Here is a screen shot:
> >
> >                       Retrieve Job Description (RTVJOBD)
> > Type choices, press Enter.
> > Job Description  . . . . . . . . > MYJOBD        Name
> >   Library  . . . . . . . . . . .     *LIBL       Name, *LIBL
> > Job queue name . . . . . . . . .                 10 A
> > Job queue library name . . . . .                 10 A
> > Job priority (on JOBQ) . . . . .                 2 A
> > Output priority (on OUTQ)  . . .                 2 A
> > Print device . . . . . . . . . .                 10 A
> > Output queue . . . . . . . . . .                 10 A
> > Output queue library . . . . . .                 10 A
> > Text 'description' . . . . . . .                 50 A
> > User . . . . . . . . . . . . . .                 10 A
> > Print text . . . . . . . . . . .                 30 A
> > Accounting code  . . . . . . . . > &ACTCOD       15 A
> > Routing data . . . . . . . . . .                 80 A
> > Request data or command  . . . .                 256 A
> > CL syntax check  . . . . . . . .                 2,0
> >
> > More...
> > F3=Exit   F4=Prompt   F5=Refresh   F12=Cancel   F13=How to use this
> display
> > F24=More keys
> > Command RTVJOBD not allowed in this setting.
> >
> > Sorry that the underlines don't appear in the paste.  But if you use the
> > above, you'll have two parameters, but don't assume they are positional.
> I
> > have to check each variable
> > If %addr(thisvar)=*null
> >  // then don't process it.
> > ...
> >
> > Source available upon request.  It is a few years old, however.
> >
> > Rob Berendt
>
>
>
> _______________________________________________
> This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
> To post a message email: RPG400-L@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
> or email: RPG400-L-request@midrange.com
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/rpg400-l.


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com



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.