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
 
SPLICE usage consult

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

New User


Joined: 28 Jul 2005
Posts: 37

PostPosted: Tue May 22, 2007 9:26 pm    Post subject: SPLICE usage consult
Reply with quote

I have some requirement need splice 2 input files to 1 file.

File A
A1
A2
B3
B4
B5
C6

File B
Aa
Bb
Cc

desired ouput should be
A1a
A2a
B3b
B4b
B5b
C6c

Is SPLICE can complete this function?
I can only get the below result use SPLICE+WITHALL:
A1
A2a
B3
B4
B5b
C6c
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: Tue May 22, 2007 10:00 pm    Post subject: Re: SPLICE usage consult
Reply with quote

Why don't you post your DFSORT job code, and then maybe we can offer a suggestion?
Back to top
View user's profile Send private message
rally

New User


Joined: 28 Jul 2005
Posts: 37

PostPosted: Wed May 23, 2007 8:48 pm    Post subject:
Reply with quote

rally wrote:
I have some requirement need splice 2 input files to 1 file.

File A
A1
A2
B3
B4
B5
C6

File B
Aa
Bb
Cc

desired ouput should be
A1a
A2a
B3b
B4b
B5b
C6c

Is SPLICE can complete this function?
I can only get the below result use SPLICE+WITHALL:
A1
A2a
B3
B4
B5b
C6c


Please help review my test code below

Code:

//FILEA DD DSN=...,
//FILEB   DD DSN=...,
//TMP1     DD DSN=&&TEMP1,DISP=(MOD,PASS),SPACE=&SPSM 
//OUTPUT   DD DSN=...
//TOOLIN   DD  *                                               
  COPY FROM(FILEA) TO(TMP1) USING(CTL1)                     
  COPY FROM(FILEB) TO(TMP1) USING(CTL2)                       
  SPLICE FROM(TMP1) TO(OUTPUT) ON(1,1,CH) WITH(3,1) WITHALL -
  USING(CTL3)                                                   
//CTL1CNTL DD *                                                 
  OUTREC FIELDS=(1,2,3:X)                     
//CTL2CNTL DD *                                                 
  OUTREC FIELDS=(1,1,2:X,2,1)                                 
//CTL3CNTL DD *                                                 
  OUTFIL FNAMES=OUTPUT,OUTREC=(1,3)                       
Back to top
View user's profile Send private message
harish3201

New User


Joined: 06 May 2007
Posts: 1
Location: india

PostPosted: Fri May 25, 2007 3:36 pm    Post subject: Re: SPLICE usage consult
Reply with quote

U could use this

Code:

//DFSORT   EXEC PGM=ICETOOL                             
//TOOLMSG  DD  SYSOUT=*                                 
//DFSMSG   DD  SYSOUT=*                                 
//SYSOUT   DD  SYSOUT=*                                 
//IN2      DD  *                                       
AA                                                     
BB                                                     
CC                                                     
/*                                                     
//TMP1     DD  DSN=&&TEMP1,                             
//             DISP=(MOD,PASS),                         
//             UNIT=SYSDA,                             
//             SPACE=(CYL,(5,5),RLSE),                 
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=24000)   
//IN1      DD  DSN=*.TMP1,VOL=REF=*.TMP1,DISP=(MOD,PASS)
//         DD  *                                       
A1                                                     
A2                                                     
B3                                                     
B4                                                     
B5                                                     
C6                                                     
/*                                           
//OUT      DD  SYSOUT=*                       
//TOOLIN   DD  *                             
 COPY FROM(IN2) TO(TMP1) USING(CPY1)         
 SPLICE FROM(IN1) TO(OUT) ON(1,1,CH) WITHALL -
 WITH(2,1) KEEPNODUPS                         
/*                                           
//CPY1CNTL DD *                               
 INREC BUILD=(1:1,1,2:X,3:2,1)               
/*                                           


Output :
Code:

A1A
A2A
B3B
B4B
B5B
C6C
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 May 28, 2007 2:30 am    Post subject:
Reply with quote

rally,

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

Code:

//S1    EXEC  PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG  DD SYSOUT=*
//FILEA DD DSN=...  input fileA
//FILEB DD DSN=...  input fileB
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)
//OUT DD DSN=...    output file
//TOOLIN   DD    *
  COPY FROM(FILEB) TO(T1) USING(CTL1)
  COPY FROM(FILEA) TO(T1) USING(CTL2)
  SPLICE FROM(T1) TO(OUT) ON(1,1,CH) WITH(2,1) WITHALL
/*
//CTL1CNTL DD *
  INREC BUILD=(1,1,3:2,1)
/*
//CTL2CNTL DD *
  INREC BUILD=(1,2,X)
/*
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 )SEL and )ENDSEL usage cvnlynn TSO/ISPF 4 Thu Jun 15, 2017 1:15 am
No new posts Need inputs on Space requirement and... ashek15 IMS DB/DC 0 Sat Apr 01, 2017 8:26 am
No new posts How can amount of the Storage Usage b... esduman61 CICS 6 Wed Mar 09, 2016 1:19 pm
No new posts Controlling usage of resources by tasks raja1128 CICS 3 Fri Nov 06, 2015 9:53 am
No new posts TDQ & its usage as ATI akodakka CICS 3 Sat Oct 17, 2015 6:04 pm

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