Focal Point
[Solved - Finally]&&KILL_RPC not working

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/5277064076

May 04, 2014, 04:45 PM
JOE
[Solved - Finally]&&KILL_RPC not working
I have error notifications set up on my Report Caster reports to alert of any errors. I applied this piece of code I found on the documentation to stop notification emails to be sent when report has 0 records:

 

ENDSTYLE
END
-SET &&KILL_RPC = IF &RECORDS = 0 THEN 'Y' ELSE 'N';
-SET &&KILL_RPC_ERR = 'N';
 


Usually this report should not have any records but is used for checking dup logids. Records will appear when they occur. Not sure why I am receiving the notification emails when I followed the reference on the documentation? Any help would be appreciated.

Thanks!

This message has been edited. Last edited by: JOE,


WebFocus 7.7.02 WinXP
May 05, 2014, 02:45 AM
MichaelBalle
May be its the difference between "printed" and "retrieved":

&RECORDS Is the number of records retrieved in last answer set.
&LINES Is the number of lines printed in last answer set.

TABLE FILE CAR
SUM
DEALER_COST
RETAIL_COST
BY COUNTRY
ON TABLE HOLD AS MYHOLD2
END
-RUN

-TYPE number of records: >&RECORDS<
-TYPE number of lines: >&LINES<


WebFOCUS 7.6, 7.7
Windows, All Output formats
May 05, 2014, 05:09 AM
j.gross
quote:
...
END
-SET &&KILL_RPC = IF &RECORDS = 0 THEN 'Y' ELSE 'N';
...


Make that
...
END
-RUN
-SET &&KILL_RPC = IF &RECORDS EQ 0 THEN 'Y' ELSE 'N';
...
May 05, 2014, 06:05 AM
SWES
JOE,

Please have a look at my previous post on this forum:

Post

Maybe it will help you forward.

SWES


WebFOCUS 8105m
Windows 7, All Outputs

Member of the Benelux Usergroup
May 05, 2014, 12:29 PM
JOE
Thanks for the repies. I tried J Gross's suggestion but still receiving the notification email? Just not sure why this is happening?


WebFocus 7.7.02 WinXP
May 09, 2014, 07:42 AM
JRLewis
I believe you need to use a pre-processing step to set &&KILL_RPC in order for it to work the way you want.

I have included a link to an article that describes &&KILL_RPC in more detail.

Note that a pre-processing step must reside on the reporting server (i.e. not MRE).

https://www.informationbuilder...elopers/reportcaster


WebFOCUS 8
May 14, 2014, 02:30 PM
JOE
Thanks JR, but I did what your link stated to do with the ERR = 'N'. Still getting report.


WebFocus 7.7.02 WinXP
May 14, 2014, 03:59 PM
susannah
but did you put all this in a pre-processing condition via the reportcaster tool?
only works that way, not in the report fex itself.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
May 19, 2014, 02:48 PM
JOE
Thanks Susannah..Do have instructions on how to do that? Is this something the administrator will have to do?

Thanks,


WebFocus 7.7.02 WinXP
May 20, 2014, 07:41 AM
JRLewis
A pre-processing step is simply a fex. In the pre-processing fex, you run your query and set the &&KILL_RPC and &&KILL_RPC_ERR flags as you have indicated based on the value of &RECORDS. This fex must reside on the reporting server.

In Reportcaster, when setting up your task, you can also identify the above fex as a pre-processing step.

I would recommend checking the documentation on Reportcaster on the IBI Tech Support site.


WebFOCUS 8
May 22, 2014, 09:04 AM
JOE
Thanks! I got it to work. For those who are having the same problem, you have to create a simple (separate) fex with those kill variables. While creating your report caster job, you have to go the advanced procedures button and than add your pre-processing fex to kill the job. I was adding the pre processing fex as task 1..A little confusing until I was poking around.


WebFocus 7.7.02 WinXP
May 22, 2014, 09:42 AM
susannah
I'm glad you got it to work; i am sorry not to have gotten back to you earlier, but i was locked in BobJ class for the last 3 days [somebody shoot me now, what an awful product!}




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
May 23, 2014, 09:19 AM
jgelona
Joe, one thing you need to be aware of is that the pre-processing fex is only for the task it is associated with. For example, if you have a Report Caster job with 2 tasks and associate the pre-processing fex with the first task and the first task is killed, the second task will try to run. If you want the remaining tasks killed as well, you have to attach the pre-processing fex to all remaining tasks.

I have a NFR in for a new variable, &&KILL_RPCJOB, that will kill the whole job. At some point I was told it would be in WebFOCUS 8, but as of 8.0.07, it is not there.


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.