Newer version of documentation BMC provides a newer version of the documentation for this version of the product. As a result, BMC no longer accepts comments in this space.BMC recommends upgrading to the latest version of the product. To see documentation for that version, see bao8301.

REXX - Example


The following example shows how to convert the TOD EBCDIC value from a local variable such as LINE.OPRNOTE.n.TOD into a readable value:

/* REXX------------------------------------------------------*/  
/*                                                           */  
/* A sample EXEC that uses the IPCS BLSUXTOD service to      */  
/* convert timer units.  The result will be returned in      */  
/* Greenwich Mean Time.                                      */  
/*                                                           */  
/* Example:                                                  */  
/*                                                           */  
/* D17D28A5165842CA yields 10/13/2016 17:15:28.399748        */  
/*                                                           */  
/*-----------------------------------------------------------*/  
PARSE UPPER ARG EXECNAME TUNITS FILLER                           
                                                                
TUNITS = X2C(TUNITS)                                             
TIMESTAMP = COPIES(0,26)           /* force result length=26 */  
                                                                
ADDRESS LINKPGM 'BLSUXTOD TUNITS TIMESTAMP'                      
SAY TIMESTAMP                                                    
                                                                
EXIT

The following example is a REXX EXEC to add a calendar set that has two day entries and one time and period entry:

/* REXX */                                                              
DROP CAL. /* DROP ALL STEM VARIABLES FIRST */                          
/* CALENDAR Definitions                                        */       
CAL.CALENDAR.SET.DAY.0 = '2'                                            
CAL.CALENDAR.SET.TIME.0 = '1'                                           
CAL.CALENDAR.SET.PERIOD.0 = '1'                                         
CAL.CALENDAR.SET.DAY.1 = 'DLY'                                          
CAL.CALENDAR.SET.DAY.2 = 'MON'                                          
CAL.CALENDAR.SET.TIME.1 = 'KEN1 Test'                                   
CAL.CALENDAR.SET.PERIOD.1 = 'FirstSh'                                   
'TOMEXEC FUNCTION(ADD) STEM(CAL) CALSET(calset1) '                         
SAY 'TOMRC= 'TOMRC                                                      
SAY 'CAL.EXCEPT.0= 'CAL.EXCEPT.0
DO I=1 TO CAL.EXCEPT.0
 SAY 'CAL.EXCEPT.'I' = 'CAL.EXCEPT.I
END




 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*