|
Joe, I compiled your code and do get the same error you do. It seems that the CALLB to the module doesn't get the correct value back from %open inside the procedure. It is interesting that reversing the two calls in PGM1 makes the program work without error. I'm at a loss to explain what is happening. Scott Mildenberger > -----Original Message----- > From: Joe Pluta [mailto:joepluta@PlutaBrothers.com] > Sent: Monday, October 14, 2002 4:43 PM > To: rpg400-l@midrange.com > Subject: RE: Subprocedures and files (was: Procedures are FUN!) > > > > From: Buck Calabro > > > > No error here. V5R1. I devolved my code to fixed for the > > benefit of those on earlier releases. > > I wasn't doing what you did, Buck. I've modified your code to try and > emulate what I was doing. This fails on my machine: > > PROC1: > > fqrpglesrc if e disk usropn > f rename(qrpglesrc: src) > > d getrec pr 6s 0 > d iseq s 6s 0 > > c *entry plist > c parm iseq > > c eval iseq = getrec > c return > > p getrec b export > d getrec pi 6s 0 > > c if not %open(qrpglesrc) > c open qrpglesrc > c endif > > > c read src > > c return srcseq > > p e > > PGM1: > > d getrec pr 6s 0 > > d seq s 6s 0 > > c eval seq = getrec > c callb 'PROC1' > c parm seq > c eval *inlr = *on > > CRTRPGMOD on PGM1, PROC1 > CRTPGM PGM(JDPTEST/PGM1) MODULE(PGM1 PROC1) > > Call PGM1, get CPF4132 > > Note no LR in the called subprogram. I don't seton LR except > in the main > driver > > Joe
As an Amazon Associate we earn from qualifying purchases.
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.