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
 
ICETOOL : Please trace the error.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
pushpagiri

New User


Joined: 07 Jul 2005
Posts: 51

PostPosted: Fri Jul 08, 2005 11:43 am    Post subject: ICETOOL : Please trace the error.
Reply with quote

I want a output like :

Code:
 1111 XAAX  AAAA
 2222 XBBX  BBBB
 4444 XDDX  DDDD


From the inputs in1 and in2 given below .
But i am getting output as in 'out'..
I have used the jcl given below..
please find the error in it.
------in1------------

Code:
 1111 AAAA
 2222 BBBB
 3333 CCCC
 4444 DDDD   
 

------in2------------

Code:
 2222 XBBX         
 1111 XAAX         
 4444 XDDX         
 5555 XEEX                       
 

------ out ------------

Code:
 1111 XAAX 
 2222 XBBX 
 4444 XDDX 


---------JCL------------

Code:
 //TMP1   DD DSN=U117584.TRAIN.OUT1,DISP=MOD                 
 //OUT    DD DSN=U117584.TRAIN.OUT3,DISP=SHR                 
 //TOOLIN DD *                                               
   COPY FROM(IN1) TO(TMP1) USING(CPY1)                       
   COPY FROM(IN2) TO(TMP1) USING(CPY2)                       
   SPLICE FROM(TMP1) TO(OUT) ON(1,4,CH) WITH(6,9)                                               
 /*                                                         
 //CPY1CNTL DD *                                             
    OUTREC FIELDS=(1:1,4,11:6,9)                             
 /*                                                         
 //CPY2CNTL DD *                                             
    OUTREC FIELDS=(1:1,4,6:6,9)                               
 /*                                                         
Back to top
View user's profile Send private message

superk

Moderator Team Head


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

PostPosted: Fri Jul 08, 2005 6:12 pm    Post subject: Re: ICETOOL : Please trace the error.
Reply with quote

Change the SPLICE statement to:

SPLICE FROM(TMP1) TO(OUT) ON(1,4,CH) WITH(6,4)

and you will get the results you require. You don't want to overlay the blanks from positions 11-14 over the values that are already in those positions.
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 Jul 08, 2005 8:42 pm    Post subject:
Reply with quote

Superk is right. Actually, I'd suggest changing the job to the following to make it clear where the data comes from and where the spaces come from. I'd also use a temporary file for the TMP1 MOD data set instead of a permanent file so you don't have to empty out TMP1 each time you run the job.

Code:

//S1    EXEC  PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD DSN=... input file1
//IN2 DD DSN=... input file2
//TMP1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)
//OUT DD DSN=... output file
//TOOLIN DD *
  COPY FROM(IN1) TO(TMP1) USING(CPY1)
  COPY FROM(IN2) TO(TMP1) USING(CPY2)
  SPLICE FROM(TMP1) TO(OUT) ON(1,4,CH) WITH(6,4)
/*
//CPY1CNTL DD *
   OUTREC FIELDS=(1:1,4,11:6,4,19:X)
/*
//CPY2CNTL DD *
   OUTREC FIELDS=(1:1,4,6:6,4,19:X)
/*
Back to top
View user's profile Send private message
Elixir

Active User


Joined: 08 Feb 2009
Posts: 116
Location: CHENNAI/NEW JERSEY - INDIA/USA

PostPosted: Thu Mar 31, 2011 9:41 pm    Post subject: ICETOOL--SPLICE
Reply with quote

Hi,

I am replying to an old thread becoz my requirement is similar to this,

IN01

1111 AAAA
2222 BBBB
3333 CCCC
4444 EEEE
4444 DDDD

IN02

2222 XBBX
1111 XAAX
4444 XDDX
5555 XEEX
4444 XDEX

Ouput required,

1111 XAAX AAAA
2222 XBBX BBBB
4444 XDDX DDDD
4444 XDEX EEEE

When I tried running using same TOOLIN parameters, I get only one record corresponding to 4444.

Kindly let me know if we can populated multiple entries corresponding to the Key field in the output file.

Thanks,
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Thu Mar 31, 2011 11:24 pm    Post subject:
Reply with quote

Elixir,

It would have been easier to diagnose the problem if you posted the entire TOOLMSG and DFSMSG output. Also I noticed that there is a many to many match in your data. Looks like both files have duplicates and in that case you can't use SPLICE. You need to use JOINKEYS. However you need to do a better job of explaining the rules (especially when there are duplicates involved). The key 4444 has 2 keys and in IN01 file and some how you managed to matched the second 4444 DDDD record with the first 4444 XDDX record and followed the same pattern for the other 2 records. What happens if there are more than 2 records per key?
Back to top
View user's profile Send private message
Elixir

Active User


Joined: 08 Feb 2009
Posts: 116
Location: CHENNAI/NEW JERSEY - INDIA/USA

PostPosted: Wed Apr 20, 2011 8:24 pm    Post subject:
Reply with quote

SKolusu,

IN01

1111 AAAA
2222 BBBB
3333 CCCC
4444 EEEE
4444 DDDD

IN02

2222 XBBX
1111 XAAX
4444 XDDX
5555 XEEX
4444 XDEX

Requied output:

1111 XAAX AAAA
2222 XBBX BBBB
4444 XDDX DDDD
4444 XDEX EEEE

Kindly let me know how to achieve this.
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Wed Apr 20, 2011 9:40 pm    Post subject:
Reply with quote

F1
Code:

1111 AAAA   
2222 BBBB   
3333 CCCC   
4444 EEEE   
4444 DDDD   


F2
Code:
2222 XBBX     
1111 XAAX     
4444 XDDX     
5555 XEEX     
4444 XDEX     


Your expected output:
Code:
1111 XAAX AAAA
2222 XBBX BBBB
4444 XDDX DDDD
4444 XDEX EEEE


First state your rule clearly
I don't understand what is the criteria that you don't want record
4444 XDDX EEEE but want 4444 XDEX EEEE
Also
4444 XDEX DDDD but want 4444 XDDX DDDD

Is it because in both third character is same??? icon_wink.gif
Sorry.. but today am thinking in all nonsense directions ... icon_rolleyes.gif icon_rolleyes.gif
4444 XDEX EEEE
4444 XDDX DDDD
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 ICETOOL - RESIZE DYNAMICALLY kranthikumarb DFSORT/ICETOOL 0 Tue Nov 21, 2017 5:30 pm
No new posts -502 Error - Cursor already open anand jeyapaul DB2 7 Sun Oct 29, 2017 4:22 am
No new posts IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts FTP Skip or ignore error and process ... AJAYREDDY All Other Mainframe Topics 3 Wed Sep 27, 2017 8:12 pm
No new posts Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am

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