08-18-2017
If I take procedure code and execute on Toad, procedure is getting created successfully with no errors. I want this (to create procedure) through Unix.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
i'm calling a pl/sql procedure which is returning one variable.
i'm trying to assing this value to variable in shell script
the code i wrote is
** in shell script**
var= 'sqlplus user/pass @ret.sql'
echo $var
**
and
variable dum_var number
exec rt_test(:DUM_VAR);
exit;
in... (4 Replies)
Discussion started by: ap_gore79
4 Replies
2. UNIX for Advanced & Expert Users
Hi All
I would be thankful to you all if you will guide me the steps to call a stored proc. from unix shell script. that stored proc. could be parameterised or parameterless developed in SQL.
Any info. in this topic would help me.....
Thanks in advance.... (1 Reply)
Discussion started by: varungupta
1 Replies
3. UNIX for Dummies Questions & Answers
All,
I have a 10g PL/SQL procedure that needs to be run via a unix script. How could such a script be developed.
Thanks
Aditya. (1 Reply)
Discussion started by: kingofprussia
1 Replies
4. Shell Programming and Scripting
Hi
I have a stored procedure which should be called from KSH.
Could ayone please help me with this.
Thanks (1 Reply)
Discussion started by: BlAhEr
1 Replies
5. Shell Programming and Scripting
Hi,
How can i compile the procedure code that is there in a script file (.sql) in unix. (0 Replies)
Discussion started by: krishna_gnv
0 Replies
6. Programming
Hi,
Can anyone please let me know where to check if a particular stored procedure exists.
If the procedure exists I want to display some message and if the procedure does not exists i want to exit with error message.
checking from dba_objects doesnt help. suprisingly the procedure i... (3 Replies)
Discussion started by: justchill
3 Replies
7. Shell Programming and Scripting
How could I call an Oracle PL/SQL procedure from any shell (bash) and catch returning value from that procedure (out param) or get a returning value if it's a function.
also, I got into trouble when I tried to send a number as a param
#!/bin/bash -e
username=$1
pwd=$2
baza=$3... (0 Replies)
Discussion started by: bongo
0 Replies
8. Programming
Hi,
Can any one help me how to write a sql procedure in a pro *c file for selecting the data from a database and inserting the rows into a queue in a .pc file.
thanx in advance. (1 Reply)
Discussion started by: jhon1257
1 Replies
9. Programming
Hello, I need some advice how to to create one big transactional table.
My table has following columns
person_id, trans_id, date, dep_id, material_id, input, outpu, total
I created procedure from which I will enter all transaction into that table. Problem is I don't have any idea how... (3 Replies)
Discussion started by: solaris_user
3 Replies
10. UNIX for Dummies Questions & Answers
Hello All,
I am writing the below unix script to email the result of a small pl sql procedure:
#!/bin/bash
ORACLE_HOME=/opt/oracle/orcts/product/9.2.0; export ORACLE_HOME
SQLPLUS=$ORACLE_HOME/bin/sqlplus
sqlplus -s user/pass@Db_instance<<EOF
set echo off
set feedback off
set pages 0... (9 Replies)
Discussion started by: Bunty bedi
9 Replies
LEARN ABOUT OPENDARWIN
proc
proc(n) Tcl Built-In Commands proc(n)
__________________________________________________________________________________________________________________________________________________
NAME
proc - Create a Tcl procedure
SYNOPSIS
proc name args body
_________________________________________________________________
DESCRIPTION
The proc command creates a new Tcl procedure named name, replacing any existing command or procedure there may have been by that name.
Whenever the new command is invoked, the contents of body will be executed by the Tcl interpreter. Normally, name is unqualified (does not
include the names of any containing namespaces), and the new procedure is created in the current namespace. If name includes any namespace
qualifiers, the procedure is created in the specified namespace. Args specifies the formal arguments to the procedure. It consists of a
list, possibly empty, each of whose elements specifies one argument. Each argument specifier is also a list with either one or two fields.
If there is only a single field in the specifier then it is the name of the argument; if there are two fields, then the first is the argu-
ment name and the second is its default value.
When name is invoked a local variable will be created for each of the formal arguments to the procedure; its value will be the value of
corresponding argument in the invoking command or the argument's default value. Arguments with default values need not be specified in a
procedure invocation. However, there must be enough actual arguments for all the formal arguments that don't have defaults, and there must
not be any extra actual arguments. There is one special case to permit procedures with variable numbers of arguments. If the last formal
argument has the name args, then a call to the procedure may contain more actual arguments than the procedure has formals. In this case,
all of the actual arguments starting at the one that would be assigned to args are combined into a list (as if the list command had been
used); this combined value is assigned to the local variable args.
When body is being executed, variable names normally refer to local variables, which are created automatically when referenced and deleted
when the procedure returns. One local variable is automatically created for each of the procedure's arguments. Global variables can only
be accessed by invoking the global command or the upvar command. Namespace variables can only be accessed by invoking the variable command
or the upvar command.
The proc command returns an empty string. When a procedure is invoked, the procedure's return value is the value specified in a return
command. If the procedure doesn't execute an explicit return, then its return value is the value of the last command executed in the pro-
cedure's body. If an error occurs while executing the procedure body, then the procedure-as-a-whole will return that same error.
SEE ALSO
info(n), unknown(n)
KEYWORDS
argument, procedure
Tcl proc(n)