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
 

 

Avoid the duplicates and write a third file with only CC

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Avoid the duplicates and write a third file with only CC
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    Post subject:
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    Post subject:
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    Post subject:
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: 1288
Location: Chennai, India

PostPosted: Fri Sep 14, 2007 12:04 pm    Post subject: Reply to: Eliminating Duplicates
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: 130
Location: Guntur

PostPosted: Fri Sep 14, 2007 12:07 pm    Post subject:
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    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Display ZEDLMSG without Pressing F1 &... anandgbe CLIST & REXX 8 Thu Dec 15, 2016 4:20 pm
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm


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