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

(IBM i fans only) Efficient WRKSPLF with WSF - How to Search string into spooled files, Sort, and Generate PDFs on IBMi

(IBM i fans only) Detecting and Handling Non-Printable Characters in DB2 SQL Using LOCATE() and REPLACE() Functions

(IBM i fans only) How to Sniff User Access