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

SYNCSORT in Z/VSE


IBM Mainframe Forums -> SYNCSORT
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2011
Location: USA

PostPosted: Tue May 12, 2020 5:51 pm
Reply with quote

Joerg.Findeisen wrote:
@sergeyken: This is a fact indeed. icon_exclaim.gif

It seems to me that the DD's are wrong. They were named SRTJNF1 and SRTJNF2 but should be SORTJNF1 and SORTJNF2 for FILE=Fn format. When switching to the Fn=DDname format the job should run. Otherwise I am temporary out of ideas here.

Don’t know how to overcome this:
firsttimeuser wrote:
I am new to computer, software, utilities, compiler, and scripts. I have the requirement to write something working on some type of computers. I don’t know exactly what to write, and where to put it all. I have this data
XXX YYY ZZZ AAA BBB CCC

Desired output is
111 222 333 444 555

But something goes wrong, and I do not get any result. Please help me to do my job, I want to get my salary
Back to top
View user's profile Send private message
nithinkarthika

New User


Joined: 26 Apr 2020
Posts: 11
Location: India

PostPosted: Wed May 13, 2020 9:29 am
Reply with quote

Rohit Umarjikar wrote:
And assuming they are sorted, may also try adding ,
Code:
JOINKEYS FILE=F1,FIELDS=(1,22,A),SORTED,NOSEQ


If nothing works then please write a program or use other utilities you have at your site.


I have added SORTED and NOSEQ. Now I am getting a new error message

Code:

JOINKEYS FILE=F1,FIELDS=(1,8,A),SORTED,NOSEQ
                                       *
JOINKEYS FILE=F1,FIELDS=(1,8,A),SORTED,NOSEQ
                                       *
REFORMAT FIELDS=(F2:1,775)
SORT FIELDS=COPY

WER047A  JOINKEYS STATEMENT HAS SYNTAX ERROR
WER047A  JOINKEYS STATEMENT HAS SYNTAX ERROR


If I remove NOSEQ from JOINKEYS, then getting the previous error message "REQ'D PARM MISSING ON JOINKEYS STMT". I tried NOSEQCK instead of NOSEQ as well, but no luck.
Back to top
View user's profile Send private message
nithinkarthika

New User


Joined: 26 Apr 2020
Posts: 11
Location: India

PostPosted: Wed May 13, 2020 9:32 am
Reply with quote

Joerg.Findeisen wrote:
Please let's change the JOINKEYS as follows:
Code:
JOINKEYS FILE=F1,FIELDS=(1,22,A)                                             
JOINKEYS FILE=F2,FIELDS=(1,22,A)

to
Code:
JOINKEYS F1=SRTJNF1,FIELDS=(1,22,A)                                             
JOINKEYS F2=SRTJNF2,FIELDS=(1,22,A)

and check one more time that those DLBL are defined correctly (1 and 2).
Code:
// DLBL SRTJNF1 ..
// DLBL SRTJNF2 ..


Hi Joerg,

I tried this method, but its failing with invalid statement error message.
Back to top
View user's profile Send private message
nithinkarthika

New User


Joined: 26 Apr 2020
Posts: 11
Location: India

PostPosted: Thu May 14, 2020 7:02 pm
Reply with quote

Finally sorted out..!!

For those who are working on Z/VSE or Z/VM...here is a working sort card for JOIN operation


Code:

// DLBL SORTIN1,'INPUT FILE 1',0,VSAM,CAT=ID
// DLBL SORTIN2,'INPUT FILE 2',0,VSAM,CAT=ID
// DLBL SORTOUT,'OUTPUT FILE',0,VSAM,DISP=(,KEEP), RECORDS=(XX,XX),RECSIZE=XX,CAT=ID
// DLBL SORTWKA,'Work dataset name', RECSIZE=xx, RECORDS=(xx,xx)
// EXEC SORT
   JOINKEYS FILES=F1,FIELDS=(1,10,A),TYPE=F/V,LRECL=XX,BLKSIZE=xx
   JOINKEYS FILES=F2,FIELDS=(1,10,A),TYPE=F/V,LRECL=XX,BLKSIZE=xx
   REFORMAT FIELDS=(F1/F2:XX,XX)
   SORT FIELDS= COPY
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3048
Location: NYC,USA

PostPosted: Thu May 14, 2020 7:52 pm
Reply with quote

Tough guess . Thanks for posting it back with solution.
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 -> SYNCSORT

 


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