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



Joe,

you're missing the 'S' in column 24 of your local declarations to indicate 
that they are standalone fields:

Code:
     P GetDocType      B
     D GetDocType      PI            50A
     D   Doc                         30A

        // Local Parms
     D   OrderNum      S              7A
     D   PickNum       S              3S 0
     D   Count         S              4S 0

HTH,

Peter Colpaert
Application Developer
PLI - IT - Kontich, Belgium
-----
Yoda of Borg are we.  Futile is resistance, assimilated will you be.
-----



"Joe D" <nike@xxxxxxxxxxxxxx> 
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
19/01/2007 08:26
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>


To
"RPG programming on the AS400 / iSeries" <rpg400-l@xxxxxxxxxxxx>
cc

Subject
Local Variables in a Subprocedure?






Hi All,

Been trying to force myself to use more ILE, even though I am in a RPG/400 
shop.  I also program in Delphi and VB and the concept of procedures, 
service programs, etc really is enticing.

Anyhow.  So tonight I have run into a problem that Google could not help 
me with.

I have a subprocedure that I pass one string and it returns another.  I 
wanted to declare some local variables in the procedure, but when I do the 
compiler acts like the declarations are for the passed in parameters. The 
code is below.  Only one parm is really being passed in, and I want the 
other 3 to be local. 

How do I declare a local parameter in a subprocedure?

Obviously missing something again,
JD


Code:
     P GetDocType      B
     D GetDocType      PI            50A
     D   Doc                         30A

        // Local Parms
     D   OrderNum                     7A
     D   PickNum                      3S 0
     D   Count                        4S 0

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.