× 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 still confused.
I don't want to define 'string' as 14A.
I was attempting to define 'string' as a variable length parameter that was
passed in and back.

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Marvin Radding
Sent: Thursday, July 22, 2004 4:10 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: RE: RPG400-L Digest, Vol 3, Issue 534


Well, lets see.  You have a 5 dim character array of 14a.  You are
attempting to pass 1 element of the 14a to a procedure that receives a
string that is defined like a procudure (machine address) and you tack on a
Option(*Varsize) just to confuse things even more.  You need to decide if
you are passing a pointer or a character string.  If you define String in
the procedure as 14A it should compile.

Marvin



date: Thu, 22 Jul 2004 15:53:43 -0700
from: "Tim Kredlo" <TKredlo@xxxxxxxxxxxxxxxx>
subject: Need help

I must be brain dead, but I cannot figure out why this (PtRtrv) won't
compile.

In calling program PtRtrv I have:
=======================
/Copy ExPrdPgm/QRpgSrc,ProtSp

D Subr            S             14A   Dim(5) 
D                                     Inz    
D SubrIdx         S              3U 0 Inz

542   For SubrIdx = 1 to 5 by 1;                
543      Subr(SubrIdx) = Low2Up(Subr(SubrIdx));               006200
544   EndFor;                                   

In source ProtSp I have:
=================
D Low2Up          Pr          1000A   Varying           
D String                              Like(Low2Up)      
D                                     Options(*Varsize) 

Module Low2Up is:
==============
H Nomain
 /Copy ExPrdPgm/QRpgSrc,ProtSp
  (Note that this is the same '/Copy' as in PtRtrv)

P Low2Up          B                   Export
D Low2Up          Pi          1000A   Varying
D  String                             Like(Low2Up)
D                                     Options(*Varsize)     
D  Upper          C                   'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
D  Lower          C                   'abcdefghijklmnopqrstuvwxyz'
  /Free                                 
   String = %XLate(Lower:Upper:String); 
   Return String;                       
  /End-Free                             
 P Low2Up          E                    

Low2Up compiles (CrtRpgMod) with no errors.


PtRtrv compile errors out with:
======================
*RNF7535 30    543 006200  The type and attributes of parameter 1 do not
match those of the prototype. 








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

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.