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

Can DFSORT do this ?


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

Active User


Joined: 29 Dec 2005
Posts: 181
Location: Canada

PostPosted: Tue Aug 19, 2008 9:10 pm
Reply with quote

Hi,

I have got following requirement:

A file has Duplicate records, and it looks like this

Code:

POLA  CERT1
POLA  CERT1
POLA  CERT1
POLB  CERT2
POLB  CERT2
POLB  CERT2
POLB  CERT2


now, I need to have output file like this

Code:

POLA  CERT1                  3
POLB  CERT2                  4


So basically ,we are writing the number of duplicate records ?
Please note that we need to do this with DFSORT, no ICETOOL.
Back to top
View user's profile Send private message
ap_mainframes

Active User


Joined: 29 Dec 2005
Posts: 181
Location: Canada

PostPosted: Tue Aug 19, 2008 9:16 pm
Reply with quote

Forgot to mention the RECFM and LRECL.
They are 80 and FB respectively

Thanks
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Tue Aug 19, 2008 10:09 pm
Reply with quote

You can use a DFSORT job like the following to do what you asked for. I assumed the records are in sorted order as shown in your example. If not, replace OPTION COPY with a SORT statement.

Code:

//S1    EXEC  PGM=ICEMAN                           
//SYSOUT    DD  SYSOUT=*                           
//SORTIN DD *                                       
POLA  CERT1                                         
POLA  CERT1                                         
POLA  CERT1                                         
POLB  CERT2                                         
POLB  CERT2                                         
POLB  CERT2                                         
POLB  CERT2                                         
//SORTOUT DD SYSOUT=*                               
//SYSIN    DD    *                                 
  OPTION COPY                                       
  OUTFIL REMOVECC,NODETAIL,                         
    SECTIONS=(1,11,                                 
      TRAILER3=(1,11,25:COUNT=(M10,LENGTH=5)))     
/*
Back to top
View user's profile Send private message
ap_mainframes

Active User


Joined: 29 Dec 2005
Posts: 181
Location: Canada

PostPosted: Wed Aug 20, 2008 2:36 am
Reply with quote

Thanks !! As usual , It worked perfectly.
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 Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts DFsort help with SUM() DFSORT/ICETOOL 12
No new posts DFSORT - VB file RDW getting overridden DFSORT/ICETOOL 3
Search our Forums:

Back to Top