Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Problem while combining two files using icetool

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Problem while combining two files using icetool
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

Moderator Team Head


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

PostPosted: Fri Mar 19, 2010 6:21 pm    Post subject: Reply to: Problem while combining two files using icetool
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    Post subject:
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

Moderator Team Head


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

PostPosted: Fri Mar 19, 2010 6:36 pm    Post subject: Reply to: Problem while combining two files using icetool
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    Post subject:
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

Moderator Team Head


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

PostPosted: Fri Mar 19, 2010 6:37 pm    Post subject: Reply to: Problem while combining two files using icetool
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 Moderator


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

PostPosted: Fri Mar 19, 2010 10:31 pm    Post subject:
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    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 Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 pm
No new posts ROUNDED Problem with COMPUTE statement shalem COBOL Programming 11 Thu Feb 09, 2017 8:16 pm
No new posts Converting decimal to numeric using I... Balaryan DFSORT/ICETOOL 4 Thu Feb 02, 2017 11:27 pm
No new posts SYMNAMES problem jacobdng DFSORT/ICETOOL 7 Thu Dec 22, 2016 7:47 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us