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
 

 

Report Formatting using SORT/ICETOOL

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

New User


Joined: 19 Feb 2011
Posts: 2
Location: CHENNAI

PostPosted: Sat Feb 19, 2011 3:01 pm    Post subject: Report Formatting using SORT/ICETOOL
Reply with quote

Hi,

Please let me know how to make the following report using ICETOOL/SORT

My Input file:

101 N data1
205 Y data2
307 N data3
101 Y data4
309 N data5
205 Y data6
307 N data7
119 Y data8
101 N data9

Here the first three character field is transaction numbers ,'N' and 'Y' represents transaction types and rest of the data vary from each record to record.

I need to report like below:

Section 1( should look like below)
101 N data1
307 N data3
309 N data5
307 N data7
101 N data9

section 2
205 Y data2
101 Y data4
205 Y data6
119 Y data8

summary section

TRANSACTION TYPE NUMBER
----------------- ------- ----------
101 N 2
307 N 2
309 N 1
205 Y 2
101 Y 1
119 Y 1


Thanks,
K
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: Tue Feb 22, 2011 2:13 am    Post subject:
Reply with quote

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

Code:

//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD *
101  N   data1
205  Y   data2
307  N   data3
101  Y   data4
309  N   data5
205  Y   data6
307  N   data7
119  Y   data8
101  N   data9
/*
//**>  OUT MUST BE A MOD DATA SET
//OUT DD DISP=MOD,DSN=...  output file (FB/80)
//TOOLIN DD *
SORT FROM(IN) TO(OUT) USING(CTL1)
SORT FROM(IN) TO(OUT) USING(CTL2)
/*
//CTL1CNTL DD *
  OPTION EQUALS
  INREC IFTHEN=(WHEN=(6,1,CH,EQ,C'N'),
     OVERLAY=(81:SEQNUM,8,ZD,89:C'1')),
        IFTHEN=(WHEN=(6,1,CH,EQ,C'Y'),
     OVERLAY=(81:SEQNUM,8,ZD,89:C'2'))
  SORT FIELDS=(6,1,CH,A,81,8,ZD,A)
  OUTFIL REMOVECC,
    BUILD=(1,80),
    SECTIONS=(6,1,HEADER3=(/,'Section ',89,1))
/*
//CTL2CNTL DD *
  SORT FIELDS=(6,1,CH,A,1,3,CH,A)
  OUTFIL REMOVECC,NODETAIL,
    HEADER2=(/,'summary section',/,X,/,
     'TRANSACTION        TYPE    NUMBER',/,
     '-----------------  ------- ----------'),
    SECTIONS=(1,6,
      TRAILER3=(1,3,20:6,1,28:COUNT=(M10,LENGTH=10)))
/*
Back to top
View user's profile Send private message
Kothai sentha

New User


Joined: 19 Feb 2011
Posts: 2
Location: CHENNAI

PostPosted: Thu Feb 24, 2011 8:46 am    Post subject:
Reply with quote

It worked, Thanks a lot Frank..
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 Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm
No new posts Detailed Transaction History report f... Kyle Carroll CICS 5 Tue Oct 18, 2016 12:42 am


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