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

Remove dupicates and format the output file


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

New User


Joined: 03 Oct 2008
Posts: 25
Location: chennai

PostPosted: Thu Oct 23, 2008 4:40 pm
Reply with quote

hello,
There is a requirement in which i need to remove duplicates and retain the duplicates in another file with certain format.
using the following JCL i removed the duplicates:

Code:
         
//STEP1    EXEC PGM=ICETOOL                                       
//TOOLMSG  DD SYSOUT=*                                           
//DFSMSG   DD SYSOUT=*                                         
//SYSOUT   DD SYSOUT=*                                           
//INDD1    DD DSN=TTOI.SUMA.FILE1,DISP=SHR                       
//OUTDD1   DD DSN=TTOI.SUMA.SORTXSUM.OUTPUT,                     
//            DISP=SHR                                           
//SORTXSUM DD DSN=TTOI.SUMA.SORTDUP2.OUTPUT,                     
//            DISP=SHR                                           
//TOOLIN   DD *                                                   
  SELECT FROM(INDD1) TO(OUTDD1) ON(1,1,CH) FIRST DISCARD(SORTXSUM)
/*


I need to format my output file, i tried including outrec option but it is not allowed in it...
OUTREC OPTION :
OUTREC FIELDS=(1:1,14,16:28,19,36:16,11,49:49,22)
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: Thu Oct 23, 2008 9:30 pm
Reply with quote

You need to use an OUTFIL statement, not an OUTREC statement.

Which file are you trying to reformat - OUTDD1 or SORTXSUM or both?

If you want to reformat OUTDD1 and SORTXSUM, you would use this DFSORT/ICETOOL job:

Code:

//STEP1    EXEC PGM=ICETOOL
//TOOLMSG  DD SYSOUT=*
//DFSMSG   DD SYSOUT=*
//SYSOUT   DD SYSOUT=*
//INDD1    DD DSN=TTOI.SUMA.FILE1,DISP=SHR
//OUTDD1   DD DSN=TTOI.SUMA.SORTXSUM.OUTPUT,
//            DISP=SHR
//SORTXSUM DD DSN=TTOI.SUMA.SORTDUP2.OUTPUT,
//            DISP=SHR
//TOOLIN   DD *
  SELECT FROM(INDD1) TO(OUTDD1) ON(1,1,CH) FIRST DISCARD(SORTXSUM)-
   USING(CTL1)
/*
//CTL1CNTL DD *
  OUTFIL FNAMES=OUTDD1,BUILD=(1:1,14,16:28,19,36:16,11,49:49,22)
  OUTFIL FNAMES=SORTXSUM,BUILD=(1:1,14,16:28,19,36:16,11,49:49,22)
/*


If you want to do something else, let me know what you want to do.
Back to top
View user's profile Send private message
suma_infy

New User


Joined: 03 Oct 2008
Posts: 25
Location: chennai

PostPosted: Fri Oct 24, 2008 9:48 am
Reply with quote

Thanks a lot for ur valuable suggestion. Its working fine now icon_smile.gif

Thanks & Regards,
suma
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 Compare 2 files and retrive records f... DFSORT/ICETOOL 0
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
Search our Forums:

Back to Top