Logic of various REXX-created jobstreams

                                                                   
 If we are creating JCL to run, create it with usual jobname.      
 If creating JCL to edit, use the jobname which starts with 'Z'.   
 (ZGRBDFTP creates/runs, ZGRBDFT1 just creates)                    
                                                                   
 Date-variable data in REXX 'model' has various formats:           
                MMDD                                               
                MMDDYY                                             
                YYMMDD                                             
                MMYY of previous month                             
                qQyy of previous quarter                           
                                                                   
Some jobs use 'mmdd' as part of name of file(s)                    
    TODAY value for these jobs defined via                         
      TODAY=RIGHT(DATE('S'),4)                                     
                                                                   
Some jobs use 'mmddyy' as part of name of file(s)                  
    TODAY value for these jobs defined via                         
    
    
      DAZE=RIGHT(DATE('S'),4)                               
      YERE=SUBSTR(DATE('S'),3,2)                            
      TODAY=DAZE/* */YERE                                   
              and/or                                        
      T=DAZE/* */YERE                                       
                                                            
Some jobs use 'yymmdd' as part of name of file(s)           
    TODAY value for these jobs defined via                  
      DAZE=RIGHT(DATE('S'),4)                               
      YERE=SUBSTR(DATE('S'),3,2)                            
      TODAY=YERE/* */DAZE                                   
                                                            
Some jobs use 'mmyy' as part of name of the file(s) but     
  'mm' = last month                                         
     For example, model REXCASEM and REXYMONP say:          
       MM=SUBSTR(DATE('S'),5,2)                             
       YY=SUBSTR(DATE('S'),3,2)                             
       QQ=MM-1                                              
       ZZ=QQ/* */YY                                         
       RR = WORDLENGTH(ZZ,1)                                
       
       IF RR = 3 THEN                                                    
         ZZ = "0"/* */ZZ                                                 
     Subtracting 1 from QQ turns it from charstring to number, then      
     building ZZ converts QQ back to charstring but loses leading 0.     
       MM = 11 and YY = 04 --> ZZ = 1004 which is okay                   
       MM = 02 and YY = 04 --> ZZ = 204 which must have "0" put back     
          in front to yield '0204'                                       
                                                                         
'WCAREFTP/ZCAREFTP' build value 'WCAREqQyy':                             
    'q'  = previous quarter (1, 2, 3 or 4)                               
    'yy' = year of previous quarter                                      
                                                                         
   NOTE: This job should be run on 1st day of a quarter, as it checks    
    current date against '0101'-'0401'-'0701'-'1001' to determine        
    previous quarter. If not run on proper day, run 'ZCAREFTP' and       
    edit 'PMHH.REXWCART.JCL' to make correction.                         
                                                                         
    Examples:                                                            
      Running WCAREFTP on 07/01/04 would create 'WCARE2Q04.TXT',         
      which is the correct value for the previous quarter.,              
                                                                    
      Running ZCAREFTP on 07/02/04 would create PMHH.REXWCART.JCL   
      which would have 'WCARETQY.TXT'. You would then change       
      this to 'WCARE2Q04.TXT' before running 'PMHH.REXWCART.JCL     
                                                                    
                                                                    
     ********** Concatenating JCL and REXX output **********        
     
Jobs are concatenation of JCL, REXX-created SYSIN data and possbly more JCL.

Some jobs are submitted manually from PMHH.REXX.JCL.
Some jobs are automated in A2K's Dayend PMHH runstream.