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

Avoid the duplicates and write a third file with only CC


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
lekshmi_ci

New User


Joined: 14 Mar 2007
Posts: 60
Location: Thiruvananthapuram

PostPosted: Fri Sep 14, 2007 11:27 am
Reply with quote

hi,

i have an issue. Please help me in finding the solution
there are two report files: sa Jan and Dec
Jan:
AA
BB

Dec:
AA
BB
CC

I want to avoid the duplicates and write a third file with only CC value.
sumfields = none will give AA.. BB.. CC. Could you please suggest how to get only CC value elimination gduplicates (AA and BB).

Thanks
LC
Back to top
View user's profile Send private message
Devzee

Active Member


Joined: 20 Jan 2007
Posts: 684
Location: Hollywood

PostPosted: Fri Sep 14, 2007 11:30 am
Reply with quote

Use ICETOOL
Back to top
View user's profile Send private message
acevedo

Active User


Joined: 11 May 2005
Posts: 344
Location: Spain

PostPosted: Fri Sep 14, 2007 11:33 am
Reply with quote

or SyncSort.
Back to top
View user's profile Send private message
lekshmi_ci

New User


Joined: 14 Mar 2007
Posts: 60
Location: Thiruvananthapuram

PostPosted: Fri Sep 14, 2007 11:45 am
Reply with quote

If you could please explain on this... it would be gr8..
i am really very new to syncsort ans icetool.. i would be grateful if you could provide me the steps
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Fri Sep 14, 2007 12:04 pm
Reply with quote

Code the below JCL using the SELECT operator of ICETOOL

Code:

//STEP001  EXEC PGM=ICETOOL                                   
//TOOLMSG  DD  SYSOUT=*                                       
//DFSMSG   DD  SYSOUT=*                                       
//IN1      DD DSN=AV5875.BSEUA.OUTPUT2,DISP=SHR               
//IN2      DD DSN=AV5875.BSEUA.OUTPUT1,DISP=SHR               
//TMP      DD DSN=&&TLP,DISP=(MOD,PASS)                       
//OUT      DD DSN=AV5875.TLKPE3.OUSDKR,                       
//         DISP=(NEW,CATLG,DELETE),                           
//         SPACE=(CYL,(10,5),RLSE),                           
//         DCB=(RECFM=FB,LRECL=80,BLKSIZE=0),                 
//         UNIT=SYSDA                                         
//TOOLIN   DD *                                               
  COPY FROM(IN1) TO(TMP) USING(CPY1)                           
  COPY FROM(IN2) TO(TMP) USING(CPY2)                           
  SELECT FROM(TMP) TO(OUT) ON(1,2,CH) NODUPS USING(CPY3)       
/*                                                             
//CPY1CNTL DD *                                               
 INREC OVERLAY=(81:C'1')                                       
/*                                                             
//CPY2CNTL DD *                                               
 INREC OVERLAY=(81:C'2')                                       
/*                                                             
//CPY3CNTL DD *                                               
 OUTFIL FNAMES=OUT,INCLUDE=(81,1,CH,EQ,C'1'),BUILD=(1,80)     
/*                                                             



Input 1:


Code:

AA                                                                     
BB                                                                     
CC   


Input 2:

Code:

AA                         
BB


Output:

Code:

 CC   
Back to top
View user's profile Send private message
balakrishna reddy

Active User


Joined: 13 Jul 2007
Posts: 128
Location: Guntur

PostPosted: Fri Sep 14, 2007 12:07 pm
Reply with quote

hi lekshmi,

This issue is already discussed i think.

Code:

//S1    EXEC  PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD DSN=...  input file1 (FB/690)
//IN2 DD DSN=...  input file2 (FB/72)
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)
//OUT DD DSN=...  output file (FB/690)
//TOOLIN DD *
COPY FROM(IN2) TO(T1) USING(CTL1)
COPY FROM(IN1) TO(T1) USING(CTL2)
SPLICE FROM(T1) TO(OUT) ON(1,16,CH) WITHALL WITH(1,691) -
  KEEPNODUPS KEEPBASE USING(CTL3)
/*
//CTL1CNTL DD *
  OUTREC OVERLAY=(691:C'11')
/*
//CTL2CNTL DD *
  OUTREC OVERLAY=(691:C'22')
/*
//CTL3CNTL DD *
  OUTFIL FNAMES=OUT,INCLUDE=(691,2,CH,EQ,C'22'),
    OUTREC=(1,690)
/*


Please make changes accordingly as per your requirements.
Back to top
View user's profile Send private message
shankar.v

Active User


Joined: 25 Jun 2007
Posts: 196
Location: Bangalore

PostPosted: Fri Sep 14, 2007 1:21 pm
Reply with quote

lekshmi_ci,
Quote:
hi,

i have an issue. Please help me in finding the solution
there are two report files: sa Jan and Dec
Jan:
AA
BB

Dec:
AA
BB
CC

I want to avoid the duplicates and write a third file with only CC value.
sumfields = none will give AA.. BB.. CC. Could you please suggest how to get only CC value elimination gduplicates (AA and BB).

Thanks
LC


Please check with the following code for your requirement. The below code will works fine in the efficient way provided if your two report files have a unique key fields.

Code:
// EXEC PGM=ICETOOL
//DFSMSG DD SYSOUT=*
//TOOLMSG DD SYSOUT=*
//OUT DD SYSOUT=*
//RPTFILES DD DSN=RPTFILE1,DISP=SHR
//         DD DSN=RPTFILE2,DISP=SHR
//TOOLIN DD *
 SELECT FROM(RPTFILES) TO(OUT) ON(1,2,CH) NODUPS
/*
// 

Quote:
If you could please explain on this... it would be gr8..
i am really very new to syncsort ans icetool.. i would be grateful if you could provide me the steps

Please check in your QW (Quick Reference Tool) for SYNCSORT tutorial , if available in your shop.
Quote:
Unfortunately, all licensed SyncSort customers must request manuals directly from us, or download it from our website using an online support account. It is in breach of contract for an individual to share SyncSort documentation with others outside of their own company. However, please feel free to pass on my contact info to anyone who is in need of manuals and I would be happy to assist.
Regards,
Alissa
Alissa Margulies
SyncSort Mainframe Support
201.930.8260
zos_tech@syncsort.com
Back to top
View user's profile Send private message
lekshmi_ci

New User


Joined: 14 Mar 2007
Posts: 60
Location: Thiruvananthapuram

PostPosted: Fri Sep 14, 2007 2:30 pm
Reply with quote

Thank a lot all. icon_smile.gif
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
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