IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Need SYNCSORT job


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ibmmainframesyntel

Active User


Joined: 26 Feb 2007
Posts: 126
Location: Chennai

PostPosted: Wed Aug 20, 2008 1:27 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Aug 20, 2008 1:30 pm
Reply with quote

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
View user's profile Send private message
ibmmainframesyntel

Active User


Joined: 26 Feb 2007
Posts: 126
Location: Chennai

PostPosted: Wed Aug 20, 2008 2:36 pm
Reply with quote

yes.......

In our mainframe,only SYNCSORT is available....
Back to top
View user's profile Send private message
Venugopalsubbiah

New User


Joined: 12 Aug 2008
Posts: 7
Location: Bangalore

PostPosted: Wed Aug 20, 2008 2:37 pm
Reply with quote

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
View user's profile Send private message
ibmmainframesyntel

Active User


Joined: 26 Feb 2007
Posts: 126
Location: Chennai

PostPosted: Wed Aug 20, 2008 2:52 pm
Reply with quote

No, i prefer only JCL.......
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Aug 20, 2008 3:40 pm
Reply with quote

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
View user's profile Send private message
ibmmainframesyntel

Active User


Joined: 26 Feb 2007
Posts: 126
Location: Chennai

PostPosted: Wed Aug 20, 2008 4:08 pm
Reply with quote

I dn't knw how to code the JCl for my requirement..
Back to top
View user's profile Send private message
ibmmainframesyntel

Active User


Joined: 26 Feb 2007
Posts: 126
Location: Chennai

PostPosted: Wed Aug 20, 2008 4:10 pm
Reply with quote

Is the above requiremet is possible thr ICETOOL utility? If yes,any one can help me out..
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Wed Aug 20, 2008 4:12 pm
Reply with quote

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
View user's profile Send private message
ibmmainframesyntel

Active User


Joined: 26 Feb 2007
Posts: 126
Location: Chennai

PostPosted: Wed Aug 20, 2008 4:46 pm
Reply with quote

Yes..i got it.....thanks a lot....
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Count Records with a crietaria in a f... DFSORT/ICETOOL 5
No new posts DFSORT/SYNCSORT/ICETOOL JCL & VSAM 8
No new posts Syncsort "Y2C" Function SYNCSORT 1
No new posts Arithmetic division using Syncsort SYNCSORT 6
Search our Forums:

Back to Top