IB - Developer Center    Forums  Hop To Forum Categories  FOCUS/WebFOCUS    How to email one of the empty reports on multiple tasks scheduled job.
Go
New
Search
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
Hua
Gold member
Posted
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
 
Posts: 55 | Location: Winnipeg,MB | Registered: May 12, 2008Reply With QuoteEdit or Delete MessageReport This Post
Master
Posted Hide Post
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.


 
Posts: 610 | Location: Dallas, Texas | Registered: May 24, 2004Reply With QuoteEdit or Delete MessageReport This Post
Virtuoso
Posted Hide Post
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.....




Frank

prod: WF 7.6.5 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.5 on the same platform and databases,IE7

 
Posts: 1631 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Reply With QuoteEdit or Delete MessageReport This Post
Virtuoso
Posted Hide Post
Hua?

did this work?




Frank

prod: WF 7.6.5 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.5 on the same platform and databases,IE7

 
Posts: 1631 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Reply With QuoteEdit or Delete MessageReport This Post
Hua
Gold member
Posted Hide Post
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
 
Posts: 55 | Location: Winnipeg,MB | Registered: May 12, 2008Reply With QuoteEdit or Delete MessageReport This Post
 Previous Topic | Next Topic powered by eve community  
 

IB - Developer Center    Forums  Hop To Forum Categories  FOCUS/WebFOCUS    How to email one of the empty reports on multiple tasks scheduled job.

Copyright © 1996-2008 Information Builders, leaders in enterprise business intelligence.