Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
JOIN KEYS Query

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: JOIN KEYS Query
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

Senior Member


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

PostPosted: Sat Jul 31, 2010 5:28 pm    Post subject: Re: JOIN KEYS Query
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    Post subject:
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    Post subject:
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 Moderator


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

PostPosted: Mon Aug 02, 2010 10:50 pm    Post subject:
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:

http://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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts query to fetch record which has only ... maxsubrat DB2 10 Mon Dec 11, 2017 5:03 pm
No new posts How to query MAXGENS of an existing P... Chuchulo Hatyzak JCL & VSAM 4 Wed Nov 22, 2017 10:23 pm
No new posts Native SQL Query kishpra DB2 1 Wed Nov 22, 2017 8:38 pm
No new posts Query on IEFBR14 with GDG Ashishpanpaliya JCL & VSAM 4 Tue Nov 07, 2017 8:34 pm
No new posts Query on XMITIP abdulrafi All Other Mainframe Topics 1 Wed Oct 25, 2017 6:54 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us