I am calling a procedure from shell script , my procedure has an out parameter which will return '2' at last in case of any error . My question is how do i capture this last returned value/row in the unix environment ? . i need to terminate my host program with exit 1 based on the return value "2". Any suggestions will helpful .
How to capture the last returned value from sql session in the unix script?
352 views Asked by user3152869 At
1
There are 1 answers
Related Questions in UNIX
- Reading & Writing to the same file from terminal
- `df` command not capturing entire output in perl
- Why is it that when I pass certain directory names to `ls`, sometimes it does not list their contents?
- Detect Mouse Clicks; Terminate Program on Scroll Wheel Movement
- grep expression behaving weird (unix/mac) while reading a conf file
- Unix sub path creation and copy files
- Ignoring folders in The Silver Searcher `ag`
- struct nameidata-Linux Kernel Module
- telegraf service not able to retrieve data using the journalctl commands
- Order of options in Unix sed for editing files in-place
- Trying to echo line variable along with another variable inside a while read loop
- failed to handshake with xxx: authentication error?
- UDP socket client not able to receive data
- Invalid SCA token in unix
- How can I keep randomized UNIX timestamp in specific hour range in SQL?
Related Questions in ORACLE-APPS
- Oracle Apps View: ALL_TAB_COLUMNS; columns: LOW_VALUE and HIGH_VALUE
- Display additional Column in the SQL query
- why oracle apps home page not showing submenus for responsibility in oracle apps after migration
- Getting a "UserID not exists" error when using jtf_rs_resource_pub.create_resource API to import an employee as a salesperson in Oracle EBS
- Oracle APPS R12- AP Invoice Struck in re-validation
- Call procedure of Oracle apps by C# not working
- Total sum not working inside the for-each-group tag in BI Publisher when using Group Left
- How can a PL/SQL procedure tell if it is being run from a concurrent program?
- Oracle Apex change Checksum Error to 404 Page Not Found
- Difference between custom and seeded tables in oracle apps
- Oracle Applications - Next Step Attribute
- joining hr_organization_information and mtl_parameters in Oracle apps
- Trying to set a field as mandatory on Oracle Applications R12
- How to resolve this ORA-01722: invalid number error in SQL *Loader based concurrent program?
- Profile creation and how user opt "yes" or "no"
Related Questions in ORACLE-APPLICATION-SERVER
- Weblogic application server goes in Overload state at 2 specific timings
- Is it possible to run Apex on other then database server?
- Oracle Application Server 10g
- Web Configuration, Security in Oracle APEX
- How to capture the last returned value from sql session in the unix script?
- Accounting Program Error
- How to configure Oracle HTTP server apache mod_proxy to proxy certain HTTPS requests to external (origin) server over HTTPS
- How to increase performance for HTTPS in Oracle Application Server?
- Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR
- Use Higher Version of Unzip in Oracle EBS
- Servlet initialization error after deployment on Oracle AS 10g
- launching wicket application in oracle application (10g) server
- oracle reports parameter width on application server
- Oracle Application Server 10 download link pls
- Oracle GRCC Tcg data type issue
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
You could directly assign the output value to a shell variable.
Or, alternarively, you can call the PL/SQL procedure in SQL*Plus and store the OUTPUT parameter's value in a local file. And then in your shell script,
grepthe required value from the file.For example,
So, the
out_variablewill have the output value of the procedure. Using backticks, will execute and assign the output from sqlplus to the shell variable.