.
 News & Views
  The online information source for iSeries and mrc-Productivity Series users
.  December 2004  
Volume 4, Issue 12  
.
. . . . . . . . .
 

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!





.
. Quick Links...

Visit mrc's Web site

See a live demo

Get more information

View Latest Newsletter

Last Month's Newsletter

.
.
.
.
. Contact mrc...

U.S. Offices
mrc@mrc-productivity.com

voice: 630-916-0662

www.mrc-productivity.com



U.K. Offices
michaels, ross & cole (UK) ltd

voice (UK): +44 (0)20 8282 1600

mail@mrcuk.com


.
 mrc publishes this newsletter on a monthly basis. Subscription is free of charge. Please send any questions or comments about this newsletter to news@mrc-productivity.com. This newsletter is edited by Heather Gately.

To unsubscribe, please just reply to this e-mail with Unsubscribe in the subject line.
View our privacy promise.

.