Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Merging 2 files conditionally

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
ozgurseyrek

New User


Joined: 22 Feb 2008
Posts: 70
Location: Turkey

PostPosted: Fri Jun 26, 2009 4:58 pm    Post subject: Merging 2 files conditionally
Reply with quote

Hello,
I want to merge 2 dataset just like described at the sample,
is it possible?
Thanks...


dataset 1 (FB, LRECL = 16)
Code:
000001 testdata1
000002 testdata2
000003 testdata3
000004 testdata4
000005 testdata5
000006 testdata6


dataset2 (FB, LRECL=12)
Code:
000001 info1
000003 info3
000004 info4


desired Output dataset (FB LRECL=21)
Code:
000001 testdata1info1
000002 testdata2     
000003 testdata3info3
000004 testdata4info4
000005 testdata5     
000006 testdata6     
Back to top
View user's profile Send private message

ozgurseyrek

New User


Joined: 22 Feb 2008
Posts: 70
Location: Turkey

PostPosted: Fri Jun 26, 2009 6:23 pm    Post subject:
Reply with quote

I have merged files with that jcl,
thanks..
Code:
                                                                 
//SORTST1  EXEC  PGM=ICETOOL                                       
//TOOLMSG  DD    SYSOUT=*                                         
//DFSMSG   DD    SYSOUT=*                                         
//IN1      DD    DSN=DATASET1,DISP=SHR                     
//IN2      DD    DSN=DATASET2,DISP=SHR                     
//TMP1     DD    DSN=DATASET.TEMP,DISP=MOD                 
//OUT      DD    DSN=DATASET.OUT,DISP=(NEW,CATLG,KEEP),   
//             RECFM=FB,LRECL=21,SPACE=(CYL,(1,1),RLSE)           
//TOOLIN   DD    *                                                 
 COPY FROM(IN1) TO(TMP1) USING(CPY1)                               
 COPY FROM(IN2) TO(TMP1) USING(CPY2)                               
 SPLICE FROM(TMP1) TO(OUT) ON(1,6,CH) WITHALL KEEPNODUPS WITH(17,5)
/*                                                                 
//CPY1CNTL DD    *                                                 
 OUTREC FIELDS=(1:1,16,17:5X)                                     
/*                                                                 
//CPY2CNTL DD    *                                                 
 OUTREC FIELDS=(1:1,6,8:09X,17:8,5)                               
/*                                                                 
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 Split files upto certain limit based ... bubbu75 DFSORT/ICETOOL 5 Tue Nov 14, 2017 11:11 pm
No new posts Copy selected columns from 2 input fi... Poha Eater DFSORT/ICETOOL 3 Thu Nov 02, 2017 3:43 pm
No new posts Finding difference between two PS fil... Vignesh Sid SYNCSORT 5 Mon Oct 30, 2017 1:13 pm
No new posts NDM 300 files from mainframe to linux shreya19 All Other Mainframe Topics 2 Thu Oct 26, 2017 11:40 am
No new posts FTP Skip or ignore error and process ... AJAYREDDY All Other Mainframe Topics 3 Wed Sep 27, 2017 8:12 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us