|
That what I understand but I was looking for a more technical way of
saying that earlier.
Thanks
Bill Hopkins
"Wills, Mike N. (TC)" <MNWills@xxxxxxxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
11/25/2003 01:59 PM
Please respond to RPG programming on the AS400 / iSeries
To: RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>
cc:
Subject: RE: Converting old code *INZSR
Doesn't Klist need to be globally defined, if it is defined in the
procedure, it will only work in there. Am I correct?
Mike Wills
Lawson Programmer/Administrator
Taylor Development
Email: mnwills@xxxxxxxxxxxxxx
Direct Line: (507) 625-3187
-----Original Message-----
From: Bill Hopkins [mailto:BHopkins@xxxxxxxxxxxxxxxxxxx]
Sent: Tuesday, November 25, 2003 10:30 AM
To: RPG400-L@xxxxxxxxxxxx
Subject: Converting old code *INZSR
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
_______________________________________________
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.
_______________________________________________
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 mailing list archive is Copyright 1997-2025 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.