473,778 Members | 1,804 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

sqlplus exit statement prematurely terminates unix script

3 New Member
echo ""
echo "Enter person ID:"
read person_id
sqlplus -silent '/nolog'<<end_sql 1
connect useract/passwd
start $BANNER_LINKS/gurlsid.sql
$person_id
FAISMGR
end_sql1
cat person.lst >person_list
sqlplus -silent '/nolog'<<end_sql 2
connect useract/passwd
start $BANNER_LINKS/gurlsid.sql
$person_id
FIMSMGR
end_sql2
cat person.lst >>person_list
sqlplus -silent '/nolog'<<end_sql 2b
connect useract/passwd
spool person
set feedback off
column "Table Name" format a12
column "Column Name" format a30
column "Count" format 9999
column "Condition" format a32
select 'FOBTEXT' "Table Name",
'FOBTEXT_CODE' "Column Name",
count(fobtext_c ode) "Count",
'WHERE FOBTEXT_DTYP_SE Q_NUM = 73' "CONDITION"
from fobtext
where fobtext_code = '$person_id'
and fobtext_dtyp_se q_num = 73
having count(fobtext_c ode) > 0;
spool off
exit
end_sql2b
#--------------------------
cat person.lst >>person_list
echo ""
echo "finish my program"

*******
the last three statements did not execute at all. The last file(person.lst ) has something, but it didn't append to person_list. Also the last two echo didn't display on the screen either. I think somehow when exiting from sqlplus, it just exited out of the script completely.

Can someone indicate why the last three statements of this script did not carry out?

Thanks,
Trang
Sep 27 '06 #1
0 1682

Sign in to post your reply or Sign up for a free account.

Similar topics

1
20204
by: Rick | last post by:
I am installing Oracle 9i client runtime on AIX 5.1-003. The installation completes successfully, but neither the Net Configuration Assistant or SQLPLUS will run. I get the following error when trying to run netca: Error loading native library: libnjni9.so. java.lang.UnsatisfiedLinkError: jniGetOracleHome at oracle.net.common.NetGetEnv.getOracleHome(NetGetEnv.java) at oracle.net.ca.CmdlineArgs.setOraArgs(CmdlineArgs.java)
2
17111
by: Vincento Harris | last post by:
Oracle 8.1.7.4 on Hp Unix 11i I am attempting to pass unix parameters on to sql plus I did read on technet that with 9i it is very straightforward Example script name whoisit Pass sid 23 whoisit 23 returns
4
44058
by: tommy | last post by:
I'm running sqlplus from a DOS command line and inducing an error by purposly giving it the wrong script (hence, it cannot find the script file.) What it is doing is exiting to the SQL> prompt as show below. What I NEED it to do is exit to the DOS prompt. c:\>sqlplus someuser/mypass@mydb NonExistantCommandFile.sql SQL> Does someone know how this can be done or have a commandline switch reference that might have the answer?
2
5750
by: Matt | last post by:
I'm new to Java but experienced with PL/SQL. I've found what appears to be strange behaviour (a bug?) when attempting to create java stored objects using the UNIX version of Oracle SQL*PLUS 8.1.7.3.0 with JServer 8.1.7.3.0. The reason it seams strange is that the problem only occurs with the UNIX version of SQL*PLUS, not the PC client version running on Windows 2000 but connected to the same database and schema. Can anyone shed any light...
1
22765
by: Krusty276 | last post by:
I'm getting this error using sql plus Input is too long (> 2499 characters) - line ignored This is my command line on linux: /home/oracle/product/8.1.6/bin/sqlplus -s loader/loader@ecrmdb @/mp3/generated/listpullmon/sql/5485_de.sql And I set line size in the file: set pagesize 0
2
14893
by: Zvika Glickman | last post by:
I have a script a.ksh as follow: <orasp> cat a.ksh sqlplus -s rsi/rsi < aaa1.sql echo stat $? <orasp> text of aaa1.sql: exec dbms_stats.gather_table_stats
13
11249
by: PeterZ | last post by:
Hi, Back to basics! My understanding is that the only way to exit a For-Next loop prematurely is with the 'break' keyword. How are you supposed to do that if you're inside a Switch statement? The break keyword will only come out of the switch, not the for-next loop.
19
11504
by: ern | last post by:
Right now I'm using exit(0) to terminate my program. My program is a console .exe application. After the "exit(0)" line of code is encountered, the console application waits for an enter press, before terminating. I want it to terminate completely without having to press enter manually. Anybody know what I might be missing here ?
3
9665
by: tngoe | last post by:
#!/bin/ksh echo "" echo "Enter person ID:" read person_id sqlplus -silent '/nolog'<<end_sql1 connect useract/passwd start $BANNER_LINKS/gurlsid.sql $person_id FAISMGR end_sql1
9
11580
by: titanandrews | last post by:
Hi All, Is there any way to catch the exit code from someone calling exit(status) and check the value before the program terminates? Just for an idea, the code I'm thinking of is something like this: void exithandler() { DWORD exitCode = 0;
0
9628
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9464
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10292
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10122
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9923
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8954
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6722
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5497
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2860
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.