|
Another suggestion would be to convert your program from RPG III to RPG IV. You can do so much more with it and it is the way you should go with new development. Dawn -----Original Message----- From: hrishikesh kotwal [mailto:hdkotwal@hotmail.com] Sent: Wednesday, November 07, 2001 12:26 PM To: rpg400-l@midrange.com Subject: RE: Line count? [ Converted text/html to text/plain ] Splendid! I am new to this list and now i wonder why i wasted most of my 3 years of RPG programming frantically searching IBM AS400 books. Thanks all!!! Regards, Hrishikesh Kotwal >From: Buck Calabro >Reply-To: rpg400-l@midrange.com >To: "'rpg400-l@midrange.com'" >Subject: RE: Line count? >Date: Wed, 7 Nov 2001 12:15:54 -0500 > > >I read File A and print all records, with each record on > >a different line. Within this read loop, I read File B > >(File B may have one or more records > >matching with File A). > > > >Assume I print the first record from File A on Line 1. > > > >Then I read File B, find 3 records. Each record must > >be printed on a different line. > > > >In order to print these records from Line 1, I specify > >0 spaces before new line is printed in the O-specs. > >This serves my purpose and I get the first record from > >File B on Line 1. then I go ahead and print the other > >2 records from File B on Lines 2 & 3 respectively. > > > >BUT now there is another File C which also may > >have one or more records matching File A. These > >records also must be printed from Line 1. Because > >I have already printed records from File B, I have > >reached Line number 3. > > > >How do I get back to Line 1. and start printing > >data from File C? > >Several ideas: >1) Switch to DDS and use the POSITION keyword. >2) Matching record >3) Build the entire page (or section) in an array >4) Go back to the user and simplify the output >5) Use SQL/OPNQRYF to join the records >6) Give the data to the user in PC or HTML form and let them format it > >I you get some ideas from this list that might work for you. > --buck >_______________________________________________ >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. > ---------------------------------------------------------------------------- -- Get your FREE download of MSN Explorer at http://explorer.msn.com[1] ===References:=== 1. http://go.msn.com/bql/hmtag_itl_EN.asp _______________________________________________ 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.