cwolgamott
Programmer
Hello. I am creating a cl program to send a break message, pause for 5 minutes, end all jobs and then run a program. I was able to locate some code that is supposed to end jobs. However, when the code gets to this statement, it errors out:
CPYSPLF FILE(QPDSPSBJ) TOFILE(QGPL/QINTERJOBS) +
JOB(&JOBNUMBER/&USER/&JOBNAME) SPLNBR(*LAST)
It gives me the following error: File QPDSPSBJ not found in job (and then lists the job number, user and job name).
Here is some of the code prior to the previous statement:
PGM
DCL VAR(&JOBNAME) TYPE(*CHAR) LEN(10)
DCL VAR(&USER) TYPE(*CHAR) LEN(10)
DCL VAR(&JOBNUMBER) TYPE(*CHAR) LEN(10)
WRKSBSJOB SBS(QINTER) USER(*ALL)
RTVJOBA JOB(&JOBNAME) USER(&USER) NBR(&JOBNUMBER)
CPYSPLF FILE(QPDSPSBJ) TOFILE(QGPL/QINTERJOBS) +
JOB(&JOBNUMBER/&USER/&JOBNAME) SPLNBR(*LAST)
CALL PGM(QGPL/ENDJOBS)
DLTSPLF FILE(QPDSPSBJ) JOB(&JOBNUMBER/&USER/&JOBNAME)
ENDPGM
It also runs a RPG program and another cl program to end the selected jobs. I would greatly appreciate any help or suggestions. Thank you.
CPYSPLF FILE(QPDSPSBJ) TOFILE(QGPL/QINTERJOBS) +
JOB(&JOBNUMBER/&USER/&JOBNAME) SPLNBR(*LAST)
It gives me the following error: File QPDSPSBJ not found in job (and then lists the job number, user and job name).
Here is some of the code prior to the previous statement:
PGM
DCL VAR(&JOBNAME) TYPE(*CHAR) LEN(10)
DCL VAR(&USER) TYPE(*CHAR) LEN(10)
DCL VAR(&JOBNUMBER) TYPE(*CHAR) LEN(10)
WRKSBSJOB SBS(QINTER) USER(*ALL)
RTVJOBA JOB(&JOBNAME) USER(&USER) NBR(&JOBNUMBER)
CPYSPLF FILE(QPDSPSBJ) TOFILE(QGPL/QINTERJOBS) +
JOB(&JOBNUMBER/&USER/&JOBNAME) SPLNBR(*LAST)
CALL PGM(QGPL/ENDJOBS)
DLTSPLF FILE(QPDSPSBJ) JOB(&JOBNUMBER/&USER/&JOBNAME)
ENDPGM
It also runs a RPG program and another cl program to end the selected jobs. I would greatly appreciate any help or suggestions. Thank you.