Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> How to stop the &1 prompt with no argument?

How to stop the &1 prompt with no argument?

From: John <john_at_nospam.com>
Date: Fri, 02 Nov 2001 20:38:21 +0000
Message-ID: <dk06utov7itcue5oaboegi0dhv3q9ddsjd@4ax.com>


I run a regular report from Oracle 7.3.4 running on the Vax O/S. Sometimes the report is delayed when the database is late so I wish to send an email to the customer when the report is ready. To do this, I add one parameter - but only when there is a late start, (this is all handled by DCL) :

SQL> @report DELAYED

This sends an email to alert the customer by executing the temp.com DCL command file.

Normally, it is on time so no parameter is supplied, but this always makes Oracle prompt for the missing parameter. How can I avoid the prompt when no parameter is supplied? The NVL() function does the same as decode. I can do a work around by always supplying a dummy parameter but this is not a good solution because it is never used. "$ set noon" is a "do nothing" Vax DCL command. Any suggestions much appreciated. John,
Bracknell, UK.

................................

set heading off
set verify off
-- normal report script here

spool temp.com
select decode(upper('&1'), 'DELAYED', '$ @sendemail.com', '$ set noon') from dual
/
spool off
host @temp.com
EXIT Received on Fri Nov 02 2001 - 14:38:21 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US