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
 

 

Remove dupicates and format the output file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Remove dupicates and format the output file
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 Moderator


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

PostPosted: Thu Oct 23, 2008 9:30 pm    Post subject:
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    Post subject:
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    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 FTP xls file from Mainfrmae kumarsatheeshc1 TSO/ISPF 5 Tue Jun 20, 2017 6:56 pm
No new posts Validate if a Value from the file is ... balacsv2 COBOL Programming 8 Mon Jun 19, 2017 11:52 pm
No new posts Dynamic output file creation in cobol... smileheal COBOL Programming 7 Thu Jun 15, 2017 10:53 pm
No new posts compare 2 rows within the same file ram_vizag SYNCSORT 7 Wed Jun 14, 2017 12:34 am
No new posts XML Parse for large file muralikrishnan_new COBOL Programming 3 Mon Jun 12, 2017 12:50 pm


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