sublak123 Beginner
Joined: 29 Jun 2017 Posts: 6 Topics: 6
|
Posted: Wed Nov 15, 2017 12:38 pm Post subject: Left Justifying both record count and total amount for dept |
|
|
I want to left justify the record count and total amount using inrec overlay/any other way in single step.
Input :
Code: |
--------
010 000000012
010 000000013
020 000000013
020 000000014
|
Expected Output:
Code: |
010 12/12/17 2 25
020 12/12/17 2 27
|
Sort Card:
Code: |
OPTION COPY
INREC IFTHEN=(WHEN=GROUP,
BEGIN=(2,6,CH,EQ,C'ABC311'),
PUSH(137:101,8)),
IFTHEN=(WHEN=GROUP,
BEGIN=(2,05,CH,EQ,C'DEPT '),
PUSH(134:8,3)),
IFTHEN=(WHEN=(008,03,SS,EQ,C'010,020',AND,
028,02,CH,EQ,C'22',AND,
021,02,SS,EQ,C'01,02',AND,
((134,3,ZD,GT,950,AND,
134,3,ZD,LT,960))),
OVERLAY=(146:SEQNUM,8,FS,RESTART=(8,3),
146:146,8,JFY=(SHIFT=LEFT),
154:TOT=(110,9),FS,RESTART=(8,3),
154:154,9,JFY=(SHIFT=LEFT)))
OUTFIL FNAMES=SORTOUT,REMOVECC,NODETAIL,
INCLUDE=(146,1,CH,GT,C' '),
SECTIONS=(8,3,
TRAILER3=(1X,
8,3, department
14X,
137,8, current-date
1X,
146,8, count of records based on dept
8X,
154,9)) total amt based on dept
|
I have tried with above sort card, but I am getting error as TOT= can't be used in inrec overlay. Since I have to left justify count & amount, and this can't be given in TRAILER3. Please suggest me how to do left justification for total field in Inrec. |
|