Page 1 of 1

Combine three file input records into one file output record

PostPosted: Fri Jun 17, 2016 5:04 pm
by zxdalma
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

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

PostPosted: Mon Jun 20, 2016 8:12 pm
by ottoelflaco
Hi, maybe you can use SPLICE with WITHEACH. After squeeze with MID=' ', dont mind the length.

Regards