Is there a way for CA Easytrieve to automatically provide a leading zero in the SYSTIME field if desired?

Document ID : KB000012216
Last Modified Date : 14/02/2018
Show Technical Document Details
Question:

Is there a way for CA Easytrieve to automatically provide a leading zero in the SYSTIME field if desired?

Environment:
CA Easytrieve Report Generator, release 11.6
Answer:

CA Easytrieve does not currently provide the functionality to add a leading zero in the SYSTIME field.

The following code will insert the leading zero for the SYSTIME field:

WS-TIME  W   8   A                                                       
FIRST-PART  WS-TIME  1  A                                                
*                                                                        
JOB INPUT NULL                                                           
WS-TIME = SYSTIME                                                        
IF FIRST-PART = ' '                                                      
FIRST-PART = '0'                                                         
END-IF                                                                   
DISPLAY 'EDITED SYSTIME = ' WS-TIME                                      
STOP                                                                     
/*