IBMi (AS400) fans only - HOW TO GET CURRENT TIME FROM CL (CONTROL LANGUAGE)


#IBMiSample

This example gets current time in format HHMMSS.


             PGM                                     
             DCL        VAR(&TIME) TYPE(*CHAR) LEN(6)
             RTVSYSVAL  SYSVAL(QTIME) RTNVAR(&TIME)  
             SNDPGMMSG MSG(&TIME)                    
             ENDPGM                                  

Comments

Post a Comment

Popular posts from this blog

IBMi (AS400) fans only ‘ Memories (IBM Coding Forms)

IBMi (AS400) fans only ' SQLCODE values: Dear readers, unleash your suggestions!

Efficient WRKSPLF with WSF: How to Search string into spooled files, Sort, and Generate PDFs on IBMi