Ü   RTVSYSVAL

·        This command is used to retrieve the system values like system date, time, month, year, d ay, century etc.

 

Example


/* Retrieve current Timestamp (system value).                        */
                                                                        
              RTVSYSVAL  SYSVAL(QCENTURY) RTNVAR(&CENTURY)              
              CHGVAR     VAR(&CENT) VALUE('20')                         
              IF         COND(&CENTURY *EQ '0') THEN(CHGVAR +           
                           VAR(&CENT) VALUE('19'))                      
              RTVSYSVAL  SYSVAL(QYEAR) RTNVAR(&YEAR)                    
              RTVSYSVAL  SYSVAL(QMONTH) RTNVAR(&MONTH)                   
              RTVSYSVAL  SYSVAL(QDAY) RTNVAR(&DAY)                      
              RTVSYSVAL  SYSVAL(QTIME) RTNVAR(&TIME)                    
              CHGVAR     VAR(&TIMESTAMP) VALUE(&CENT *CAT &YEAR *CAT +  
                           &MONTH *CAT &DAY *CAT &TIME)                 
                                                                        
              SNDPGMMSG  MSGID(CPF9898) MSGF(QCPFMSG)  +                
                     MSGDTA('Performing Update')                         
              CHGVAR     VAR(&ERROROUT) VALUE('1')                      
              CALL       PGM(PGM001) PARM(&ERROROUT &LEVEL &ORG +   
                           &PARTY &PRCDATY &PRCDATM &PRCDATD &TIMESTAMP)

 




 

 







User Comments:



Subscribe

.  


Copyright © www.go4as400.com, 2013-2023. Copyright notice   Terms of services   Privacy policy