|
This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. -- [ Picked text/plain from multipart/alternative ] Well, it's been some time since I wrote the program and my memory isn't what it used to be... IIRC the problem was external print file and the RPG III J specs and compile time errors. The memory is very fuzzy though. So I think I needed the dummy external file to get the override of the fields neatly into the RPG program, then the array gets overridden to match the file specs and the field names in the external print file are the ones from the dummy external file. In the program I refer to DT(x) and AM(x) while the external dummy file accomplishes the rename to DATEnn and AMOUNTnn and the print file itself only references DATEnn and AMOUNTnn. You end up doing the override, if you will, in "I" specs but you use the field only on "O" specs. When you compile the external print file you need something to reference (the external dummy pf) because it can't know that there's an array named DT that's 36 elements of 6.0 in your program. That's why I've got the dummy pf defined and it only has the arrays in it. Clear? 'cuz I think I've even confused myself now. :-) -----Original Message----- From: Wills, Mike N. (TC) [mailto:MNWills@taylorcorp.com] Sent: Monday, February 25, 2002 1:27 PM To: 'rpg400-l@midrange.com' Subject: RE: Printing arrays through externally described printer file Tom, I guess I don't understand, this is what I have: A R DETAILA A DADESC 30 O 1 A DATYPE 15 O 32 A DAJANSLS 9 0O 48EDTCDE(1) A DAFEBSLS 9 0O 60EDTCDE(1) . . . A DADECSLS 9 0O 180EDTCDE(1) A DATOTALSLS 10 0O 192SPACEA(1) A EDTCDE(1) Can I do an override like you can on a physical file in the input specs? I Field1 array(1) I Field2 array(2) I Field3 array(3) Then I can do this Do 3 x Eval array(x) = formula here enddo instead of eval Field1 = formula eval Field2 = formula eval Field3 = formula -----Original Message----- From: Westdorp, Tom I've done it as follows: An external PF for definition: A R FOLPRTR TEXT('FOLIO LINE ITEMS') A DATE01 R REFFLD($DISPDATE) A DATE02 R REFFLD($DISPDATE) A DATE03 R REFFLD($DISPDATE) ..... A AMNT01 R -2 REFFLD(AMNT) A AMNT02 R -2 REFFLD(AMNT) A AMNT03 R -2 REFFLD(AMNT) ..... Referenced in the RPGIV D DTDS E DS ExtName(FOLPRTDS) D DT 1 144P 0 Dim(36) PackEven D AM 145 288P 2 Dim(36) and then referencing the external field names in the external print file ..... A FLIO21 R O 1SKIPB(026) A DATE21 R O + 1REFFLD(DESC) A AMNT21 R -2 O + 1REFFLD(AMNT) A EDTCDE(K) ..... Hope this helps _______________________________________________ This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l or email: RPG400-L-request@midrange.com 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-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.