Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Need SYNCSORT job

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Need SYNCSORT job
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: 8593
Location: Back in jolly old England

PostPosted: Wed Aug 20, 2008 1:30 pm    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Wed Aug 20, 2008 3:40 pm    Post subject:
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    Post subject:
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    Post subject:
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: 2285
Location: @my desk

PostPosted: Wed Aug 20, 2008 4:12 pm    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts SYNCSORT SEQNUM and FI fields. nartcr SYNCSORT 7 Sat Jan 21, 2017 4:02 am
No new posts Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts Syncsort - Hard coded Value in output PORYES SYNCSORT 1 Thu Nov 03, 2016 9:23 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us