View previous topic :: View next topic
|
Author |
Message |
ibmmainframesyntel
Active User
Joined: 26 Feb 2007 Posts: 126 Location: Chennai
|
|
|
|
Hi,
I have three input files
File1 - LRECL=10
partnumber - x(10)
partnumber
-------
0000000001
0000000002
0000000003
File2 - LRECL - 18
partnumber - x(10)
volume - s9(15) comp-3
partnumber volume
------------- --------
0000000001
0000000002
0000000003
0000000004
0000000005
0000000006
File3 - LRECL - 16
partrnumber - x(10)
price - s9(7)v9(4) comp-3
partnumber price
------------- --------
0000000001
0000000002
0000000003
0000000004
0000000005
0000000006
0000000007
Output file should contain
partnumber volume part
------------- -------- ------
0000000001
0000000002
0000000003
The matching key from first file sholud be in the output file |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Quote: |
Output file should contain
partnumber volume part
------------- -------- ------
0000000001
0000000002
0000000003 |
I assume that you mean
Output file should contain
partnumber volume price
------------- -------- ------
0000000001
0000000002
0000000003
And also, as you have posted in the JCl forum you are using SYNCSORT rather than DFSORT ? |
|
Back to top |
|
|
ibmmainframesyntel
Active User
Joined: 26 Feb 2007 Posts: 126 Location: Chennai
|
|
|
|
yes.......
In our mainframe,only SYNCSORT is available.... |
|
Back to top |
|
|
Venugopalsubbiah
New User
Joined: 12 Aug 2008 Posts: 7 Location: Bangalore
|
|
|
|
I beileve you need to compare FILE1 and FILE2 first and create a temp output file which will have
partnumber volume
Then do one more compare with temp output file & FILE3 and produce final output file which will have below fileds as requested.
partnumber volume price
Note for both the comparisons key will be partnumber.
And above can be achieved using Ezetrieve very easily.
Hope this helps. |
|
Back to top |
|
|
ibmmainframesyntel
Active User
Joined: 26 Feb 2007 Posts: 126 Location: Chennai
|
|
|
|
No, i prefer only JCL....... |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
ibmmainframesyntel wrote: |
No, i prefer only JCL....... |
So what have you achieved yourself so far, and what errors are you getting that you need help with. |
|
Back to top |
|
|
ibmmainframesyntel
Active User
Joined: 26 Feb 2007 Posts: 126 Location: Chennai
|
|
|
|
I dn't knw how to code the JCl for my requirement.. |
|
Back to top |
|
|
ibmmainframesyntel
Active User
Joined: 26 Feb 2007 Posts: 126 Location: Chennai
|
|
|
|
Is the above requiremet is possible thr ICETOOL utility? If yes,any one can help me out.. |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
ibmmainframesyntel,
You might want to try this SYNCTOOL job
Code: |
//STEP00 EXEC PGM=SYNCTOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//T1 DD DSN=&&T1,DISP=(MOD,PASS),UNIT=SYSDA
//IN1 DD DSN=input.file1,DISP=SHR ----> FB/LRECL=10
//IN2 DD DSN=input.file2,DISP=SHR ----> FB/LRECL=18
//IN3 DD DSN=input.file3,DISP=SHR ----> FB/LRECL=16
//OUT DD DSN=Output.file,DISP=SHR ----> FB/LRECL=24
//TOOLIN DD *
COPY FROM(IN1) TO(T1) USING(CTL1)
COPY FROM(IN2) TO(T1) USING(CTL2)
COPY FROM(IN3) TO(T1) USING(CTL3)
SPLICE FROM(T1) TO(OUT) ON(1,10,CH) WITH(11,8) WITH(19,6) WITHEACH -
USING(CTL4)
/*
//CTL1CNTL DD *
INREC OVERLAY=(24:X)
//CTL2CNTL DD *
INREC OVERLAY=(24:X)
//CTL3CNTL DD *
INREC BUILD=(1,10,8X,11,6)
//CTL4CNTL DD *
OUTFIL OMIT=(11,1,CH,EQ,C' ',OR,19,1,CH,EQ,C' ') |
Thanks,
Arun |
|
Back to top |
|
|
ibmmainframesyntel
Active User
Joined: 26 Feb 2007 Posts: 126 Location: Chennai
|
|
|
|
Yes..i got it.....thanks a lot.... |
|
Back to top |
|
|
|