Problem solve Get help with specific problems with your technologies, process and projects.

DSPLOG QHST for a specific time

Alleviate the task of having to check the save operation on multiple machines.

The first thing I do in the morning is check my save operations that have been done the night before. I have to look at four machines, and I found it tedious to have to enter the previous date and time several times. So I wrote a little program that does it for me.

First I declare the values, then retreive the current date, change it to julian format, subtract 1 and change it back to normal format. After that, the DSPLOG CMD is run. It sure makes life easier for me.


/********************************************************************/ 
      PGM                                                               
      DCL VAR(&DATE) TYPE(*CHAR) LEN(6)                                 
      DCL VAR(&JULIAN) TYPE(*CHAR) LEN(5)                               
      DCL VAR(&JULIANC) TYPE(*DEC) LEN(6)                               
      DCL VAR(&JULIANA) TYPE(*DEC) LEN(6)                               
      RTVSYSVAL SYSVAL(QDATE) RTNVAR(&DATE)                             
      CVTDAT DATE(&DATE) TOVAR(&JULIAN) FROMFMT(*DMY) TOFMT(*JUL) -     
 TOSEP(*NONE)                                                           
      CHGVAR VAR(&JULIANA) VALUE(&JULIAN)                               
      CHGVAR VAR(&JULIANC) VALUE(&JULIANA -1)                           
      CHGVAR VAR(&JULIAN) VALUE(&JULIANC)                               
      CVTDAT DATE(&JULIAN) TOVAR(&DATE) FROMFMT(*JUL) TOFMT(*DMY) -     
 TOSEP(*NONE)                                                           
      DSPLOG PERIOD((220000 &DATE))                                     
      MONMSG MSGID(CPF0000)                                             
      ENDPGM                                                            
 ******************Datenende ******************************************* 

Dig Deeper on Performance

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataCenter

Close