MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Need a better procedure in sort

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
manojvoona
Beginner


Joined: 05 Jan 2006
Posts: 43
Topics: 14

PostPosted: Tue Jan 10, 2006 9:35 am    Post subject: Need a better procedure in sort Reply with quote

Hi ,

My requirement is

file 1
AAA123
BBB123
CCC123

File 2
AAA456
BBB456
DDD456

Output
AAA123456
BBB123456
CCC123
DDD___456

I could do this in 5 steps. is there a better process than this
here first three bytes are key bytes.
we are merging both files on key bytes. if there is no match,that feild should be spaces
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Tue Jan 10, 2006 9:49 am    Post subject: Reply with quote

Please search before posting.

If your shop has DFSORT then check the "Join fields from two files record-by-record" Smart DFSORT Trick at:

http://www.ibm.com/servers/storage/support/software/sort/mvs/tricks/

If your shop has the latest version of syncsort then check this link

http://www.mvsforums.com/helpboards/viewtopic.php?t=4690&highlight=joinkeys

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu


Last edited by kolusu on Fri Sep 15, 2006 8:29 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website
manojvoona
Beginner


Joined: 05 Jan 2006
Posts: 43
Topics: 14

PostPosted: Tue Jan 10, 2006 10:08 am    Post subject: Reply with quote

Thanks Kolusu,

But my job is abending with the following sort card.
JOINKEYS FILES=F1,FIELDS=(01,3,A)
JOINKEYS FILES=F2,FIELDS=(01,3,A)
REFORMAT FIELDS=(F1:1,07,
F2:04,04)
SORT FIELDS=(1,3,CH,A)

error msg is as follows

+WER275A TPH9329A,STEP0100, -NO KEYWORDS FOUND ON CONTROL STATEMENT
+WER275A TPH9329A,STEP0100, -NO KEYWORDS FOUND ON CONTROL STATEMENT
+WER275A TPH9329A,STEP0100, -NO KEYWORDS FOUND ON CONTROL STATEMENT
+WER211B TPH9329A,STEP0100, -SYNCSMF CALLED BY SYNCSORT; RC=0000
IEF450I TPH9329A STEP0100 - ABEND=S000 U0016 REASON=00000000 306
OPS4320O INIT OPSS *LOCAL* AOF VERB DISABLE COMMAND DISABLE *DYNAMI
OPS4320O INIT OPSS *LOCAL* AOF VERB ENABLE COMMAND ENABLE *DYNAMIC

Please let me know if have any alternative method.
ICETOOL is not installed in our Mainframes

thanks a lot
Manoj
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Tue Jan 10, 2006 10:34 am    Post subject: Reply with quote

manojvoona,

Make sure that your control cards start from pos2 instead of pos1 . Also post the first line in your sysout which shows the version of syncsort you have

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
manojvoona
Beginner


Joined: 05 Jan 2006
Posts: 43
Topics: 14

PostPosted: Wed Jan 11, 2006 1:47 am    Post subject: Reply with quote

Hi Kolusu,

Please find the first line for version number

1 SYNCSORT FOR Z/OS 1.1CR TPF3A U.S. PATENTS: 4210961, 5117495 (C) 2002

Thanks
Manoj
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Wed Jan 11, 2006 5:05 am    Post subject: Reply with quote

manojvoona,

USE the DFSORT trick by changing the program name to SYNCTOOL and you will get the desired results.

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
manojvoona
Beginner


Joined: 05 Jan 2006
Posts: 43
Topics: 14

PostPosted: Wed Jan 11, 2006 7:05 am    Post subject: Reply with quote

HI Kolusu,

I am new to SYNCTOOL.
when I changed the PGM to SYNCTOOL, I am getting a return code of 20.
output file is not created.

JESYSMSG :
JES2 ALLOCATED TO SORTJNF1
JES2 ALLOCATED TO SORTJNF2
SMS ALLOCATED TO DDNAME (SORTOUT )
DSN (TSO5136.TEST.SORT2.TEST )
STORCLAS (BASEWORK) MGMTCLAS (WORK) DATACLAS (DEFAULT)
VOL SER NOS= MTZ421
JES2 ALLOCATED TO SYSIN
TPH9329A STEP0100 - STEP WAS EXECUTED - COND CODE 0020
TSO5136.TPH9329A.JOB11025.D0000101.? SYSIN
TSO5136.TPH9329A.JOB11025.D0000102.? SYSIN
TSO5136.TEST.SORT2.TEST RETAINED,
TSO5136.TPH9329A.JOB11025.D0000103.? SYSIN


thanks
Manoj Voona
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Wed Jan 11, 2006 7:34 am    Post subject: Reply with quote

manojvoona,

The return code of 20 is due to missing TOOLMSG or DFSMSG dd statements. See the example clearly once again and supply the missing DD statements.

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group