Here is the original Query section of the job:
!RUN QUERY.PUB.SYS
B=MEMBRS
LOOKUP
5
S=SHARE-FILE
ASSIGN LOCKOPTION=OFF
OUTPUT=LP
F ACCOUNT LT 999999000 AND REST-FLAG-11 LT 80 AND &
REST-FLAG-12 LT 80 AND &
DESC-ABRV="RSV","SSV","CSP","EST","GRD","REP","TST","UTM", &
"NSV","IRA","IRO","IED","SEP","DCP","MTC"
REPORT
NOPAGE
D1,"DIVD",4
D1,ACCOUNT,13
D1,SUFFIX,15
S,SUFFIX
S,ACCOUNT
END
EXIT
!endif
Below is the equivalent Suprtool task, which executes much more quickly. The Define commands describe the format of the output file, which is with all fields in DISPLAY format (i.e., ASCII). The Extract commands move the field values from the database record to the new output file record. In this case there are no adjustments or changes to the data, just a simple extract. But with Suprtool there could be. Notice that we inserted a literal "DIVD" at the start of each output record. The Sort commands sort the records by the SUFFIX and ACCOUNT fields.
!run suprtool.pub.robelle
base membrs,5,LOOKUP
get share-file
if ACCOUNT < 999999000 and REST-FLAG-11 < 80 and &
REST-FLAG-12 < 80 and &
DESC-ABRV="RSV","SSV","CSP","EST","GRD","REP","TST","UTM", &
"NSV","IRA","IRO","IED","SEP","DCP","MTC"
sort suffix
sort account
define fld1,1,9,display
define fld2,1,2,display
sort suffix
sort account
extract "DIVD"
extract fld1 = account
extract fld2 = suffix
output qslist
exit
Instead of doing this:
!RUN PFASTTAG.PGMS.SPECTRUM;LIB=P B=MEMBRS *****pass******** 5 S=SHARE-FILE F ACC <> 92,94,98,99 O=LP REPORT NOPAGE D,ACCOUNT,13 D,SUFFIX,15 D,DESC-ABRV,20 D,ACC,26 D,ENTRY-DATE,34 D,PERIOD-LOW-BAL,44 D,LAST-CHG-DATE,52 D,BALANCE,62 D,REST-FLAG-11,66 D,REST-FLAG-12,70 END EXIT !EOD !RELEASE DRFEETG1 !PURGE DRFEETG2 !SORT INPUT DRFEETG1 OUTPUT DRFEETG2 KEY 1,13 KEY 14,2,DESC END !EODWe do this with Suprtool:
!run Suprtool.pub.robelle base MEMBRS,5,****password***** get SHARE-FILE if ACC <> 92,94,98,99 define D-ACCOUNT,1,13,display define D-SUFFIX,1,2,display define D-DESC-ABRV,1,5,display define D-ACC,1,6,display define D-ENTRY-DATE,1,8,display define D-PERIOD-LOW-BAL,1,10,display define D-LAST-CHG-DATE,1,8,display define D-BALANCE,1,10,display define D-REST-FLAG-11,1,4,display define D-REST-FLAG-12,1,4,display sort ACCOUNT extract D-ACCOUNT = ACCOUNT extract D-SUFFIX = SUFFIX extract D-DESC-ABRV = DESC-ABRV extract D-ACC = ACC extract D-ENTRY-DATE = ENTRY-DATE extract D-PERIOD-LOW-BAL = PERIOD-LOW-BAL extract D-LAST-CHG-DATE = LAST-CHG-DATE extract D-BALANCE = BALANCE extract D-REST-FLAG-11 = REST-FLAG-11 extract D-REST-FLAG-12 = REST-FLAG-12 output DRFEETG2 exitThe Define commands describe the format of the output file, which is with all fields in DISPLAY format (i.e., ASCII).
The Extract commands move the field values from the database record to the new output file record. In this case there are no adjustments or changes to the data, just a simple extract. But with Suprtool there could be.
The Sort command sorts the records by the ACC field.
Note: Qedit and Suprtool are trademarks of Robelle Solutions Technology Inc. Spectrum is a trademark of Fiserv.
|
|
|---|