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

Help needed in Syncsort


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

New User


Joined: 26 Jul 2005
Posts: 55

PostPosted: Thu Sep 29, 2011 6:16 pm
Reply with quote

I have two input files first file has an input record length of 5 and the second file contains the record lenght of 80. I want to compare the two files if the record in the first file is present in the second file then I need the first 8 characters from the second file to a output.

example:

file 1:

Code:
AB123
BC234
CD456


file 2:
Code:
AB123001
AB123002
AB123004
EF345001
CD456001
CD456002

OUTPUT:
Code:
AB123001
AB123002
AB123004
CD456001
CD456002
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu Sep 29, 2011 6:25 pm
Reply with quote

Sounds like a JOINKEYS operation. Did you already look into doing that?
Back to top
View user's profile Send private message
mf_karthik

New User


Joined: 26 Jul 2005
Posts: 55

PostPosted: Thu Sep 29, 2011 6:54 pm
Reply with quote

Yes i tried using join but its not working
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Sep 29, 2011 7:01 pm
Reply with quote

Quote:
Yes i tried using join but its not working

and since it is friday, fortunately, most of us will soon not be working, also
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Sep 29, 2011 7:04 pm
Reply with quote

Quote:
and since it is friday

pretty fast clocki over there icon_biggrin.gif
still thursday around here icon_cool.gif
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Sep 29, 2011 7:08 pm
Reply with quote

OMG!, you are correct. wishful thinking on my part.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Thu Sep 29, 2011 7:59 pm
Reply with quote

mf_karthik wrote:
Yes i tried using join but its not working

And despite over six years as a member here, you've never learned that you should specify how it's "not working". A shame, that.
Back to top
View user's profile Send private message
mf_karthik

New User


Joined: 26 Jul 2005
Posts: 55

PostPosted: Thu Sep 29, 2011 8:20 pm
Reply with quote

Any answers pls...
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Sep 29, 2011 8:48 pm
Reply with quote

the first/second rule of forums is ...
do not solicit for answers
replying is on our own time and free of charge...
if You have time constraints a forum is not the best place to ask for help

the second/first is ..
learn to post properly, telling it did not work, does not help anybody

You will not get any answers until You provide something useful to work on
Back to top
View user's profile Send private message
sivasaras

New User


Joined: 29 Sep 2007
Posts: 93
Location: chenna/i-

PostPosted: Thu Sep 29, 2011 9:50 pm
Reply with quote

Hi,

Check this below Link for your question
ibmmainframes.com/about23191.html

Thanks
Siva
Back to top
View user's profile Send private message
mf_karthik

New User


Joined: 26 Jul 2005
Posts: 55

PostPosted: Thu Sep 29, 2011 11:18 pm
Reply with quote

to:Akatsukami

its my mistake that not poting the syntax..if you are not willing to answer dont post anything which humilate others..its a open forum not yours....
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Thu Sep 29, 2011 11:40 pm
Reply with quote

mf_karthik wrote:
to:Akatsukami

its my mistake that not poting the syntax..if you are not willing to answer dont post anything which humilate others..its a open forum not yours....

If you are not willing to learn from your mistakes, don't post anything which wastes others' time. This forum is intended to provide aid to professionals, not soothing pap to spoiled children.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Sep 29, 2011 11:45 pm
Reply with quote

Hello,

Quote:
Any answers pls...
Probably not until you post something worth using to help you. . .
Quote:
its my mistake that not poting the syntax..
Yes, and you posted no explanation of the actual problem ("not working" is NOT the problem) and none of the informational messages presented by the run. . .
Quote:
if you are not willing to answer dont post anything which humilate others..
When this is what it takes to teach . . .
Quote:
its a open forum not yours....
Nor yours. . . If you do not like receiving that kind of reply, provide better posts.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Sep 30, 2011 12:45 am
Reply with quote

Quote:
its my mistake that not poting the syntax..


I wonder in which direction some people neurons spin icon_cool.gif
after realizing that he made a mistake
by not posting the jcl used and I hope he meant also the result
why in &heaven did not post them instead of whining ???
Back to top
View user's profile Send private message
rakesha.hg

Active User


Joined: 21 Mar 2008
Posts: 161
Location: bangalore

PostPosted: Wed Oct 12, 2011 2:44 pm
Reply with quote

its a simple joinkeys operation.Try this sort card.

Code:
//STEP01   EXEC SYNCSORT,REGION=4096K     
//SORTJNF1 DD  *                           
AB123                                     
BC234                                     
CD456                                     
//SORTJNF2 DD  *                           
AB123001                                   
AB123002                                   
AB123004                                   
EF345001                                   
CD456001                                   
CD456002                                   
//SORTOUT  DD  DSN=TSX1H.X1HRH.TSO.SORTOUT,
//             DISP=(NEW,CATLG,DELETE),   
//             UNIT=TSO,                   
//             SPACE=(TRK,(100,10),RLSE)   
//SYSIN    DD *                           
 JOINKEYS FILE=F1,FIELDS=(1,5,A)           
 JOINKEYS FILE=F2,FIELDS=(1,5,A)           
 REFORMAT FIELDS=(F2:1,8)                 
 SORT FIELDS=(1,5,CH,A)                   


hope this helps
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 Mainframe Programmer with CICS Skill... Mainframe Jobs 0
No new posts Help needed to assemble IMS sample co... ABENDS & Debugging 4
No new posts RABBIT HOLE NEEDED - "Live"... All Other Mainframe Topics 0
No new posts Count Records with a crietaria in a f... DFSORT/ICETOOL 5
Search our Forums:

Back to Top