Page 1 of 2

SYNSORT JCL Required

PostPosted: Tue Jun 13, 2017 10:50 pm
by bharmf
Dear All,

Please find my requirement

InFile1
--------
length - 1045
REFM - VB
Key Field - 1 to 9
No duplicate records

Data looks like
============
111111111 aaaaaa bbbbbbbb
222222222 bbbbbb cccccccc
333333333 ccccccc aaaaaaaa
444444444 ccccccc aaaaaaaa

InFile2
--------
length - 1045
REFM - VB
Key Field - 1 to 9
No duplicate records

Data looks like
=============
111111111 aaaaaa bbbbbbbb
222222222 bbbbbb cccccccc
444444444 ccccccc aaaaaaaa

Outfile requirement
-------------------------
I want only key fields 9 bytes in the output record, not required any other fields of the matching records.

length - 80
REFM - FB

111111111
222222222
444444444

My workshop using SYNCSORT, Messages appearing as WER#### in spool from that I am saying we use SYNCSORT. Could You please help me on SORT card for this.

Thanks..!

Re: SYNSORT JCL Required

PostPosted: Tue Jun 13, 2017 11:08 pm
by prino
This is a ***HELP*** forum, not a "we do your work for you one"!

Usual price for a contractor to take over your job is about USD 100 per hour, usually with a minimum of eight hours.

Re: SYNSORT JCL Required

PostPosted: Tue Jun 13, 2017 11:56 pm
by Akatsukami
Although I do not have Syncsort available to me, in DFSORT this would be a relatively simple JOINKEYS operation, and I have no reason to believe it is different in Syncsort. Where does your understanding fail?

Re: SYNSORT JCL Required

PostPosted: Wed Jun 14, 2017 7:43 pm
by bharmf
Dear prino,

I requested for help, I do not know much about SORT utility basically. If You could help on that would be great help for me. My workshop using syncsort version 2.1.4

If my words would have appeared as hard. My apologize.

Re: SYNSORT JCL Required

PostPosted: Wed Jun 14, 2017 8:23 pm
by Robert Sample
bharmf, if people just give you the SORT statements then you have learned nothing (except to ask for help). If you take the hint you've been given and write your own JOINKEYS statements and try it out, then post if you don't get the results you want -- you will have actually learned how to do your own research (ALWAYS a good thing to know), how to use the SYNCSORT manuals, and how to use JOINJKEYS. It is far better for you to learn how to do these things because those who respond did the same thing (possibly many years ago) to learn what they now know.

Re: SYNSORT JCL Required

PostPosted: Wed Jun 14, 2017 10:31 pm
by bharmf
Thank You Robert Sample..! Right words..looked some sample posts and tried the below ...

SORT FIELDS = COPY
JOINKEYS FILES=FILE1,FIELDS=(5,13,A)
JOINKEYS FILES=FILE2,FIELDS=(5,13,A)
JOIN UNPAIRED,F1,F2,ONLY     --> Hope this will pick the unmatched records, I need to change this to select the only matched records.


First I tried to get ouput file as like same length 1045 VB as input file, to check how it works. Then planned to put the keywords
to make the output to 80 FB length.

Getting the below error.
-----------------------

WER268A JOIN KEYS STATEMENT: SYNTAX ERROR

SORT FIELDS = COPY
JOINKEYS FILES=FILE1,FIELDS=(5,13,A)
               *
JOINKEYS FILES=FILE2,FIELDS=(5,13,A)
               *
JOIN UNPAIRED,F1,F2,ONLY
             *

Message says whereever marked as * is the position on syntax error.

Re: SYNSORT JCL Required

PostPosted: Wed Jun 14, 2017 10:33 pm
by bharmf
Correction..

JOIN UNPAIRED,FILE1,FILE2,ONLY

Re: SYNSORT JCL Required

PostPosted: Wed Jun 14, 2017 10:51 pm
by Akatsukami
You have not shown your JCL. Are FILE1 and FILE2 the DDnames?

Re: SYNSORT JCL Required

PostPosted: Wed Jun 14, 2017 11:03 pm
by bharmf
Yes Akatsukami..FILE1 and FILE2 are the DDnames.

Corection -
JOIN UNPAIRED,FILE1,FILE2,ONLY

Re: SYNSORT JCL Required

PostPosted: Thu Jun 15, 2017 2:55 am
by NicC
The way you posted your control statements meant that the error indicator (*) was below the first character of the statement instead of where the error was detected. This i one of the reasons why uou should use the code tags when posting data requiring a fixed pitch font i.e. anything on your 3270 screen. I have coded your post for you so we can now see where Syncsort believes the errors to be.