I thought I would try out using "bpxwunix" in REXX.

The sample code worked fine.

But, I normally code with SIGNAL NOVALUE active.

Then the sample did not work.  It took me a little while to work out. 

This does work:-

/*REXX****************************************************************/    
 Trace 'o'                                                                 
 Signal on Syntax                 /* for unexpected results.         */    
/*===================================================================*/    
  unsorted_data. =                                                         
  unsorted_data.0=5                                                        
  unsorted_data.1="KIJJ"                                                   
  unsorted_data.2="KQWR"                                                   
  unsorted_data.3="ADGF"                                                   
  unsorted_data.4="OEPE"                                                   
  unsorted_data.5="VNVV"                                                   
                                                                           
  sorted_data. =                                                           
  sorted_data.0=0                                                          
                                                                           
  cmd="sort"                                                               
                                                                           
  call bpxwunix cmd,"unsorted_data.","sorted_data.",stderr.                
                                                                           
  say "sorted_data:"                                                       
  say "======="                                                            
  do i=1 to sorted_data.0                                                  
    say sorted_data.i                                                      
  end                                                                      
                                                                           
  say "stderr:"                                                            
  say "======="                                                            
  do i=1 to stderr.0                                                       
     say stderr.i                                                          
  end                                                                      
Return                                                                     
/*===================================================================*/    

I have not listed the diagnostic section for the SIGNAL processes.

Note the quoted stem names.  This is required.

Regards
Bruce Hewson

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to