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

Problem while combining two files using icetool


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

New User


Joined: 30 Mar 2007
Posts: 25
Location: Hyderabad

PostPosted: Fri Mar 19, 2010 6:05 pm
Reply with quote

I'm getting and empty output file while combining 2 datasets based on criteria.
below are the details.

i/p - 1

Code:
emp-num     emp-name               adress                     experience     
5 bytes   12 bytes                    12 bytes                  10 bytes
14236   KIMBERELY      ROSE LAND    6 YRS
14325   SHARLA         ROSE LAND    3 YRS
35421   STEWART        FORTE                        2 YRS
57234   LANNGAN        FORE MYERS   4 YRS
98234   DEMERCHANT     FORT MYERS   5 YRS



first field is the key


i/p -2

Code:
sal              dept       emp-num     designation
5 bytes   5 bytes   5 bytes   15 bytes
9000   CPI     14236   ANALYST   
5000   CPI     14325   PROGRAMMER
6000   CPI     35421   TESTER     
4000   CPI     57234   HR         
3500   CPI     98234   MANAGER 


3rd field is the key

I want the output with the fields mentioned below

EMP-num emp-name dept designation experience sal adress

Code:

//TOOLIN DD *                                   
 COPY FROM(INDD1) TO(T1) USING(CTL1)           
 COPY FROM(INDD2) TO(T1) USING(CTL2)           
 SPLICE FROM(T1) WITHALL -                     
   ON(1,5,ZD) -                                   
   WITH(18,5) -                                   
   WITH(23,15) -                                 
   WITH(48,05) -                                 
   TO(OUT)                                       
