MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Left Justifying both record count and total amount for dept

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
sublak123
Beginner


Joined: 29 Jun 2017
Posts: 6
Topics: 6

PostPosted: Wed Nov 15, 2017 12:38 pm    Post subject: Left Justifying both record count and total amount for dept Reply with quote

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.
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12357
Topics: 75
Location: San Jose

PostPosted: Wed Nov 15, 2017 3:41 pm    Post subject: Reply with quote

sublak123,

Do you even read the responses you get ? or you simply start a new topic every time you have a question? It is rude to bulldoze the board with the same question over and over without ever bothering to responding to the earlier solutions.

bonk
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group