MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Regarding writing duplicate Records to output file

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
drajasekharreddy
Beginner


Joined: 08 Apr 2004
Posts: 16
Topics: 14

PostPosted: Wed Jun 23, 2004 12:03 am    Post subject: Regarding writing duplicate Records to output file Reply with quote

Hi,

I have one query. that is i have two input files and i want to write common records from two input files into out file using JCL.i know how to eliminate duplicate records, thru sort utility using SUM FILEDS =NONE, with this sysin parameter we can elimate duplicate records. but i want copy duplicate records from 2 inputfiles into one output file. can any one explain me with JCL example.

Thanx,
Raja
Back to top
View user's profile Send private message
souvik_225
Beginner


Joined: 15 May 2004
Posts: 17
Topics: 2
Location: Mumbai , India

PostPosted: Wed Jun 23, 2004 3:26 am    Post subject: Reply with quote

Use this :
Code:

//STEP010   EXEC  PGM=ICETOOL                                           
//*                                                                     
//TOOLMSG   DD  SYSOUT=*                                               
//DFSMSG    DD  SYSOUT=*                                               
//*                                                                     
//IN1       DD DSN=your.INPUT1,DISP=SHR                         
//IN2       DD DSN=your.INPUT2,DISP=SHR                         
//* 
//T1        DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)   
//*                                                                     
//OUT       DD DSN=G1BYXJT.UTIL.OUTPUT,                                 
//             DISP=(NEW,CATLG,KEEP),MGMTCLAS=TSONORM,                 
//             AVGREC=K,SPACE=(CYL,(80,20),RLSE),UNIT=SYSDA,           
//             DCB=(RECFM=??,LRECL=??,BLKSIZE=0)                       
//*                                                                     
//TOOLIN    DD *                                                       
  COPY FROM (IN1) TO (T1) USING CTL1
  COPY FROM (IN2) TO (T1) USING CTL1 
  SELECT FROM (T1) TO (OUT) ON(starting pos of key,length,CH) ALLDUPS                             /*                                                                     
//CTL1CNTL DD *                                                         
  SORT FIELDS=(starting pos of key,length,A),FORMAT=CH,EQUALS                                 
/*                                                                     
//*

_________________
Thanks and Regards,
Souvik Upadhyay
Back to top
View user's profile Send private message Yahoo Messenger
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12369
Topics: 75
Location: San Jose

PostPosted: Wed Jun 23, 2004 5:28 am    Post subject: Reply with quote

drajasekharreddy,

Please search before posting . You have been an active member, so please try to follow the rules. Check the following links

http://www.mvsforums.com/helpboards/viewtopic.php?t=11&highlight=match

http://www.mvsforums.com/helpboards/viewtopic.php?t=9&highlight=alldups

http://www.mvsforums.com/helpboards/viewtopic.php?t=431&highlight=duplicates

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12369
Topics: 75
Location: San Jose

PostPosted: Wed Jun 23, 2004 5:39 am    Post subject: Reply with quote

Souvik Upadhyay,

You don't need 3 steps to get the desired results. you can simply concatenate both the files and use the parm ALLDUPS on a SELECT statement.

Take a look at this topic

http://www.mvsforums.com/helpboards/viewtopic.php?t=9&highlight=alldups

You also might want to add a disclaimer for your DFSORT/ICETOOL solutions, as not all DFSORT/ICETOOL solutions are compatible with SYNCSORT/synctool.

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
souvik_225
Beginner


Joined: 15 May 2004
Posts: 17
Topics: 2
Location: Mumbai , India

PostPosted: Wed Jun 23, 2004 5:52 am    Post subject: Reply with quote

Kolusu,
Sorry for the 3 steps when 1 was sufficient ... will keep this in mind ... Embarassed

And yes I will add a disclaimer that all ICETOOL are not compatible with SYNCTOOL ... the original poster did not specify whether he wanted DFSORT/ICETOOL or SYNCSORT/SYNCTOOL ...
_________________
Thanks and Regards,
Souvik Upadhyay
Back to top
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group