September 18, 2008, 02:15 AM
FrankDutchHua
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.....
September 19, 2008, 02:37 PM
FrankDutchHua?
did this work?
September 19, 2008, 04:08 PM
HuaFrank
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