Hello,

We've got many programs with interpreted rexx variables in pipelines 
like "someText", here :
(pipeline-A)
'PIPE',                       
   '  < 'fileIn,                  
   '| spec 1-* 1 /'someText'/ 123',
   '| > 'fileOut                  

These blow up each time the rexx variables contain some "forbidden" 
character (here, "|").
I thought that these two following alternatives would do the job and 
would be more robust, but they *don't* do the same job when the rexx 
variable "someText" is empty and when the file is less than 123 wide :

(pipeline-B)
'PIPE (endchar %)',                           
   '  < 'fileIn,                                 
   '| S: spec stop anyeof 1-* 1 select 1 1-* 123',
   '| > 'fileOut2,                               
   '%',                                          
   '  var someText',                             
   '| duplicate * ',                             
   '| S:'                                        

(pipeline-C)
'PIPE (endchar %)',        
   '  < 'fileIn,              
   '| G: gather stop anyeof', 
   '| spec 1-* 1 read 1-* 123',
   '| > 'fileOut3,            
   '%',                       
   '  var someText',          
   '| duplicate *',           
   '| G:'                     

Pipeline-A pads with blanks between "1-*" and "someText", whereas 
pipeline-B and pipeline-C don't.

(1)
Do you know why ?
I found no hint in "specrefence" about that phenomenon.

In pipeline-B, I can write a '// 123' before the "select 1" to hide the 
"problem", but that's really ugly ...

(2)
How would you build a robust pipeline doing the same job as pipeline-A ?
I tried to search the mailing-list archive for words such as 
"interpret", "rexx", etc., but didn't found anything on this subject.

Thanks
Michaël

Reply via email to