× 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 have a package I'm testing out that converts RPG II and III code to RPG 
IV. It said that it could convert the subroutines to procedures but I ran 
into a problem when it was handling the *INZSR. 

It defined the fields used in key list
FFILE      IF   E           K DISK 
 
d SOMETHING1        10 A 
d SOMETHING2        10 A 

It prototyped it.
d INZSR    pr


c               CALLP  INZSR
c              KEY1    CHAIN FILE
c                              If            %FOUND
c                            'Do some stuff 
c                              Endif
c                              Eval     *inlr = *on

And it created procedure with procedure interface.

p INZSR  b 
d INZSR  pi 

c        KEY1      KLIST
c                         KFLD    SOMETHING1 
c                         KFLD    SOMETHING2 

c                                Eval      SOMETHING1    =  SOMETHINGA
c                                Eval      SOMETHING2    =  SOMETHINGB

p INZSR  e 

But on compile it does not reconize KEY1 gets RNF7030 and of course chain 
got RNF7080.   Can someone explain why? I would not have used KLIST in C 
spec if I had written from scratch I would have put in D SPEC so it would 
have been define at compile time to main part of program. But I'm still 
learning so I want to know why this fails in tech terms not my redneck way 
of thinking
( "because you defined KEY1 in the subprocedure which means it is locally 
defined to it and not the main part of program"). 

Thanks 
Bill Hopkins 

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.