fixdoubts
New User
Joined: 21 Oct 2005 Posts: 54
|
|
|
|
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, |
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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:
Use [URL] BBCode for External Links |
|