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
 

 

small problem in generating the report

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

New User


Joined: 03 Jun 2008
Posts: 14
Location: chennai

PostPosted: Mon Mar 29, 2010 5:24 pm    Post subject: Outfil Fields
Reply with quote

Hi,
I have a small problem in generating the report. Can any one help me out? I have 2 fields ID and Code.

Input:

ID Code
000001 052
000001 052
000001 053
000002 052
000002 052
000002 053
000002 053


Output:

ID Code
000001 052
000001 052
Sub count : 2
000001 053
Sub count : 1
Total no of 000001 records : 3

000002 052
000002 052
Sub count : 2
000002 053
000002 053
Sub count : 2
Total no of 000002 records : 4
Back to top
View user's profile Send private message

Skolusu

Senior Member


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

PostPosted: Mon Mar 29, 2010 10:34 pm    Post subject:
Reply with quote

harithaganna,

You need a 2 level break report which needs 2 passes of data. Here is a DFSORT/ICETOOL job which would give you the desired results. I assumed that your input is FB recfm and lrecl of 80 and your data is already sorted on the keys.

Code:

//STEP0100 EXEC PGM=ICETOOL                                 
//TOOLMSG  DD SYSOUT=*                                       
//DFSMSG   DD SYSOUT=*                                       
//IN       DD DSN=your input FB lrecl 80 bytes file,DISP=SHR
//T1       DD DSN=&&T1,DISP=(,PASS),SPACE=(CYL,(X,Y),RLSE)   
//OUT      DD SYSOUT=*                                       
//TOOLIN   DD *                                             
  COPY FROM(IN) USING(CTL1)                                 
  COPY FROM(T1) USING(CTL2)                                 
//CTL1CNTL DD *                                             
  OUTFIL FNAMES=T1,REMOVECC,OVERLAY=(81:C'1'),               
  SECTIONS=(1,10,                                           
  TRAILER3=(1,10,2X,COUNT=(M10,LENGTH=8),81:C'0'))           
//CTL2CNTL DD *                                             
  OUTFIL FNAMES=OUT,IFOUTLEN=80,                             
  IFTHEN=(WHEN=(81,1,ZD,EQ,0),OVERLAY=(C'SUB COUNT :')),     
  SECTIONS=(1,6,                                             
  TRAILER3=('TOTAL NO OF ',1,6,C' RECORDS : ',               
             TOT=(81,1,ZD,M10,LENGTH=8),//))                 
//*
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Mar 29, 2010 11:19 pm    Post subject:
Reply with quote

Hello,

Hopefully, there are only a small number of records in the input file.

If there are hundreds of millions of records (like many of our processes), suggest the second pass is just wasted resources and some other implementation would be considered. . .
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 Strings with double quotes having pro... raja Arumugam All Other Mainframe Topics 11 Thu Mar 30, 2017 10:34 am
No new posts Splitting of single report to seperat... abdulrafi TSO/ISPF 7 Mon Mar 27, 2017 3:59 pm
No new posts Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 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