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

SYNCSORT/ICETOOL JOINKEYS SORT Statement Issue


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
john.mathew

New User


Joined: 22 Apr 2021
Posts: 7
Location: United States

PostPosted: Thu Apr 22, 2021 3:39 am
Reply with quote

Hi Team,

I tried to generate an output file on matching records between two input files to get all matched records into an output file. For this, I have used SYNCSORT & ICETOOL using JOINKEYS but I am getting error as shown below. Please kindly advise if I am missing any thing here.

Below is the JCLs & SORTCARD used for it.
SYNCSORT:
//STEP01 EXEC PGM=SORT
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSDBOUT DD SYSOUT=*
//SORTJNF1 DD DSN=INPUT.FILE1,DISP=SHR
//SORTJNF2 DD DSN=INPUT.FILE2,DISP=SHR
//SORTOUT DD DSN=OUTPUT.FILE12,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(10,20),RLSE),
// DCB=(RECFM=FB,BLKSIZE=0,LRECL=80)
//SYSIN DD *
JOINKEYS FILES=F1,FIELDS=(1,7,A)
JOINKEYS FILES=F2,FIELDS=(1,7,A)
REFORMAT FIELDS=(F1:1,7)
SORT FIELDS=COPY
/*

Error: WER267A: SORT STATEMENT : STATEMENT NOT FOUND

ICETOOL:
//STEP01 EXEC PGM=ICETOOL
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//INP1 DD DSN=INPUT.FILE1,DISP=SHR
//INP2 DD DSN=INPUT.FILE2,DISP=SHR
//OUTA DD SYSOUT=*
//OUT12 DD DSN=OUTPUT.FILE12,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(10,20),RLSE),
// DCB=(RECFM=FB,BLKSIZE=0,LRECL=80)
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//TOOLIN DD *
COPY FROM(INP1) TO(OUTA) USING(OT1A)
/*
//OT1ACNTL DD *
JOINKEYS F1=INP1,FIELDS=(1,7,A)
JOINKEYS F2=INP2,FIELDS=(1,7,A)
REFORMAT FIELDS=(F1:1,7)
/*


Error: STEP WAS EXECUTED - COND CODE - 0020
Back to top
View user's profile Send private message
dneufarth

Active User


Joined: 27 Apr 2005
Posts: 335
Location: Inside the SPEW (Cincinnati OH USA)

PostPosted: Thu Apr 22, 2021 4:41 am
Reply with quote

Are your SORT control statements in columns 2 - 71?
Back to top
View user's profile Send private message
Joerg.Findeisen

Active Member


Joined: 15 Aug 2015
Posts: 619
Location: Bamberg, Germany

PostPosted: Thu Apr 22, 2021 4:58 am
Reply with quote

When you have SYNCSORT WHY OH WHY are you posting in DFSORT forum? Also use Code tags, a gazillion times explained how to use them.
Back to top
View user's profile Send private message
sergeyken
Warnings : 2

Senior Member


Joined: 29 Apr 2008
Posts: 1201

PostPosted: Thu Apr 22, 2021 5:05 am
Reply with quote

1) in ALL your posts, please, use the code tags, otherwise nobody is able to point you at any minor missing comma in your code samples

2) SYNCSORT works in coupe with SYNCTOOL. DFSORT works in coupe with ICETOOL. Please choose which one of two products you are using, or going to use? That is, ICETOOL is only an interface program to actually call DFSORT, while SYNCTOOL is similar interface program to actually call SYNCSORT.

3) Both ICETOOL, and SYNCTOOL do produce two different listings each (but different DD-names used). You MUST find, read, and present here ALL messages from BOTH of those listings either to find the answer yourself, or to ask for help from the forum.

4) ICETOOL doesn’t use neither //SYSPRINT, nor //SYSOUT
Back to top
View user's profile Send private message
john.mathew

New User


Joined: 22 Apr 2021
Posts: 7
Location: United States

PostPosted: Thu Apr 22, 2021 10:59 am
Reply with quote

Hi All,

I am a new user, sincere apologies for any mistakes in posting. Please find below code with tags.

Code:

Below is the JCLs & SORTCARD used for it.
SYNCSORT:
//STEP01 EXEC PGM=SORT
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSDBOUT DD SYSOUT=*
//SORTJNF1 DD DSN=INPUT.FILE1,DISP=SHR
//SORTJNF2 DD DSN=INPUT.FILE2,DISP=SHR
//SORTOUT DD DSN=OUTPUT.FILE12,
//     DISP=(NEW,CATLG,DELETE),
//     SPACE=(CYL,(10,20),RLSE),
//     DCB=(RECFM=FB,BLKSIZE=0,LRECL=80)
//SYSIN DD *
   JOINKEYS FILES=F1,FIELDS=(1,7,A)
   JOINKEYS FILES=F2,FIELDS=(1,7,A)
   REFORMAT FIELDS=(F1:1,7)
   SORT FIELDS=COPY
/*

Error: WER267A: SORT STATEMENT : STATEMENT NOT FOUND

ICETOOL:
//STEP01 EXEC PGM=ICETOOL
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//INP1 DD DSN=INPUT.FILE1,DISP=SHR
//INP2 DD DSN=INPUT.FILE2,DISP=SHR
//OUTA DD SYSOUT=*
//OUT12 DD DSN=OUTPUT.FILE12,
//      DISP=(NEW,CATLG,DELETE),
//      SPACE=(CYL,(10,20),RLSE),
//      DCB=(RECFM=FB,BLKSIZE=0,LRECL=80)
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//TOOLIN DD *
   COPY FROM(INP1) TO(OUTA) USING(OT1A)
/*
//OT1ACNTL DD *
   JOINKEYS F1=INP1,FIELDS=(1,7,A)
   JOINKEYS F2=INP2,FIELDS=(1,7,A)
   REFORMAT FIELDS=(F1:1,7)
/*


Error: STEP WAS EXECUTED - COND CODE - 0020


I am not really particular about using SYNCSORT or ICETOOL, but either of the case not getting the result. Both ways job is failing. I have also tried first JCL provided above with OPTION COPY instead of SORT FIELDS=COPY but still it doesn't worked out. Not sure what I am missing with 1st JCL posted above. Please advise.
Back to top
View user's profile Send private message
Joerg.Findeisen

Active Member


Joined: 15 Aug 2015
Posts: 619
Location: Bamberg, Germany

PostPosted: Thu Apr 22, 2021 11:11 am
Reply with quote

Please, post complete Err Msgs. Also what type of DSN is input. DSORG=?, RECFM=?, LRECL=?
Back to top
View user's profile Send private message
john.mathew

New User


Joined: 22 Apr 2021
Posts: 7
Location: United States

PostPosted: Thu Apr 22, 2021 11:16 am
Reply with quote

I am sorry, i am unable to copy paste the job log error messages.
Back to top
View user's profile Send private message
Joerg.Findeisen

Active Member


Joined: 15 Aug 2015
Posts: 619
Location: Bamberg, Germany

PostPosted: Thu Apr 22, 2021 11:23 am
Reply with quote

Dear Sirs, I have that broken thing but I can't tell you the specifics. Please advise what to do and how to fix it.

You might notice that it can't work this way. As most of us are volunteers, please help us to help you.
Back to top
View user's profile Send private message
sergeyken
Warnings : 2

Senior Member


Joined: 29 Apr 2008
Posts: 1201

PostPosted: Thu Apr 22, 2021 5:05 pm
Reply with quote

john.mathew wrote:
I am sorry, i am unable to copy paste the job log error messages.

If so, this is a dead end.

First of all, please learn:
1) where to find error messages?
2) how to read error messages?
3) how to understand error messages?
4) how to present error messages to those you ask to help you?

Otherwise we’re all stuck.
Back to top
View user's profile Send private message
sergeyken
Warnings : 2

Senior Member


Joined: 29 Apr 2008
Posts: 1201

PostPosted: Thu Apr 22, 2021 5:17 pm
Reply with quote

A free gift for you:

Quote:
ICETOOL return codes
. . . . . . . . . . . .
20
Message data set error. The TOOLMSG DD statement was not present or the TOOLMSG data set was
not opened.
. . . . . . . . . . . .


It all looks like the code sample you have presented is not related in any manner to the actual, physically running job giving this error(s), isn't it?
I'm pretty sure that you planned to run the job presented in your example, but in fact a different code has been submitted... Maybe, the difference was in one single comma only, but nevertheless, the error message doesn't match the JCL code you presented...
Back to top
View user's profile Send private message
sergeyken
Warnings : 2

Senior Member


Joined: 29 Apr 2008
Posts: 1201

PostPosted: Thu Apr 22, 2021 5:30 pm
Reply with quote

john.mathew wrote:
I am sorry, i am unable to copy paste the job log error messages.

If so, where did you get the lines quoted after your "Error:" lines???
Back to top
View user's profile Send private message
sergeyken
Warnings : 2

Senior Member


Joined: 29 Apr 2008
Posts: 1201

PostPosted: Thu Apr 22, 2021 5:41 pm
Reply with quote

One more free gift for you:


Code:
//STEP01   EXEC PGM=ICETOOL
//*INP1     DD  DSN=INPUT.FILE1,DISP=SHR
//INP1     DD  *
AAAAAAA 111
BBBBBBB 222
CCCCCCC 333
DDDDDDD 444
EEEEEEE 555
//*INP2     DD  DSN=INPUT.FILE2,DISP=SHR
//INP2     DD  *
BBBBBBB
DDDDDDD
//OUTA     DD  SYSOUT=*
//TOOLMSG  DD  SYSOUT=*
//DFSMSG   DD  SYSOUT=*
//TOOLIN   DD  *
   COPY FROM(INP1) TO(OUTA) USING(OT1A)
/*
//OT1ACNTL DD *
   JOINKEYS F1=INP1,FIELDS=(1,7,A)
   JOINKEYS F2=INP2,FIELDS=(1,7,A)
   REFORMAT FIELDS=(F1:1,12)
/*


Result:
Code:
********************************* TOP OF DATA *********
BBBBBBB 222
DDDDDDD 444
******************************** BOTTOM OF DATA *******
Back to top
View user's profile Send private message
john.mathew

New User


Joined: 22 Apr 2021
Posts: 7
Location: United States

PostPosted: Thu Apr 22, 2021 6:32 pm
Reply with quote

Dear Sir's,

Thank you all for helping me on this. Actually, due to limitations I couldn't post the physical JCL here, instead i have manually typed the statements here by changing the file names. The mistake that i have done is, i used one extra line with '//' in physical JCL was causing the issue. I have deleted the line and it worked.

Thank you again for helping me on this.
Back to top
View user's profile Send private message
sergeyken
Warnings : 2

Senior Member


Joined: 29 Apr 2008
Posts: 1201

PostPosted: Thu Apr 22, 2021 7:10 pm
Reply with quote

john.mathew wrote:
Dear Sir's,

Thank you all for helping me on this. Actually, due to limitations I couldn't post the physical JCL here, instead i have manually typed the statements here by changing the file names. The mistake that i have done is, i used one extra line with '//' in physical JCL was causing the issue. I have deleted the line and it worked.

Thank you again for helping me on this.

Today I was so kind that have done your own job for you.

Mainly at this forum, people do not do this; the messages like yours are generally ignored, in 99% if times.

Quote:
- Dear auto-experts! My car, like this one at the attached photo, does not move. Please, help me!!!

- Oh, sorry. I forgot to fill it with gas.
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
This topic is locked: you cannot edit posts or make replies. Sort to include records of file 2 int... Java & MQSeries 1
No new posts Converting unpacked fields to pack us... SYNCSORT 4
No new posts SORT for dynamic trailer record + CSV... DFSORT/ICETOOL 14
No new posts Issue with CA Copycat-IGD17100I UNEXP... CA Products 5
No new posts Arithmetic division using Syncsort SYNCSORT 6
Search our Forums:

Back to Top