|
View previous topic :: View next topic
|
| Author |
Message |
killms
New User
Joined: 17 Sep 2003 Posts: 16
|
|
|
|
there is 3 fiels. file1 is a FB/508 Qsam file. File2 is a FB/132 Qsam file.
file3 is FB/200 Vsam file.
file1 's column 1-3 is same with file2 's column 3-5 and file3 's column 1-3.
file1's column 4-22 is same with file2's column 11-29 and files' column 4-22.
now, i want to create file3 using icetool based on file1 and file2.
can anyone show me a jcl example?
thanks. |
|
| Back to top |
|
 |
killms
New User
Joined: 17 Sep 2003 Posts: 16
|
|
|
|
| the files 3 is non-dupilicated. |
|
| Back to top |
|
 |
priyesh.agrawal
Senior Member

Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
| Quote: |
| now, i want to create file3 using icetool based on file1 and file2. |
Means What.... Based on what conditions you want to write a record in file-3.
Better to show an input example....
Regards,
Priyesh. |
|
| Back to top |
|
 |
killms
New User
Joined: 17 Sep 2003 Posts: 16
|
|
|
|
files3's 1-22 columns should come from : either file1 's 1-22 or file2's 3-5 columns plus 11-29 columns.
for example:
if file1:
| Code: |
111abcdefghijklmnopqrstuv
222bcdefghijklmnopqrstuvw
333cdefghijklmnopqrstuvwx
|
if file2:
| Code: |
333 cdefghijklmnopqrstuvwx
444 defghijklmnopqrstuvwxy
|
then file3 should be:
| Code: |
111abcdefghijklmnopqrstuv
222bcdefghijklmnopqrstuvw
333cdefghijklmnopqrstuvwx
444defghijklmnopqrstuvwxy
|
|
|
| Back to top |
|
 |
killms
New User
Joined: 17 Sep 2003 Posts: 16
|
|
|
|
| other bytes of file3 should be spaces. |
|
| Back to top |
|
 |
Frank Yaeger
DFSORT Developer

Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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=... input file1 (FB/508)
//IN2 DD DSN=... input file2 (FB/132)
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)
//OUT DD DSN=... output file (FB/200 VSAM)
//TOOLIN DD *
COPY FROM(IN1) TO(T1) USING(CTL1)
COPY FROM(IN2) TO(T1) USING(CTL2)
SELECT FROM(T1) TO(OUT) ON(1,3,CH) FIRST VSAMTYPE(F)
/*
//CTL1CNTL DD *
OUTREC FIELDS=(1,200)
/*
//CTL2CNTL DD *
OUTREC FIELDS=(3,3,11,22,200:X)
/*
|
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 |
|
| Back to top |
|
 |
killms
New User
Joined: 17 Sep 2003 Posts: 16
|
|
|
|
thanks frank.
i TRY code a jcl like this, AND success.
| Code: |
//TOOL EXEC PGM=ICETOOL,REGION=1024K
//TOOLMSG DD SYSOUT=A
//DFSMSG DD SYSOUT=A
//TOOLIN DD *
SELECT FROM(IN1) TO(T1) ON(1,22,CH) FIRST
COPY FROM(T1) USING(CTL1) VSAMTYPE(F)
SELECT FROM(IN2) TO(T2) ON(3,3,CH) ON(11,19,CH) FIRST
COPY FROM(T2) USING(CTL2) VSAMTYPE(F)
/*
//IN1 DD DSN=file1 (fb/508),DISP=SHR
//IN2 DD DSN=file2 (fb/132),,DISP=SHR
//T1 DD DSN=&&T1,UNIT=3390,SPACE=(CYL,(5,5)),DISP=(,PASS)
//T2 DD DSN=&&T2,UNIT=3390,SPACE=(CYL,(5,5)),DISP=(,PASS)
//OUT DD DSN=FILE3(FB/200),DISP=SHR
//CTL1CNTL DD *
SORT FIELDS=(1,22,CH,A)
OUTFIL FNAMES=OUT,OUTREC=(1,22)
/*
//CTL2CNTL DD *
SORT FIELDS=(3,3,CH,A,11,19,CH,A)
OUTFIL FNAMES=OUT,OUTREC=(1:3,3,4:11,19)
/*
|
|
|
| Back to top |
|
 |
Prabha Warnings : 2 New User
Joined: 05 Dec 2005 Posts: 79
|
|
|
|
| can u pl explain yr code? |
|
| Back to top |
|
 |
Frank Yaeger
DFSORT Developer

Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
killms,
I'm not sure what you're doing or why you didn't just use the job I supplied, but since you have DISP=SHR for //OUT, you will only get the output records from the second COPY. You'd need DISP=MOD to get the records from both COPYs. |
|
| Back to top |
|
 |
killms
New User
Joined: 17 Sep 2003 Posts: 16
|
|
|
|
hi,framk
I have finished tmy jcl before you post the answer. so, I post my jcl just to show ICETOOL 's plentiful funtions. ^_^
I think your jcl is more concise than mine.  |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|