I am creating a program that retrieves the current date and job name using the RTVJOBA Command,retrieves the current time
using the RTVSYSVAL command, and send a message that says "clpgm was run on DATE and TIME with job name JN"
This is my first program and I am having a little trouble setting it up. I would appreciate some insight on how I might be going about this wrong. Here is what I have so far.
/* defines the variables used in the program */
DCL VAR(&DATE) TYPE(*CHAR) LEN(6)
DCL VAR(&TIME) TYPE(*CHAR) LEN(6)
DCL VAR(&JN) TYPE(*CHAR) LEN(2)
/* RETRIEVES THE CURRENT DATE AND JOB NAME */
/* RETRIEVES THE CURRENT TIME
RTVSYSVAL SYSVAL(QTIME) TRNVAR(&TIME)
/* SENDS MESSAGE CONTAINING THE TIME, DATEM AND JOB NAME */
SNDUSRMSG MSG('CLPGM WAS RUN ON ' *CAT &DATE +
' AT ' *CAT &TIME ' WITH JOB NAME. ' *CAT &JN)
I know this isnt correct, I appreciate your help!