× 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 would rewrite it in RPG, but one solution (as way of implementing what
Rich Duzenbury posted), which requires less RPG (or whatever HLL).

F YSUSPREP UP       E         DISK

C     *ENTRY     PLIST
C                PARM              CODE
C
C                MOVEL(P) CODE     BREAKLVL

 * (may need to add a summary count function on 1st two QRY to have BREAKLVL
field?)
 * (or output a field you don't need on 1st two QRY, and use it instead of
BREAKLVL)


Add in between first two Queries below:


| ------------------------------------------------------------------------
|   PGM
|   /* FOR TRANSACTIONS */
|                RUNQRY     QRY(YNGTEST/YSUSPQRY1) +
|                             QRYFILE((QS36FSUR/GMICMFF1) +
|                             (QS36FSUR/GMITRNF1)) OUTTYPE(*OUTFILE)
| +
|                             OUTFILE(YNGTEST/YSUSPREP  *FIRST
| *RPLMBR)


                 CALL  RPGPGM 'T'

|   /* FOR POSITIONS    */
|                RUNQRY     QRY(YNGTEST/YSUSPQRY2) +
|                             QRYFILE((QS36FSUR/GMICMFF1) +
|                             (QS36FSUR/GMIPOSF1)) OUTTYPE(*OUTFILE)
| +
|                             OUTFILE(YNGTEST/YSUSPREP *FIRST
| *ADDMBR)

                 CALL  RPGPGM 'P'


|                RUNQRY     QRY(YNGTEST/YSUSPQRY3)
| ENDPGM
| ------------------------------------------------------------------------

Then change YSUSPQRY3:  Add BREAKLVL (or whatever field you use) as *first*
field in sort and add a summary break on this same field.  Change column
formatting on this field to "*NONE" (all caps, or "SRC" or whatever) and you
should then see:

------------------------- YSUSPREP-----------------------

     ACCOUNT   DESC                            EXCH         DATE
T    69999999  DEC 03 TSE 10 YR JGB             24    20,030,918

P    69999999  DEC 03 TSE TOPIX                 24    20,030,918
     69999999  DEC 03 TSE TOPIX                 24    20,030,918
     69999999  DEC 03 TSE TOPIX                 24    20,030,918
     69999999  DEC 03 TSE TOPIX                 24    20,030,918
     69999999  DEC 03 TSE TOPIX                 24    20,030,918

HTH, (and lemme have your email so I can send you a bill...  Just
kidding...;-)




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.