*                                               
/*                                             
//CTL1CNTL DD *                                 
  OUTREC FIELDS=(1:1,5,6:6,12,38:30,10,53:18,12)
/*                                             
//CTL2CNTL DD *                                 
  OUTREC FIELDS=(1:11,5,18:6,5,23:16,15,48:1,5)
/*                                             

here indd1 & indd2 are inp file, and out is output file.

thanks,
Ram.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Fri Mar 19, 2010 6:21 pm
Reply with quote

Using your data in the layout as you described, and using your control statements, this is my result in OUT:

Code:

14236KIMBERELY   CPI  ANALYST        6 YRS     9000 ROSE LAND     
14325SHARLA      CPI  PROGRAMMER     3 YRS     5000 ROSE LAND     
35421STEWART     CPI  TESTER         2 YRS     6000 FORTE         
57234LANNGAN     CPI  HR             4 YRS     4000 FORE MYERS     
98234DEMERCHANT  CPI  MANAGER        5 YRS     3500 FORT MYERS     


Are you seeing the total record count from T1 of 10 in your TOOLMSG DD?

Code:

ICE627I 0 DFSORT CALL 0003 FOR SORT FROM T1       TO OUT      COMPLETED
ICE628I 0 RECORD COUNT:  000000000000010                               
ICE638I 0 NUMBER OF RECORDS RESULTING FROM CRITERIA:  000000000000005   
ICE602I 0 OPERATION RETURN CODE:  00                                   


Is that what you're expecting?
Back to top
View user's profile Send private message
Rambhupal.chaudari

New User


Joined: 30 Mar 2007
Posts: 25
Location: Hyderabad

PostPosted: Fri Mar 19, 2010 6:27 pm
Reply with quote

Hi Kevin,

Yes thats wat am expecting.
I am getting below msg in toolmsg

ICE627I 0 DFSORT CALL 0003 FOR SORT FROM T1 TO OUT COMPLETED
ICE628I 0 RECORD COUNT: 000000000000005
ICE638I 0 NUMBER OF RECORDS RESULTING FROM CRITERIA: 000000000000000
ICE602I 0 OPERATION RETURN CODE: 00


Below is my full jcl

//INDD1 DD DSN=RKAKARL.TEST.DECODE.INP1,DISP=SHR
//INDD2 DD DSN=RKAKARL.TEST.DECODE.INP2,DISP=SHR
//*--------------------------------------------------------
//T1 DD DSN=&&TEMP1,DISP=(,PASS),SPACE=(CYL,(5,5)),UNIT=SYSDA
//*--------------------------------------------------------
//OUT DD DSN=RKAKARL.TEST.DECODE.OUTPUT,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(10,10),RLSE)
//*
//TOOLIN DD *
COPY FROM(INDD1) TO(T1) USING(CTL1)
COPY FROM(INDD2) TO(T1) USING(CTL2)
SPLICE FROM(T1) WITHALL -
ON(1,5,ZD) -
WITH(18,5) -
WITH(23,15) -
WITH(48,05) -
TO(OUT)
/*
//CTL1CNTL DD *
OUTREC FIELDS=(1:1,5,6:6,12,38:30,10,53:18,12)
/*
//CTL2CNTL DD *
OUTREC FIELDS=(1:11,5,18:6,5,23:16,15,48:1,5,64:X)
/*
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Fri Mar 19, 2010 6:36 pm
Reply with quote

Well, you copy 5 records from INDD1 to T1. Then you copy 5 records from INDD2 to T1. So if T1 has a disposition of MOD it should contain 10 records, if not it would only contain the last 5 written to it.
Back to top
View user's profile Send private message
Rambhupal.chaudari

New User


Joined: 30 Mar 2007
Posts: 25
Location: Hyderabad

PostPosted: Fri Mar 19, 2010 6:36 pm
Reply with quote

Hi Kevin,

Can you plz provide me your jcl for reference..

thanks,
Ram.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Fri Mar 19, 2010 6:37 pm
Reply with quote

Code:

//STEP0001 EXEC PGM=ICETOOL                                       
//INDD1    DD   *                                                 
14236KIMBERELY   ROSE LAND   6 YRS                               
14325SHARLA      ROSE LAND   3 YRS                               
35421STEWART     FORTE       2 YRS                               
57234LANNGAN     FORE MYERS  4 YRS                               
98234DEMERCHANT  FORT MYERS  5 YRS                               
/*                                                               
//INDD2    DD   *                                                 
9000 CPI  14236ANALYST                                           
5000 CPI  14325PROGRAMMER                                         
6000 CPI  35421TESTER                                             
4000 CPI  57234HR                                                 
3500 CPI  98234MANAGER                                           
/*                                                               
//T1       DD   DISP=(MOD,PASS),UNIT=VIO,SPACE=(CYL,(1,1))       
//OUT      DD   SYSOUT=*                                         
//DFSMSG   DD   SYSOUT=*                                         
//TOOLMSG  DD   SYSOUT=*                                         
//TOOLIN   DD   *                                                 
COPY FROM(INDD1) TO(T1) USING(CTL1)                               
COPY FROM(INDD2) TO(T1) USING(CTL2)                               
SPLICE FROM(T1) WITHALL -                                         
   ON(1,5,ZD) -                                                   
   WITH(18,5) -                                                   
   WITH(23,15) -                                                 
   WITH(48,05) -                                                 
   TO(OUT)                                                       
/*                                                               
//CTL1CNTL DD *                                                   
  OUTREC FIELDS=(1:1,5,6:6,12,38:30,10,53:18,12)                 
/*                                                               
//CTL2CNTL DD *                                                   
  OUTREC FIELDS=(1:11,5,18:6,5,23:16,15,48:1,5)                   
/*                                                               
//*                                                               
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: Fri Mar 19, 2010 10:31 pm
Reply with quote

Ram,

In your original job, just change:

//T1 DD DSN=&&TEMP1,DISP=(,PASS),SPACE=(CYL,(5,5)),UNIT=SYSDA

to:

//T1 DD DSN=&&TEMP1,DISP=(MOD,PASS),SPACE=(CYL,(5,5)),UNIT=SYSDA
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 ICETOOL returns no records JCL & VSAM 1
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Compare only first records of the fil... SYNCSORT 7
Search our Forums:

Back to Top