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
 

 

How to splice two files

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

New User


Joined: 21 Oct 2005
Posts: 54

PostPosted: Wed Jan 04, 2006 5:36 pm    Post subject: How to splice two files
Reply with quote

Hi,

I have two files

File01

1111
2222
3333
4444
5555

file02

aaaa
bbbb
cccc
dddd
eeee

The record count in both the files is same in this case its 5

The output i want is

1111 aaaa
2222 bbbb
3333 cccc
4444 dddd
5555 eeee

That is the respective records from both the files have to be spliced together.

Regard,
Back to top
View user's profile Send private message

pushpagiri

New User


Joined: 07 Jul 2005
Posts: 51

PostPosted: Wed Jan 04, 2006 6:52 pm    Post subject:
Reply with quote

hi fixdoubts,

Try this link.Your example is explained there..

http://ibmmainframes.com/viewtopic.php?t=7130&start=0&postdays=0&postorder=asc&highlight=
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: Wed Jan 04, 2006 9:42 pm    Post subject:
Reply with quote

fixdoubts,

Here's a DFSORT/ICETOOL job that will do what you asked for:

Code:

//S1    EXEC  PGM=ICETOOL
//TOOLMSG   DD  SYSOUT=*
//DFSMSG    DD  SYSOUT=*
//IN1    DD DSN=...  file1
//IN2    DD DSN=...  file2
//TMP1   DD DSN=&&TEMP1,DISP=(MOD,PASS),SPACE=(TRK,(5,5)),UNIT=SYSDA
//OUT    DD DSN=...  output file
//TOOLIN DD *
COPY FROM(IN1) TO(TMP1) USING(CTL1)
COPY FROM(IN2) TO(TMP1) USING(CTL2)
SPLICE FROM(TMP1) TO(OUT) ON(12,8,ZD) WITH(7,5) USING(CTL3)
/*
//CTL1CNTL DD *
  OUTREC FIELDS=(1,5,X,5X,SEQNUM,8,ZD)
/*
//CTL2CNTL DD *
  OUTREC FIELDS=(5X,X,1,5,SEQNUM,8,ZD)
/*
//CTL3CNTL DD *
  OUTFIL FNAMES=OUT,OUTREC=(1,11)
/*


If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:

www.ibm.com/servers/storage/support/software/sort/mvs/srtmpub.html
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 High CPU consumption Job using IAM fi... aswinir JCL & VSAM 15 Thu Dec 01, 2016 8:28 pm
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm
This topic is locked: you cannot edit posts or make replies. How to use 2 input files in control c... Gunapala CN DFSORT/ICETOOL 23 Thu Oct 13, 2016 3:42 pm
No new posts Adding records from two files into on... shiitiizz SYNCSORT 4 Mon Sep 19, 2016 8:41 pm
No new posts Icetool or Joinkeys example to compar... ishant chauhan DFSORT/ICETOOL 21 Sat Aug 20, 2016 2:40 am


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