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
 

 

Can DFSORT do this ?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Can DFSORT do this ?
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    Post subject: Reply to: Can DFSORT do this ?
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 Moderator


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

PostPosted: Tue Aug 19, 2008 10:09 pm    Post subject:
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    Post subject: Reply to: Can DFSORT do this ?
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    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 DFSORT - Overriding default option TU... Steve Ironmonger DFSORT/ICETOOL 3 Tue Apr 04, 2017 3:54 pm
No new posts DFSORT MUL FIELDS tspr52 DFSORT/ICETOOL 16 Fri Mar 03, 2017 11:53 pm
No new posts How to get the remainder and quotient... vnktrrd DFSORT/ICETOOL 2 Mon Oct 31, 2016 10:59 am
No new posts Change date (DD/MM/YY) in 2nd record ... uday kiran DFSORT/ICETOOL 12 Wed Sep 07, 2016 10:57 pm
No new posts DFSORT sorting only specific records akodakka DFSORT/ICETOOL 4 Thu Aug 04, 2016 11:24 am


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