Before Write a Proc do the below Steps:
- Create and save the query and form
- Enter: RESET PROC
The PROC panel displays.
/* This procedure checks to see what day it is.
If it’s Monday, it runs a query and prints a report.
If it isn’t, a message is displayed informing the user.*/
signal on error
if date(‘w’) = ‘Monday’
“RUN QUERY MYQUERY (FORM = MYFORM”
MONDAY report has been created and sent to printer.'”
“MESSAGE (TEXT=’Sorry, it is not Monday. Report cannot be created.'”
exit 0 /Exit without errors */
“MESSAGE (TEXT = ‘”dsq_message_text”‘”
exit 8 /Exit with error condition*/
*** END ***