MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Vertical merge of first record with second record
Goto page Previous  1, 2
 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12380
Topics: 75
Location: San Jose

PostPosted: Fri Dec 21, 2007 11:10 am    Post subject: Reply with quote

Quote:

Kolusu,
I executed the code in the above link but it did not give what OP wants.


Vkphani,

bonk bonk Please read the comments in that solution posted by me. I gave link to a generic solution for records of 80 bytes. OP just needs to customize it for 10 bytes which is quite simple and he will get the desired results. Please try to understand the job before you decide to simply say it does not work.


vkphani wrote:
I don't think it is possible to achieve what you want in single step.


The solution posted by me is indeed a single step solution. Here are the control cards specifically for 10 byte records.

Code:

//STEP0100 EXEC PGM=ICETOOL                                   
//TOOLMSG  DD SYSOUT=*                                       
//DFSMSG   DD SYSOUT=*                                       
//IN       DD *                                               
AAAAAAAAAA                                                   
11111111                                                     
BBBBBBBBBB                                                   
22222222                                                     
CCCCCCCCCC                                                   
33333333                                                     
//OUT      DD SYSOUT=*                                       
//TOOLIN    DD *                                             
  SPLICE FROM(IN) TO(OUT) WITHEACH -                         
      ON(021,8,CH)                 -                         
    WITH(012,08)                   -                         
  KEEPNODUPS USING(CTL1)                                     
//CTL1CNTL     DD *                                           
  INREC IFTHEN=(WHEN=INIT,                                   
       OVERLAY=(001:01,10,                                   
                012:01,10,                                   
                021:SEQNUM,8,ZD,START=2,INCR=1,               
                029:021,8,ZD,MOD,+2,TO=ZD,LENGTH=1),HIT=NEXT),
                                                             
        IFTHEN=(WHEN=(029,1,ZD,EQ,0),                         
       OVERLAY=(012:08X,                                     
                021:021,8,ZD,SUB,029,1,ZD,M11,LENGTH=8)),     
                                                             
        IFTHEN=(WHEN=(029,1,ZD,EQ,1),                         
       OVERLAY=(001:10X,                                     
                021:021,8,ZD,SUB,029,1,ZD,M11,LENGTH=8))     
                                                             
   OUTFIL FNAMES=OUT,                                         
   OUTREC=(001,19)                                           
/*                                                           


Krisprems,

What happens if the 9th byte is not a space?
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
krisprems
Beginner


Joined: 13 Dec 2006
Posts: 101
Topics: 4
Location: india

PostPosted: Fri Dec 21, 2007 12:49 pm    Post subject: Reply with quote

kolusu,
Quote:
Krisprems,

What happens if the 9th byte is not a space?
my solution was based on the sample provided by kavi, which had space in 9th position....
also kavi stated that
Quote:
First record is of 10 bytes and second is of 8 Bytes.

If it was not a space then i would ask kavi if there is any way to identify the alternative records, if not then i would have given the same solution as yours
_________________
cHEERs
krisprems
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group