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


  • Subject: RE: *ENTRY PLIST (was: RE: Pointer not set for location .....)
  • From: rob@xxxxxxxxx
  • Date: Thu, 31 May 2001 16:25:32 -0500


Granted, this is definitely application dependent, but there are
applications is which you only want to pass certain parameters.  For
example, imagine the CPP called by RTVJOBA.  Notice all the parameters?  If
you don't use them, then their address is *null.  I know, I wrote a command
called RTVJOBD.  Also, people do this technique all the time, hence the
support in RPGLE for *omit.  Let's say I was a glutton for punishment and I
wrote an all encompassing date handling program.  And I call it with a
command.  The parameters might be
1)  from date
2)  to date
3)  from date format
4)  to date format
5)  days from date 1 to date 2
6)  day of the week for from date
7)  day of the week for to date
And I only pass it parameter 1 and only request back parameter 6.  (Yes,
you can do this with commands.  Again, think RTVJOBA).  In this case, what
would the value of %parms be?  And could you make a valid assumption based
on %parms?

Rob Berendt

==================
A smart person learns from their mistakes,
but a wise person learns from OTHER peoples mistakes.


                                                                                
                                        
                    "Joe Giusto                                                 
                                        
                    \(E-mail\)"               To:     <RPG400-L@midrange.com>   
                                        
                    <juicenetdps@cross        cc:                               
                                        
                    winds.net>                Subject:     RE: *ENTRY PLIST  
(was: RE: Pointer not set for location     
                    Sent by:                  .....)                            
                                        
                    owner-rpg400-l@mid                                          
                                        
                    range.com                                                   
                                        
                                                                                
                                        
                                                                                
                                        
                    05/31/01 03:53 PM                                           
                                        
                    Please respond to                                           
                                        
                    RPG400-L                                                    
                                        
                                                                                
                                        
                                                                                
                                        




Yes, basically, I assume that if the last one is sent, then all are sent.
I
really started using it when I would have to add a parm to an existing
program, so as not to bomb out if an older program still calls it without
the new parm.  At a previous shop, we had a lot of calls from menus with
parms in them.  Then you had to kick users off to change all the menus that
the program was on.  Not to mention lack of a good program x-ref system
like
Pathfinder.  It was as much a time issue as it was keeping older procedures
from blowing up.

Question:  If you say if %addr(parm1)=*null, how does that help with
someone
who calls a program with only 2 out of 3 parms.  If they in fact left off
what was supposed to be the first parm, then would not parm2 fall into
parm1's position and parm3 into parm2's?  then parm1 would not = *null, but
contain data that is not relevant to what parm1 is for.

Having said that, I realize my original reply may not apply to the original
message where the user left off a parm on the call.




Joe Giusto II
Programmer/Analyst
Ritz Camera
Beltsville, MD
301-419-3209 x347
410-813-2812 x347

 -----Original Message-----
From:           owner-rpg400-l@midrange.com
[mailto:owner-rpg400-l@midrange.com]  On
Behalf Of rob@dekko.com
Sent:           Thursday, May 31, 2001 12:43 PM
To:        RPG400-L@midrange.com
Subject:        Re: *ENTRY PLIST  (was: RE: Pointer not set for location
.....)


%PARMS again?
Just to rehash an old 'point-of-information', if you have more than one
parm, then I would avoid using %parms.  Because it is possible to omit
passing a parameter withing the middle, while still passing a later
parameter.  This is one good reason to drop using *ENTRY PLIST and use a PI
instead.  If you are addicted to *ENTRY then you may wish to consider
checking each parameter with the following
if %addr(parm1)=*null
* then don't touch this variable!
I used this on a RPGLE program I used as a Command Processing Program with
many optional parameters interspersed.

As far as I am concerned the only good use for %parms is if it is equal to
the total number of parms available then you don't have to check each one
individually.  Or, does it assume that if you send the last parm then you
sent all?

Rob Berendt



+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator:
david@midrange.com
+---




+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.