IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Need to create a report summary based on the input file


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Christy

New User


Joined: 17 Nov 2010
Posts: 14
Location: India

PostPosted: Mon Feb 28, 2011 3:43 pm
Reply with quote

I have an input file(LRECL=80)
the input file is as follows:

Code:

-1----+----2----+----3----+----4----+----5----+----6----+----7----+----8

                                   INVENTORY SUMMARY REPORT
   PRODUCT     SIZE        COLOUR      TYPE               NUMBER OF
                                                           ELEMENTS
   SHIRT       XXL         YELLOW      COTTON                     2
   SHIRT       XXL         YELLOW      SILK                      10
   SHIRT       XXL         YELLOW      POLYCOTTON                25
   SHIRT       XXL         YELLOW      LINEN                    100
   SHIRT       XXL         YELLOW                               137



i want my output file as:

Code:


----+----1----+----2----+----3----+----4----+----5----+----6----+----7-

           INVENTORY  SUMMARY REPORT
           -------------------------

           PRODUC:     SHIRT

           SIZE  :     XXL

           COLOUR:     YELLOW

           TYPE                  COUNT
           ----------         --------
           COTTON                    2
           SILK                     10
           POLYCOTTON               25
           LINEN                   100
           TOTAL ELEMENTS          137

The output file is also LRECL = 80.

thank you
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Tue Mar 01, 2011 12:07 am
Reply with quote

christy,

Use the following DFSORT JCL

Code:

//STEP0500 EXEC PGM=SORT                                               
//SYSOUT   DD SYSOUT=*                                                 
//SORTIN   DD *                                                         
                                   INVENTORY SUMMARY REPORT             
   PRODUCT     SIZE        COLOUR      TYPE               NUMBER OF     
                                                           ELEMENTS     
   SHIRT       XXL         YELLOW      COTTON                     2     
   SHIRT       XXL         YELLOW      SILK                      10     
   SHIRT       XXL         YELLOW      POLYCOTTON                25     
   SHIRT       XXL         YELLOW      LINEN                    100     
   SHIRT       XXL         YELLOW                               137     
//SORTOUT  DD SYSOUT=*                                                 
//SYSIN    DD *                                                         
  SORT FIELDS=COPY                                                     
  OMIT COND=(36,10,CH,EQ,C'INVENTORY',OR,                               
             04,07,CH,EQ,C'PRODUCT',OR,                                 
             60,08,CH,EQ,C'ELEMENTS')                                   
                                                                       
  OUTFIL REMOVECC,IFOUTLEN=80,                                         
  IFTHEN=(WHEN=INIT,BUILD=(12:40,30)),                                 
  IFTHEN=(WHEN=(12,16,CH,EQ,C' '),OVERLAY=(12:C'TOTAL ELEMENTS')),     
  HEADER1=(12:'INVENTORY  SUMMARY REPORT',/,12:25'-',/),               
  SECTIONS=(4,30,                                                       
  HEADER3=(12:'PRODUCT:',3X,04,8,/,/,                                   
           12:'SIZE   :',3X,16,8,/,/,                                   
           12:'COLOUR :',3X,28,8,/,/,                                   
           12:'TYPE    ',32:C'   COUNT',/,                             
           12:'--------',32:C'--------'))                               
//*
Back to top
View user's profile Send private message
Christy

New User


Joined: 17 Nov 2010
Posts: 14
Location: India

PostPosted: Tue Mar 01, 2011 1:35 pm
Reply with quote

Thank You. It worked and helped me a lot.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 0
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
Search our Forums:

Back to Top