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

Using a Parameterized Cursor in SQLRPGLE

Dynamic SQL in RPG

DB2 System Versioning on IBM i – Automatic History Tracking Without Triggers