Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search 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
Author Message
ap_mainframes

Active User


Joined: 29 Dec 2005
Posts: 146
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
References
ap_mainframes

Active User


Joined: 29 Dec 2005
Posts: 146
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: 4621
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: 146
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
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1