Forums
FOCUS/WebFOCUS
How to email one of the empty reports on multiple tasks scheduled job.|
Go
![]() |
New
![]() |
Search
![]() |
Notify
![]() |
Tools
![]() |
Reply
![]() |
|
|
Gold member |
I have setup a scheduled job to send 4 separate reports to the users on a daily bases. Some days we will have all four empty reports. I like stop the job after the first task generates an empty report and send this one empty report to the users.
Will &&KILL_RPC kill the entire scheduled job or just kill the procedure? I can not find reference to this system variable. Thanks. Developer Studio 7.6.4 AS400 - V5R4 HTML |
||
|
|
Master |
What you need to do is create a pre execution procedure and the set &KILL_RPC. If the &KILL_RPC is Y then it will kill the rest of the execution. You can use a combination of dialog manager commands link &LINES to see if there is any data to report against or kill the job.
|
||||
|
|
Virtuoso |
Hua
in case you want to send all four users a report that only says something like "sorry, nothing to report today" You should NOT use the &KILL_RPC. This stops the RC process and only sends a message to the application manager that this process is killed. If you want that special report I would suggest this procedure. TABLE FILE XXXX PRINT AA BB CC BY USERCODE WHERE etc ON TABLE HOLD AS BASIC END -IF &RECORDS EQ 0 GOTO NOTHING -* now create the normal report based upon the holded data. TABLE FILE BASIC PRINT AA BB CC BY USERCODE END -GOTO THE_END -NOTHING DEFINE FILE CAR USERCODE/A10 WITH COUNTRY=DECODE COUNTRY(ITALY USER1 etc); END TABLE FILE CAR BY USERCODE NOPRINT HEADING "sorry, nothing to report today" END -THE_END I think this would work.....
|
|||||||
|
|
Virtuoso |
Hua?
did this work?
|
|||||||
|
|
Gold member |
Frank
I am truely very appreciated for you help. Thank you for following up on my problem. I think I understand what you suggested to do. I am using this tip in the focus point - ON TABLE SET EMPTYREPORT ANSI to generate an empty report automatically. There might be a misunderstand here. I am sending 4 separate xls files (by 4 separate procedures) to a list of users daily. I know if one is empty, all 4 are empty. Having all 4 procedures scheduled on the same job will always sends 4 attachments (empty or not) to the users. So I wish to send only one to the users if they are empty. I am slowly digesting the info on pre-processing proceudure, and looks like it is controlled at task level indpendingly. I am also concern what you said on Mark's post, that not able to tell the explicit kill from other causes of failure. I haven't make any move yet. Users are recieving 4 reports regardless. Maybe they will get use to it. Or Mark's request could be my alternative - not sending any at all when they are empty. Hua Developer Studio 7.6.4 AS400 - V5R4 HTML |
|||
|
| Previous Topic | Next Topic | powered by eve community |
| Please Wait. Your request is being processed... |
|
Forums
FOCUS/WebFOCUS
How to email one of the empty reports on multiple tasks scheduled job.
