Selectively rename printer files based on some criteria. This is very useful when using spool file distribution packages such as Netmail 400, and running the same program every day, with a weekly distribution list on Wednesday, and a daily on the other days.
The regular override
OVRPRTF FILE(QPRINT) PAGESIZE(*N 196) CPI(13.3)OVRFLW(60) FONT(*CPI) OUTQ(&OUTQ)COPIES(©) HOLD(&HOLD4)
get the day of the week TAATOOL/RTVDAT DAYNAME&DAYOFWEEK)
IF COND(&DAYOFWEEK = 'Wednesday') THEN(DO)
DLTOVR QPRINT
OVRPRTF FILE(QPRINT) PAGESIZE(*N 196) CPI(13.3) OVRFLW(60) FONT(*CPI) OUTQ(&OUTQ) COPIES(©) HOLD(&HOLD4) SPLFNAME(LM0013_WK)
ENDDO
================================== MORE INFORMATION ON THIS TOPIC ==================================
The Best Web Links: tips, tutorials and more.
Ask your programming questions--or help out your peers by answering them--in our live discussion forums.
Ask the Experts yourself: Our application development gurus are waiting to answer your programming questions.
This was first published in January 2002