× 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 guess this never got posted. Re-sending..
Thanks, -s

Sudha Ramanujan
SunGard Futures Systems
sramanujan@xxxxxxxxxxxxxxxxxx
(312) 577 6179
(312) 577 6101 - Fax


-----Original Message-----
From: Ramanujan, Sudha 
Sent: Thursday, April 07, 2005 11:02 AM
To: 'RPG programming on the AS400 / iSeries'
Subject: RE: primary and secondary files, match fields, summarizing/printing 
single line per key

Carl,
You might have to add logic for file level *in01 and *in02 instead of L1 check 
for PRTDTL.  When *in01 is on, move the values to fields, and when *in02 is on, 
move the rest of the values and then call PRTDTL.
HTH,
Thanks,
Sudha

Sudha Ramanujan
SunGard Futures Systems
sramanujan@xxxxxxxxxxxxxxxxxx
(312) 577 6179
(312) 577 6101 - Fax


-----Original Message-----
From: "Mañoso, Carl" [mailto:ManosoCS@xxxxxxxxxxxxxxxxx] 
Sent: Wednesday, April 06, 2005 7:29 PM
To: rpg400-l (E-mail)
Subject: primary and secondary files, match fields, summarizing/printing single 
line per key

Mabuhay RPG gurus!

A colleague has this problem, which I cannot solve, involving primary and
secondary files and match fields. Here are the relevant code fragments and a
sample output. A record pertaining to a particular key doesn't necessarily
have to be in both files.

SAMPLE PROGRAM
==============
IPLNMJ1      01                                        
I                                              PLOYER  M6
I                                              PLOMKTL3M5
I                                              PLOIGRL2M4
I                                              PLOCSZL1M3
I                                              PLOCVTL1M2
I                                              PLOITML1M1
IINVSUM      02                                        
I                                              IVSYER  M6
I                                              IVSMKTL3M5
I                                              IVSIGRL2M4
I                                              IVSCSZL1M3
I                                              IVSCVTL1M2
I                                              IVSITML1M1
----------
  MAIN
----------
.
.
.
CL1                   EXSR PRTDTL
.
.


SAMPLE OUTPUT
=============
                                                          Cur Mo.   Total 
     Item_  Size__  Variety___  Market_PO_Description____  ___PO__  Shipmts
  CONC FOR DC OR DIRECT                                                    
*1*  01160  12-46   PO          EUROPE MARKET                1,000

*1*  01160  12-46   PO          EUROPE MARKET                           204

*2*  01254  6-10    J-          EUROPE MARKET                1,000         
*2*  01254  6-10    J-          EUROPE MARKET                           272

                                Sub-total                    2,000      476


QUESTION
========
*INL1 controls the printing of a detail line. In the sample output above,
lines indicated by *1* should supposedly appear in one line, lines indicated
by *2* also in one line. However, as you can see, *INL1 is triggered twice,
one for each file (primary and secondary), so that they were printed on two
separate lines. Printing on every other setting of *INL1 also doesn't work
because the records pertaining to a particular key need not appear in both
files.

Does anybody here knows of a technique that will print the summary of a
record with details coming from two separate files in a single line? We are
using RPG/400 on V4R5M0 (by order of our BDFL).

Thanks in advance.

--
Carl Mañoso
"It is not real work unless you would rather be doing something else."
[J.M.BARRIE]


-- 
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 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.