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
 

 

SPLICE Please help..

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

New User


Joined: 15 Dec 2005
Posts: 72
Location: RALEIGH NC, USA

PostPosted: Thu Dec 06, 2007 8:19 pm    Post subject: SPLICE Please help..
Reply with quote

I have two files and want to combine fields from FILEA and FILEB to create FILEC

FILEA FIXED LENGTH
000007271070214439804000005RAMAL SUJATHA R40110...

FILEB FIXED LENGTH 302
00000727107RAMAL SUJATHA 00000000003N001431744

FILEC FIXED LENGTH 302
00000727107RAMAL SUJATHA 021443980433N001431744

The key is 1-11 on file A and B.

From FILEA I need only bytes 11 to 22
From FILEB I need bytes 1 to 41 and 52 to 302

Then build FILEC like this
FILEC bytes 1 to 41 need to have FILEB bytes 1 to 41
then FILEC bytes 42 to 51 to have bytes 11 to 22 from FILEA
then FILEC bytes 52 to 302 bytes 52 to 302 from FILEB
This is my JCL and i cannot work out how to do it ...Please help
Code:
//TOOLIN   DD *                                             
    COPY FROM(IN1) TO(TEMP1) USING(CTL1)                     
    COPY FROM(IN2) TO(TEMP1) USING(CTL2)                     
    SPLICE FROM(TEMP1) TO(OUT) ON(1,11,CH) WITH(51,209)     
//CTL1CNTL DD *                                             
    OUTFIL FNAMES=TEMP1,OUTREC FIELDS=(11:12,22)             
/*                                                           
//CTL2CNTL DD *                                             
    OUTFIL FNAMES=TEMP1,OUTREC FIELDS=(1:1,41,52:52,209)     
/*                                                           
Back to top
View user's profile Send private message

srj1957

New User


Joined: 15 Dec 2005
Posts: 72
Location: RALEIGH NC, USA

PostPosted: Thu Dec 06, 2007 10:26 pm    Post subject: Reply to: SPLICE Please help..
Reply with quote

I have just tried this and getting data in TEMP file but not OUT file

Code:
//IN1   DD DSN=TRANSFER.SRJ.DAILY,DISP=SHR         
//IN2   DD DSN=TRANSFER.SRJ.DATA,DISP=SHR
//TEMP1 DD DSN=ISD.SRJ.TEMP, ...                       
//        .
//        .                               
//OUT   DD DSN=ISD.SRJ.D.SEQ.TDEMPLY.LOAD, ...                       
//        .
//        .                     
//TOOLIN   DD *                                         
    COPY FROM(IN1) TO(TEMP1) USING(CTL1)                 
    COPY FROM(IN2) TO(TEMP1) USING(CTL2)                 
    SPLICE FROM(TEMP1) TO(OUT) ON(1,11,CH) WITH(11,22)   
//CTL1CNTL DD *                                         
    OUTREC FIELDS=(11:12,22)                             
/*                                                       
//CTL2CNTL DD *                                         
    OUTREC FIELDS=(1:1,41,52:52,209)                     
/*                                                       

I get no data in OUT file
and TEMP1 looks like this ( * = blank )

00000727107RAMAL SUJATHA***********3N001431744…

I'm not understanding...

Does anyone have any ideas what is wrong ?
Thank you
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 Dec 07, 2007 12:35 am    Post subject:
Reply with quote

You aren't lining things up correctly.

Here's a DFSORT/ICETOOL job that will do what you asked for:

Code:

//S1    EXEC  PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG  DD SYSOUT=*
//IN1   DD DSN=TRANSFER.SRJ.DAILY,DISP=SHR
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)
//CON DD DSN=*.T1,VOL=REF=*.T1,DISP=(OLD,PASS)
//    DD DSN=TRANSFER.SRJ.DATA,DISP=SHR
//OUT   DD DSN=ISD.SRJ.D.SEQ.TDEMPLY.LOAD, ...
//TOOLIN DD *
COPY FROM(IN1) TO(T1) USING(CTL1)
SPLICE FROM(CON) TO(OUT) ON(1,11,CH) -
  WITH(1,41) WITH(52,251)
/*
//CTL1CNTL DD *
  INREC BUILD=(1,11,42:12,10,302:X)
/*
Back to top
View user's profile Send private message
srj1957

New User


Joined: 15 Dec 2005
Posts: 72
Location: RALEIGH NC, USA

PostPosted: Fri Dec 07, 2007 12:55 am    Post subject: Reply to: SPLICE Please help..
Reply with quote

Frank,
I really appreciate your time and effort in resolving this for me...as usual it worked perfectly. icon_biggrin.gif

Thanks again..
Steve
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 Matching records using splice for COM... hiravibk DFSORT/ICETOOL 4 Sun Sep 27, 2015 12:05 pm
No new posts JOINKEYS or SPLICE? while retaining h... hsinaz50 DFSORT/ICETOOL 4 Thu Apr 17, 2014 12:13 am
No new posts Match 2 files using SPLICE sudib19 DFSORT/ICETOOL 6 Wed Dec 04, 2013 3:06 am
No new posts Syncsort - SPLICE only certain info. ramsri SYNCSORT 11 Wed Jul 24, 2013 4:48 pm
No new posts compare 2 file based on key+retain du... Hariharan BK DFSORT/ICETOOL 6 Thu May 02, 2013 12:04 am


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