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
 

 

Summary report creation

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

New User


Joined: 04 Mar 2010
Posts: 38
Location: DC

PostPosted: Thu Mar 17, 2011 1:10 pm    Post subject: Summary report creation
Reply with quote

Hi All,

Is it possible to create a report for the below requirement?

Input File RECFM = FB, RECLEN = 80
Code:

015032011 - HEADER RECORD                   
1122645102390606012605039060114122010       
1122645372465595912605046559514122010       
1122645532000323212605000032814122010       
1122055611702434312605070243026012011       
1122057051415525212605041552726012011       
1122057481032939312605003293326012011       
1122645102390606012605039060127012011       
1122645372465595912605046559527012011       
1122645532000323212605000032827012011       
1160126050702434312605070243001022011       
1159126050460126050500390603701022011       
1132126050059126050500465595301022011       
1143126050032126050500000325301022011       
1152126050043126050500702435306022011       
1193126050052126050500415525306022011       
1160126050093126050500032935306022011       
1159126050060126050500390605306022011       
1132126050059126050500465595315032011       
1143126050032126050500000325315032011       
1152126050043126050500702435315032011       
1193126050022645532500226455315032011       
1160126050032931260500226455315032011       
90000022  - TRAILER RECORD                   


Date Field starts at pos 30, lenth=8 ( DDMMYYYY ). This file is getting accumulated daily. Need to create summary report based on the date field i.e How many records present for a particular date?

The given input file is a sample file. It may contain more than 10k records.

Output Report

Code:

DATE       NO OF RECORDS
------------------------
14122010 - 3           
26012011 - 3           
27012011 - 3           
01022011 - 4           
06022011 - 4           
15032011 - 5           
------------------------
TOTAL      22           


Thanks in advance.
Back to top
View user's profile Send private message

Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1825
Location: UK

PostPosted: Thu Mar 17, 2011 3:20 pm    Post subject:
Reply with quote

I did something like that - just playing around - by reading the sort manual and using the DISPLAY option
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 Mar 17, 2011 10:48 pm    Post subject:
Reply with quote

Alex,

Here's a DFSORT job that will do what you asked for:

Code:

//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=...  input file
//SORTOUT DD SYSOUT=*
//SYSIN DD *
  INCLUDE COND=(1,1,CH,EQ,C'1')
  INREC BUILD=(30,8,80:X)
  SORT FIELDS=(5,4,CH,A,3,2,CH,A,1,2,CH,A)
  OUTFIL REMOVECC,NODETAIL,
    HEADER2=('DATE       NO OF RECORDS'/,24'-'),
    SECTIONS=(1,8,
      TRAILER3=(1,8,C' - ',COUNT=(EDIT=(IIIT)))),
    TRAILER1=(24'-',/,'TOTAL',12:COUNT=(EDIT=(IIIT)))
/*
Back to top
View user's profile Send private message
Alexis Sebastian

New User


Joined: 04 Mar 2010
Posts: 38
Location: DC

PostPosted: Fri Mar 18, 2011 1:47 pm    Post subject:
Reply with quote

Frank,

Excellent. It works.

Thanks alot for your help and I understood the TRAILER concept now.

Happy week ends!!! icon_smile.gif
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 REXX - Dynamic file Creation d_sarlie CLIST & REXX 7 Tue Jun 27, 2017 7:30 pm
No new posts Dynamic output file creation in cobol... smileheal COBOL Programming 7 Thu Jun 15, 2017 10:53 pm
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


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