Combine three file input records into one file output record



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

Combine three file input records into one file output record

Postby zxdalma » Fri Jun 17, 2016 5:04 pm

Hello All,

I have one in-stream input file with three records like this :

//IN       DD  *    
 AAAAA              
 SSSSSSSSSSSSSSS SSS
 WWWWWWWWW WWW      
/*                  


I need to combine these three records to produce this :

AAAAASSSSSSSSSSSSSSS SSSWWWWWWWWW WWW
 

The three input records may have different lengths from one execution to another execution, in this way I can get the for example :

//IN       DD  *    
  SSSSSSSSSSSSSSS SSS
 WWWWWWWWW WWW  
 AAAAA    
/*    


This should produce an output :

SSSSSSSSSSSSSSS SSSWWWWWWWWW WWWAAAAA


What is it known in advance is that every input record ends with a double blank (X'40'X'40').

How can I do this using DFSORT or ICETOOL?

Many thanks in advance

Code'd
zxdalma
 
Posts: 13
Joined: Tue Oct 06, 2015 9:39 pm
Has thanked: 1 time
Been thanked: 0 time

Re: Combine three file input records into one file output re

Postby ottoelflaco » Mon Jun 20, 2016 8:12 pm

Hi, maybe you can use SPLICE with WITHEACH. After squeeze with MID=' ', dont mind the length.

Regards
ottoelflaco
 
Posts: 36
Joined: Fri Sep 21, 2012 2:33 pm
Has thanked: 1 time
Been thanked: 0 time


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post