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



Looks like your Main prototype contains one more parameter than the
procedure interface.

Prototype contains 2 parms. a 2 byte char, and a 15 byte char.
The Procedure Interface contains only one, a 15 byte char.

Thanks,

Mark

Mark D. Walter
Senior Programmer/Analyst
CCX, Inc.
mwalter@xxxxxxxxxx
http://www.ccxinc.com


                                                                                
                                                                    
                    THarteau@felkerbrot                                         
                                                                    
                    hers.com                   To:     RPG programming on the 
AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>                               
                    Sent by:                   cc:                              
                                                                    
                    rpg400-l-bounces@mi        Subject:     More problems 
w/passing data structures as parameters                                   
                    drange.com                                                  
                                                                    
                                                                                
                                                                    
                                                                                
                                                                    
                    10/01/2003 11:05 AM                                         
                                                                    
                    Please respond to                                           
                                                                    
                    RPG programming on                                          
                                                                    
                    the AS400 / iSeries                                         
                                                                    
                                                                                
                                                                    
                                                                                
                                                                    





Hi,
      I appreciate all the help I have gotten from the list so far, but I
have another problem.  I am passing a data structure as a parameter to a
procedure, and when I execute a shell program to test it, I get the message
'Pointer not set for location referenced' & 'Pointer or Parameter error
(CGDF). I am trying to follow an example I found in the Club Tech
Newsletter, and I can't see where I went wrong. All the modules and the
shell compiled OK, and the CRTPGM was OK.  Any and all advice is greatly
appreciated.

This is the /copy I am using (PROINV)

   // ---------------------------------------------Prototype: DescClass
 D DescClass       PR              N
 D  ItemInfoDS                         LikeDS(ItemInfo)
 D ItemInfo        DS                  Based(ItemInfoPtr)
 D  ItemIn                       15
 D  DscOut                       30
 D  ClsOut                        2

This is the inventory procedure (DESCCLASS)

H  NOMAIN
 *  External procedure for DESCCLASS

 /COPY QPROSRC,PROINV

  ////////////////////////////////////////////////////////////////////
  //  Procedure to return the description & item class for an item.

PDescClass        B                   EXPORT
D DescClass       PI              N
D  ItemInfoDS                         LikeDS(ItemInfo)
D*
D IDESC           S             30    INZ(*blanks)
D ICLAS           S              2    INZ(*blanks)
C*
C/EXEC SQL
C+ SELECT idesc, iclas INTO :idesc, :iclas FROM iim WHERE iprod =
C+ :ItemIn
C/END-EXEC
C*
C                   Eval      DscOut = IDESC
C                   Eval      ClsOut = ICLAS
C                   Return    *off
C*
PDescClass        E

And this is the shell program I am executing

 /If Defined(*CRTBNDRPG)
H DftActGrp(*NO) ActGrp(*Caller)
 /EndIf

F*   Shell program to test inventory procedures.
D*
D Main            PR                  EXTPGM('SHELLINV')
D                                2
D                               15
D*
D Main            PI
D  ParmItm                      15

 /COPY QPROSRC,PROINV

D ReturnMPG       S              5
D ReturnDS        S             47
D ReturnInd       S               N
D ItemInfoDS      S                   Like(ItemInfo)

 /FREE

  Eval ItemIn = ParmItm;
  Eval DscOut = *blanks;
  Eval ClsOut = *blanks;
  ReturnInd = DescClass( ItemInfoDS );
  Dsply ItemIn;
  Dsply DscOut;
  Dsply ClsOut;

  *INLR = *ON;
  Return;

 /END-FREE

<===================================================>

Terri Harteau
Felker Brothers Corp.
****************
"There's no point in being grown up if you can't be childish sometimes."
- Dr. Who
****************






_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.






As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.