procedure/function not found in .ksh

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting procedure/function not found in .ksh
# 8  
Old 11-03-2007

(a) produce a small script which does demonstrate the problem and post that without alteration, within [ CODE ] blocks so we can see it formatted.

(b) post the whole 600 line script
# 9  
Old 11-04-2007
It may help to put the functions into external files:

* create separate file for every function, named like the function and with filemode 644

* put all these files into a directory

* at the beginning of your main script set the variable "FPATH=" to the directory holding the functions. FPATH works similar to PATH, but tells the shell where it can find external functions instead of external executables. Export the variable FPATH after defining it

The files have to contain the same function definitions as if they would be included in the main scripts file for example, this would go into a file $FPATH/foo:

# first line of file foo
function foo
     # ... inside function foo ....

return <int>

This may not necessarily help in your specific case, but it might help in narrowing down the problem and finally find it.

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Command not found, but using function in bash

In the bash below, if the answer is "y" then goto function remove. If the answer is "n" then goto the id variable line (where the date is inputted). However, I am getting command remove not found, but remove is a function not an command. I must have the syntax incorrect? Thank you :). ... (3 Replies)
Discussion started by: cmccabe
3 Replies

2. UNIX for Dummies Questions & Answers

Function not found error

Hi All, I have written one shell script where I should call a function by passing variables to the actual function based on some condition. Each time I run the script I am getting the below error dsadm@bunyipd: /var/datastage/FRPDEVL/work/script> sh Iteration: 1... (1 Reply)
Discussion started by: tpk
1 Replies

3. Shell Programming and Scripting

ksh and Oracle stored procedure output in logfile

Friends, I pass some runtime arguments (date, number) through ksh script to Oracle procedure, use input value and pass it on to procedure. Oracle procedure gets input value, run query and logs everything in the logfile. I'm facing with couple of challenges 1. Even though I pass all... (5 Replies)
Discussion started by: homer4all
5 Replies

4. Shell Programming and Scripting

Calling Oracle stored procedure from ksh script

Friends, I'm newbie with ksh so wanting some help.... 1. I'm trying to call oracle stored procedure from ksh script by taking variable value from runtime, feed into script and execute procedure. 2. Put name1 and name2 value from script run replacing $3 & $4 I'm trying to put name1 in... (4 Replies)
Discussion started by: homer4all
4 Replies

5. Shell Programming and Scripting

Variable not found error for a variable which is returned from stored procedure

can anyone please help me with this: i have written a shell script and a stored procedure which has one OUT parameter. now i want to use that out parameter as an input to the unix script but i am getting an error as variable not found. below are the unix scripts and stored procedure... ... (4 Replies)
Discussion started by: swap21783
4 Replies

6. Shell Programming and Scripting

ksh:not found

Hi, i used to run oracle queries in unix and then transfer the result in to csv files. it was working fine for a month.but today it showed an error like ksh> not found. Can someone please help. Thanks. :wall: (4 Replies)
Discussion started by: varadharajan87
4 Replies

7. Shell Programming and Scripting

Read Table,View,Package,Function and Procedure Name in a File

Hi I am new to Unix shell scripting. But i need help to slove the below issue. Issue description: I want to read table, view names and package names in a file my plan to find the table name is : search "From" key word find the table or view To find the packge name : Search "Package... (5 Replies)
Discussion started by: sboss
5 Replies

8. Shell Programming and Scripting

Function not found message

I have shell script as below: #!/bin/ksh #set -xv function set_variable { VARIABLE_NAME=$1 CURRENT_PATH=`pwd` if ; then echo "\nconfiguration_file.lst file not found in $CURRENT_PATH/common/common_scripts" exit 1; fi VARIABLE_COUNT=`cat... (2 Replies)
Discussion started by: findprakash
2 Replies

9. Shell Programming and Scripting

function: not found error on solaris

shell script in very simple, #!/bin/sh function msgs { echo 'this' } msgs It works on linux, apple, but can not run on solaris. On solaris, when I enter "./", it gave me following error, ./ function: not found this ./ msgs: not found What's wrong with... (3 Replies)
Discussion started by: microstarwwx
3 Replies

10. Shell Programming and Scripting

calling a PL/SQL stored procedure from KSH

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
Login or Register to Ask a Question