10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I am running the below proc in unix by connecting through sqlplus and the procedure is completing successfully. But when i am trying to run through shell scripting by using function. I am getting the error as follows. Please guide me where I am going wrong.
#!/bin/sh
opera ()
{... (6 Replies)
Discussion started by: bhas85
6 Replies
2. Shell Programming and Scripting
Hi Gurus,
The following script fails with the error 'command not found' while trying to execute. As the error indicates, the script fails at ROW#30 where the EOF is defined for SQL statement.
It appears that the script is trying execute the lines in the SQL output written to ta spool file.... (7 Replies)
Discussion started by: svajhala
7 Replies
3. Shell Programming and Scripting
below code is not executing the stored procedure,not sure what the issue.Even sqllog is blank.please help me its very urgent.
sqlplus -s $connect_str@$DB_ORACLE_SID >> ${SQL_LOG_FILE} << EOF
set serverout on
set feed off
set head off
set pages 0
set colsep ,
set tab off
set lin 150... (3 Replies)
Discussion started by: katakamvivek
3 Replies
4. Shell Programming and Scripting
Hi,
I want to have a automted script to exceute 20 procedures one by one.
Suppose below is one procedure once it get executed script will write
"PL/SQL procedure successfully completed." to a log
for ex-
exec dbms_stats.gather_table_stats();
Now later procedure starts executing... (1 Reply)
Discussion started by: sv0081493
1 Replies
5. Shell Programming and Scripting
Hello,
I created a sql file to create a Procedure, and it was successfully created.
I created a sql file to execute the procedure, and it did without any errors, but i dont see the data been updated.
The Execute procedure.sql script is:
BEGIN
set serveroutput on size 1000000
execute... (5 Replies)
Discussion started by: msrahman
5 Replies
6. Linux
Hi,
I have following shell script code :
------------------------------------------------------------------
#!/bin/bash
SCRIPTS_DIR="/scriptsDir1"
# tables login/password
APIL_USER="uname/pswd"
I2_USER="uname/pswd"
# Database
DB="db1"
cd "$SCRIPTS_DIR/scriptsDir2"
sqlplus... (1 Reply)
Discussion started by: Chaitrali
1 Replies
7. Shell Programming and Scripting
Hi,
I have following shell script code :
------------------------------------------------------------------
#!/bin/bash
SCRIPTS_DIR="/scriptsDir1"
# tables login/password
APIL_USER="uname/pswd"
I2_USER="uname/pswd"
# Database
DB="db1"
cd "$SCRIPTS_DIR/scriptsDir2"
sqlplus... (2 Replies)
Discussion started by: Chaitrali
2 Replies
8. Shell Programming and Scripting
Hi Gurus,
I've a find command that gets the list of files from a source directory where the extension is not html, xml, jsp, shtml or htaccess. The below find command runs fine from the command prompt or in a shell script. I need to eventually run it in a PERL script and am getting the... (5 Replies)
Discussion started by: voorkey
5 Replies
9. Shell Programming and Scripting
Hi Guys,
I am trying to tun a oracle proedure throgh unix shell script but it is not running i dont know why ? i have tested this procedure in sqlplus and it was working fine.
can you see the script and sql file and let me know where is my mistake.
script:bm_chart_table_loading.sh
... (3 Replies)
Discussion started by: shary
3 Replies
10. Shell Programming and Scripting
Hi All,
When I am trying to execute the below shell script I got this error message.
script
==========
#!/bin/bash
/usr/java/jdk1.5.0_10/bin/java - classpath /var/lib/asterisk/agi-bin/mysql-connector-java-3.0.15-ga-bin.jar/:
/var/lib/asterisk/agi-bin/jarfiles:... (4 Replies)
Discussion started by: ajayyaduwanshi
4 Replies
uplevel(3tcl) Tcl Built-In Commands uplevel(3tcl)
__________________________________________________________________________________________________________________________________________________
NAME
uplevel - Execute a script in a different stack frame
SYNOPSIS
uplevel ?level? arg ?arg ...?
_________________________________________________________________
DESCRIPTION
All of the arg arguments are concatenated as if they had been passed to concat; the result is then evaluated in the variable context indi-
cated by level. Uplevel returns the result of that evaluation.
If level is an integer then it gives a distance (up the procedure calling stack) to move before executing the command. If level consists
of # followed by a number then the number gives an absolute level number. If level is omitted then it defaults to 1. Level cannot be
defaulted if the first command argument starts with a digit or #.
For example, suppose that procedure a was invoked from top-level, and that it called b, and that b called c. Suppose that c invokes the
uplevel command. If level is 1 or #2 or omitted, then the command will be executed in the variable context of b. If level is 2 or #1
then the command will be executed in the variable context of a. If level is 3 or #0 then the command will be executed at top-level (only
global variables will be visible).
The uplevel command causes the invoking procedure to disappear from the procedure calling stack while the command is being executed. In
the above example, suppose c invokes the command
uplevel 1 {set x 43; d}
where d is another Tcl procedure. The set command will modify the variable x in b's context, and d will execute at level 3, as if called
from b. If it in turn executes the command
uplevel {set x 42}
then the set command will modify the same variable x in b's context: the procedure c does not appear to be on the call stack when d is
executing. The info level command may be used to obtain the level of the current procedure.
Uplevel makes it possible to implement new control constructs as Tcl procedures (for example, uplevel could be used to implement the while
construct as a Tcl procedure).
The namespace eval and apply commands offer other ways (besides procedure calls) that the Tcl naming context can change. They add a call
frame to the stack to represent the namespace context. This means each namespace eval command counts as another call level for uplevel and
upvar commands. For example, info level 1 will return a list describing a command that is either the outermost procedure call or the out-
ermost namespace eval command. Also, uplevel #0 evaluates a script at top-level in the outermost namespace (the global namespace).
EXAMPLE
As stated above, the uplevel command is useful for creating new control constructs. This example shows how (without error handling) it can
be used to create a do command that is the counterpart of while except for always performing the test after running the loop body:
proc do {body while condition} {
if {$while ne "while"} {
error "required word missing"
}
set conditionCmd [list expr $condition]
while {1} {
uplevel 1 $body
if {![uplevel 1 $conditionCmd]} {
break
}
}
}
SEE ALSO
apply(3tcl), namespace(3tcl), upvar(3tcl)
KEYWORDS
context, level, namespace, stack frame, variables
Tcl uplevel(3tcl)