It's workable, but I'd suggest that for what you're doing you don't
really need a separate test for valid userid.  The query rdr itself will
do that.  Your date checking can be streamlined as well.  This would be
my solution:
/*                                                      
**                                                      
*/                                                      
Address Command                                         
Arg idlist                                              
If idlist = '' then Do                                  
   Say "C'mon, I need at least one userid!"             
   Exit 1                                               
   End                                                  
chkdate=Date('S',Date('B')-1,'B','-')                   
'PIPE (End ? Name RetrieveRdr)',                        
' var idlist',                                          
'|Split',                                               
'|du:Fanout',                                           
'|Spec w1 1.8 , , n',                                   
'|rj:Juxtapose',                                        
'|Spec ,TRANSFER, 1 w1 nw ,RDR, nw w2 nw ,* RDR, nw',   
'|CP',                                                  
'|Cons',                                                
'?du:',                                                 
'|Spec w1 1.8 , , n',                                   
'|bi:Juxtapose',                                        
'|Spec w1 n ,is not a valid userid., nw',               
'|Cons',                                                
'?du:',                                                 
'|Spec ,Q R, n w1 nw ,ALL ISO, nw',                     
'|cp:CP',                                               
'|Pick w8 >>= /'chkdate'/',                             
'|Spec w2',                                             
'|rj:',                                                 
'?cp:',                                                 
'|NFind 0' ||,                                          
'|bi:'                                                  
Exit Rc                                                  

Thanks for posting your solution.  Code sharing benefits everyone by
stirring the old grey matter if nothing else.  Yours made me go look up
the Rexx treatment of &&, which I'd forgotten.

Mike Harding
EDS VM National Capability
134 El Portal Place
Clayton, Ca.  USA  94517-1742

* phone: +01-925-672-4403
*  Fax: +01-925-672-4403
* mailto:[EMAIL PROTECTED]   * <mailto:[EMAIL PROTECTED]>
(personal)
Note:  For 2007, I am off on Fridays with even Julian dates and Mondays
with odd ones.

Reply via email to