| |
 |
Hotline Question of the Month |
| by Sean Crawley |
|
| |
Question: I am creating a PDF report using the MRCRPTSND command. This report is built over several Summary files, so I've written a CL program to submit them all.
The CL first submits the Summaries using the MRCBCH command, and then I use the MRCRPTSND command to generate the report. However, when the MRCRPTSND finishes, the report is missing data.
After further examination of the job log, it shows that the batch program ends AFTER the report has been e-mailed.
Below is my CL program, what am I doing wrong?
PGM
MRCBCH BCHNUM(100) DCTLIB(MRCPRD) PROFILE(SEANC) +
JOBQ(BATCH5) JOBD(MRCJOBD) OUTQ(*RPT)
MRCRPTSND RPTNUM(1000) DCTLIB(MRCPRD) FORMAT(PDF) +
EMAILSBJ('REPORT BI-MONTHLY') +
EMAILADD(yyyyyy@mrc.com)
SAVESPLF(N) RECMP(N)
ENDPGM
|
Answer:
The problem is that the MRCBCH command submits a job to the JOBQ and the MRCRPTSND command runs online, interactively. So, yes, the MRCRPTSND command is running before the MRCBCH logic completes.
For this case, you need to submit the report in order to specify the JOBQ, so it doesn't run online.
SBMJOB CMD(MRCRPTSND...) JOBQ(BATCH5) JOBD(MRCJOBD).
This will submit a second job that runs immediately after your first MRCBCH job.
Have a hotline question of your own? Send an e-mail to support@mrc-productivity.com and let our product specialists help you!
|
|
|