01-09-2007
Help Required: To run the attached UNIX script
Hi,
This Script contains update statements and running without error.
But the update result is not getting reflected in the database. i.e may be Script fails to connect to the database.
it would be of great help if you could figure out the problem.
Thanks,
Shruti
Script follows here:
///////////////////////
#!/usr/bin/ksh
echo "************************************************** ************************************************** ********";
echo Making a customer hold or Block
echo "************************************************** ************************************************** *******";
echo "Enter the product name, customer name and the functionality [HOLD(HD)/ BLOCK (BK)]:"
read prod_name;
read cust_name;
read block_hold;
echo $block_hold;
if [[ block_hold = "BK" ]]; then
echo "Block";
`sqlplus -s itm_odb/itm_odb<<EOF
update CUST_PROD_TBL set BLOCKED_STATUS = 'Y' where prod_id = (select prod_id from products_tbl where product_name ='$prod_name') and cust_id = (select cust_id from CUSTOMER_tbl where CUST_name ='$cust_name');
exit;
EOF
`
echo "Block update successfull";
fi
if [[ block_hold = "HD" ]];
then
echo "Hold";
`sqlplus -s itm_odb/itm_odb<<EOF
UPDATE customer_view SET site_id = 'XXX' WHERE site_id = '$cust_name';
exit;
EOF
`
echo "HOLD update successfull";
fi
exit;
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi All,
Please help me in writting the script
File contains:
=========
11424444, <basicpage>
jfalfksf
<dateofbirth>10/02/2005</dateofbrith>
jkaklgja
lg'd
....
11423224444, <basicpage>
jfalfksf
<dateofbirth>11/02/2005</dateofbrith>
jkaklgja
lg'd
11433523224444, <basicpage>... (1 Reply)
Discussion started by: thaduka
1 Replies
2. SCO
I try to send print spool on WINDOW XP Print server HP printer which generated in rmcobol on sco unix in following way to change the font, font style and font size but failed to succeed
Forexmple
in Cobol program I gives before the text which want to print in font style Bold
FILLER PIC... (0 Replies)
Discussion started by: muzammilalikhan
0 Replies
3. Programming
I try to send print on WINDOW XP Print server HP printer which generated in rmcobol on sco unix in following way to change the font, font style and font size but failed to succeed
Forexmple
in Cobol program I gives before the text which want to print in font style Bold
FILLER PIC X(5) `^ (2 Replies)
Discussion started by: muzammilalikhan
2 Replies
4. Shell Programming and Scripting
My data is something like shown below.
date1 date2 aaa bbbb ccccc
date3 date4 dddd eeeeeee ffffffffff ggggg hh
I want the output like this
date1date2 aaa eeeeee
I serached in the forum but didn't find the exact matching solution. Please help. (7 Replies)
Discussion started by: rdhanek
7 Replies
5. Shell Programming and Scripting
Howdy People :),
I'm a newbie & its my first question here. I've started learning Unix Bourne Shell scripting recently and struggling already :p Can someone PLEASE help me with the following problem. Somehow my script is not working.
Display an initial prompt of the form:
Welcome to... (1 Reply)
Discussion started by: methopoth
1 Replies
6. Shell Programming and Scripting
I have a file 123.txt which is
aasaasas=1
bsasasasasa=2
sawqas=3
I want my output to be
1
2
3
I am new to scripting can some1 help me out. (14 Replies)
Discussion started by: karthikkasarla
14 Replies
7. UNIX for Dummies Questions & Answers
How to find how many parameters are required to run a Perl script? (1 Reply)
Discussion started by: Lakshman_Gupta
1 Replies
8. Shell Programming and Scripting
Please share the doc asap as very urgently required. (1 Reply)
Discussion started by: 24ajay
1 Replies
9. Shell Programming and Scripting
Hi Friends,
I looking for the script for the count of the records in table.
and then it's containg the zero records then should get abort.
and should notify us through mail.
Can you please help me out in this area i am lacking. (5 Replies)
Discussion started by: victory
5 Replies
10. UNIX for Beginners Questions & Answers
Hello All,
I am new to unix scripting. I need to read FROMINSTANCE, FROMFIELD from below XML code and need to write a script for
insert into SQ_EPIC values( "DID", "PROJECT_NAME")
Select DID, PROJECT_NAME from EPIC<CONNECTOR TOINSTANCETYPE="Source Qualifier" TOINSTANCE="SQ_EPIC" TOFIELD="DID"... (7 Replies)
Discussion started by: sekhar.lsb
7 Replies
echo(3XCURSES) X/Open Curses Library Functions echo(3XCURSES)
NAME
echo, noecho - enable/disable terminal echo
SYNOPSIS
cc [ flag... ] file... -I /usr/xpg4/include -L /usr/xpg4/lib
-R /usr/xpg4/lib -lcurses [ library... ]
c89 [ flag... ] file... -lcurses [ library... ]
#include <curses.h>
int echo(void);
int noecho(void);
DESCRIPTION
The echo() function enables Echo mode for the current screen. The noecho() function disables Echo mode for the current screen. Initially,
curses software echo mode is enabled and hardware echo mode of the tty driver is disabled. The echo() and noecho() functions control soft-
ware echo only. Hardware echo must remain disabled for the duration of the application, else the behavior is undefined.
RETURN VALUES
Upon successful completion, these functions return OK. Otherwise, they return ERR.
ERRORS
No errors are defined.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
|MT-Level |Unsafe |
+-----------------------------+-----------------------------+
SEE ALSO
getch(3XCURSES), getstr(3XCURSES), initscr(3XCURSES), libcurses(3XCURSES), scanw(3XCURSES), attributes(5), standards(5)
SunOS 5.10 5 Jun 2002 echo(3XCURSES)