Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Need help with simple report........

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
rmd3003

New User


Joined: 03 Jul 2006
Posts: 53

PostPosted: Thu Jul 15, 2010 2:30 am    Post subject: Need help with simple report........
Reply with quote

I spent some time reading manuals but still............
Maybe somebody has similar example.

This is my input (I simplified to make it easier)..

Code:

----+----1----+----2----+----
NAME1    100       010       
NAME2    100       010       
NAME3    100       010       
NAME4    100       010       
NAME5    100       010       

I need to produce report like this (it has to be in CSV format so I insert ").
Trailer has to sum some fields.


Code:

      REPORT NAME GOES HERE    DATE: 2010-07-14
        "100"     "010"                       
        "100"     "010"                       
        "100"     "010"                       
        "100"     "010"                       
        "100"     "010"                       
TOTAL:  "500"     "050"                       


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: Thu Jul 15, 2010 2:59 am    Post subject: Reply to: Need help with simple report........
Reply with quote

rmd3003,

Use the following DFSORT JCL

Code:

//STEP0100 EXEC PGM=SORT                                       
//SYSOUT   DD SYSOUT=*                                         
//SORTIN   DD *                                               
----+----1----+----2----+----3----+----4----+----5----+----6---
NAME1    100       010                                         
NAME2    100       010                                         
NAME3    100       010                                         
NAME4    100       010                                         
NAME5    100       010                                         
//SORTOUT  DD SYSOUT=*                                         
//SYSIN    DD *                                               
  SORT FIELDS=COPY                                             
  OUTFIL REMOVECC,                                             
  BUILD=(9:C'"',10,3,C'"',19:C'"',20,3,C'"',80:X),             
  HEADER1=(7:'REPORT NAME GOES HERE    DATE: ',DATE=(4MD-)),   
  TRAILER1=('TOTAL',X,                                         
            TOT=(10,3,ZD,EDIT=("IIIIT)),'"',2X,               
            TOT=(20,3,ZD,EDIT=("IIIIT)),'"')                   
//*
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Thu Jul 15, 2010 3:34 am    Post subject:
Reply with quote

You can use a DFSORT job like the following to do what you asked for:

Code:

//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
NAME1    100       010
NAME2    100       010
NAME3    100       010
NAME4    100       010
NAME5    100       010
/*
//SORTOUT DD SYSOUT=*
//SYSIN DD *
  OPTION COPY
  OUTFIL REMOVECC,
    HEADER1=(7:'REPORT NAME GOES HERE',
        32:'DATE: ',DATE=(4MD-)),
   BUILD=(9:C'"',10,3,C'"',19:C'"',20,3,C'"',80:X),
   TRAILER1=('TOTAL:',9:C'"',TOTAL=(10,3,ZD,TO=ZD,LENGTH=3),
                     19:C'"',TOTAL=(20,3,ZD,TO=ZD,LENGTH=3),
    C'"')
/*
Back to top
View user's profile Send private message
rmd3003

New User


Joined: 03 Jul 2006
Posts: 53

PostPosted: Thu Jul 15, 2010 6:24 am    Post subject: Reply to: Need help with simple report........
Reply with quote

Wow, awesome guys. Thank you very much.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Report cost in CA-dispatch Nileshkul CA Products 3 Wed Jun 07, 2017 10:32 pm
No new posts Splitting of single report to seperat... abdulrafi TSO/ISPF 7 Mon Mar 27, 2017 3:59 pm
No new posts Easytrieve report shalem CA Products 4 Sun Feb 26, 2017 9:08 am
No new posts Detailed Transaction History report f... Kyle Carroll CICS 5 Tue Oct 18, 2016 12:42 am
No new posts Easytrieve - Report writing - Only 1 ... Abhi Nature CA Products 2 Wed Sep 14, 2016 11:40 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us