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

JOIN KEYS Query


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
arun nehra

New User


Joined: 29 Nov 2008
Posts: 62
Location: mumbai

PostPosted: Sat Jul 31, 2010 5:02 pm
Reply with quote

Hi Everyone,

I am trying to combine records from two files say IN1 and IN2 using 'JOINKEYS'. But doing that i am getting some errors as mentioned below:

ICE005A 0 BLANK NEEDED IN COLUMN 1 OR OPERATION NOT DEFINED CORRECTLY
REFORMAT FIELDS=(F1:1,2,F2:1,2)
$
ICE005A 0 BLANK NEEDED IN COLUMN 1 OR OPERATION NOT DEFINED CORRECTLY
OPTION COPY

The reference code i used to achieve this is as below:
//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//IN1 DD *
AB
BC
CD
/*
//IN2 DD *
11
22
33
44
/*
//SORTOUT DD SYSOUT=*
//SYSIN DD *
JOINKEYS F1=IN1,FIELDS=(3,1,A),SORTED
JOINKEYS F2=IN2,FIELDS=(3,1,A),SORTED
REFORMAT FIELDS=(F1:1,2,F2:1,2)
OPTION COPY
/*


Please help.

Regards
Arun
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Sat Jul 31, 2010 5:28 pm
Reply with quote

arun nehra wrote:
ICE005A 0 BLANK NEEDED IN COLUMN 1 OR OPERATION NOT DEFINED CORRECTLY
REFORMAT FIELDS=(F1:1,2,F2:1,2)
$
ICE005A 0 BLANK NEEDED IN COLUMN 1 OR OPERATION NOT DEFINED CORRECTLY
OPTION COPY
Looks like you don't have blanks at the start of each line in //SYSIN. That's what the message BLANK NEEDED IN COLUMN 1 is telling you, please check that.
Back to top
View user's profile Send private message
arun nehra

New User


Joined: 29 Nov 2008
Posts: 62
Location: mumbai

PostPosted: Sat Jul 31, 2010 5:59 pm
Reply with quote

Actually i have placed blank in the first column in the SYSIN and it looks like it is just a typo in the above screen shot. I believe spaces in column one is not an issue here. Can this be because this (SORT) utility is not supporting JOINKEYS at my shop or not upgraded for the same because i am trying out similar thing using ICETOOL and getting some similar messages:

Code:

Code:
//SORT28   EXEC PGM=ICETOOL,COND=(0,LT)                             
//TOOLMSG   DD  SYSOUT=*                                             
//DFSMSG     DD  SYSOUT=*                                             
//IN1            DD  DSN=FILEA,DISP=SHR             
//IN2            DD  DSN=FILEB,DISP=SHR               
//TEMP1     DD  DSN=&&TEMP1,UNIT=SYSDA,SPACE=(CYL,(5,5)),           
//              DISP=(MOD,PASS)                                         
//OUT        DD  DSN=FILEC,                     
//              DISP=(NEW,CATLG,DELETE),                                 
//          DCB=(MODELDCB,RECFM=FB,LRECL=1175,BLKSIZE=0),           
//          UNIT=SYSALLDA,SPACE=(CYL,(20,10),RLSE)                   
//TOOLIN    DD   *                                                   
COPY JKFROM(IN1) TO(TEMP1) USING(CTL1)                               
COPY JKFROM(IN2) TO(TEMP1) USING(CTL2)                               
SORT FROM(TEMP1) TO(OUT) USING(CTL3)                                 
//CTL1CNTL DD *                                                     
  JOINKEYS F1=IN1,FIELDS=((1,10,A,31,30,A,61,30,A),TASKID=I1         
  JOINKEYS F2=IN2,FIELDS=(108,10,A,163,30,A,1030,30,A),          -   
  SORTED,TASKID=I1                                                   
/*                                                                   
//CTL2CNTL DD *                                                     
  JOINKEYS F1=IN1,FIELDS=((1,10,A,31,30,A,61,30,A),TASKID=I2       
  JOINKEYS F2=IN2,FIELDS=(108,10,A,163,30,A,1030,30,A),          - 
  TASKID=I2                                                         
  REFORMAT FIELDS=(F2:1,1145,F1:91,30)                             
/*                                                                 
//CTL3CNTL DD *                                                     
  SORT FIELDS=COPY                                                 
/*


Error Message:

Code:

ICE602I 0 OPERATION RETURN CODE:  12                 
                                                     
ICE630I 2 MODE IN EFFECT:  SCAN                     
                                                     
          COPY JKFROM(IN2) TO(TEMP1) USING(CTL2)     
               $                                     
ICE604A 0 ERROR IN KEYWORD, PARAMETER, OR DELIMITER 
                                                     
          SORT FROM(TEMP1) TO(OUT) USING(CTL3)


Please do let me know if i am wrong at some place.

Regards
Back to top
View user's profile Send private message
arun nehra

New User


Joined: 29 Nov 2008
Posts: 62
Location: mumbai

PostPosted: Mon Aug 02, 2010 1:29 pm
Reply with quote

Hi Arun,

Actually the dollar sign is just below J of (JKFROM) but it got shifted while pasting thus i mentioned it in the error message:

SORT JKFROM TO(OUT) USING(CTL1)
$(Dollar sign is just below J of JKFROM)

Also now i am quite sure that SORT Utility at my shop is not an upgraded version and thus it is not supporting "JOINKEYS" feature. But for ICETOOL i am still not sure, also i am not getting much help on 'ICETOOL + JOINKEYS' from the WEB in this regard.

Regards
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Mon Aug 02, 2010 10:50 pm
Reply with quote

As you guessed, you do NOT have the DFSORT PTF installed that would allow you to use JOINKEYS for DFSORT or ICETOOL (which includes JKFROM for ICETOOL). Ask your System Programmer to install the appropriate PTF. See the following for details:

www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000174

BTW, JKFROM(IN1) and JKFROM(IN2) is incorrect syntax. The correct keyword is just JKFROM. See my paper for details of the correct syntax.
Back to top
View user's profile Send private message
arun nehra

New User


Joined: 29 Nov 2008
Posts: 62
Location: mumbai

PostPosted: Tue Aug 03, 2010 11:52 pm
Reply with quote

Thanks all,

I will check with my system support team if they can go with the above upgrade if possible.

Regards
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
No new posts RC query -Time column CA Products 3
No new posts Dynamically pass table name to a sele... DB2 2
No new posts Query on edit primary command CLIST & REXX 5
No new posts Query on edit primary command CLIST & REXX 1
No new posts Use input file with OMIT rcd keys? DFSORT/ICETOOL 15
Search our Forums:

Back to Top