02-09-2009
Setting variable for query using iSql / Korn Shell
Hi All-
First time using iSql.
I have 4 query files - some have more than 1 line of sql statements
After a bit of research it appears I can just use the -i command and specify the input file.
Questions:
- Does it matter that there are multiple queries in each file? Do I need to have special formatting within the files to ensure everything processes correctly?
- Is there any way to pass in variables for the query statements?
Thanks!
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Guys,
Need help. I am using ISQL inside a shell script.
Is there a way to set the value of shell script variable from inside the ISQL code. I do not want to write the results from the SQL to an output file.
Please let me know.
Regards,
Tipsy. (3 Replies)
Discussion started by: tipsy
3 Replies
2. Shell Programming and Scripting
in a text " Korn Shell Unix programming Manual 3° Edition"
i have found this sintax to declare a compoud variable:
variable=(
fild1
fild1
)
but this sintax in ksh and sh (HP-UNIX) not work...
why?? exist another solution for this type of variable ??? (5 Replies)
Discussion started by: ZINGARO
5 Replies
3. Shell Programming and Scripting
Dear all
I want to execute some isql command from unix shell script. Kindly suggest me. isql command mention below.
isql -U -P
use gdb_1
go
select count (*) from table_x
go (3 Replies)
Discussion started by: jaydeep_sadaria
3 Replies
4. UNIX for Dummies Questions & Answers
Hi all,
I have two accounts in a Unix server, the first one uses .tcsh as default shell and the other uses .ksh (korn shell) as default.
When I login using the account with .tcsh default, I can use the isql command and connect to our database server. However, when I use the other... (2 Replies)
Discussion started by: risk_sly
2 Replies
5. Shell Programming and Scripting
Hi
i want write a script for list of sysbase are having access or open.
then i wrote like:
USER="abc"
PASS="xyz"
SERVER="SCCS"
DB="blue"
WORK_DIR="/usr/home/ramakrishna"
set -x
isql -U${USER} -P${PASS} -S${SERVER}<<EOF>$WORK_DIR/output.log
go
use blue (database name)
go
use... (0 Replies)
Discussion started by: koti_rama
0 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I wonder can you help me ... I have the following clearcase code that works on the command line:
ct mkattr -replace Four_Legs '"cat dog"' lbtype:Animal
however when i try to use it in my script it fails with the following error message:
+ ct mkattr -replace Four_Legs "cat dog"... (5 Replies)
Discussion started by: thegant
5 Replies
7. Shell Programming and Scripting
isql
select count(*) from Table
eof
How to assign record count output of isql query to a shell variable ? (4 Replies)
Discussion started by: vikram3.r
4 Replies
8. Programming
Hi
I have the following block of code in korn shell and don't now how to refer to variable `print variable1.$dvd` ?
---
integer dvd=4
integer number=0
while (( dvd!=0 ))
do
print "Iteracja numer : $dvd"
print "$_" #it refers to $dvd var but want to refer... (3 Replies)
Discussion started by: presul
3 Replies
9. UNIX for Dummies Questions & Answers
Hi ,
I want to use shell variable in isql.
example..
$ksh ./sudh.ksh "2041qwer"
sudh.ksh is my script passing the perameter "2041qwer"
Code in my script :
===========
$SYBASE/$SYBASE_OCS/bin/isql -I$SYBASE/interfaces -S$OTHRSRVR -U$SYBUSER -P$SYBPASS -w... (1 Reply)
Discussion started by: sudhakarpasala
1 Replies
10. Shell Programming and Scripting
Hello,
I have a shell script where I am doing an isql to select some records. the result i get from the select statement is directed to an output file. I want to assign the result to a Shell variable so that I can use the retrieved in another routine.
e.g.
"isql -U${USER} -P${PASSWD} -S${SERVER}... (1 Reply)
Discussion started by: RookieDev
1 Replies
LEARN ABOUT HPUX
packingrules
packingrules(4) Kernel Interfaces Manual packingrules(4)
NAME
packingrules - packing rules file for cachefs
DESCRIPTION
is a packing rules file for packingrules contains a list of directories and files that are to be packed. It also contains a list of direc-
tories and files that are to be specifically excluded from packing. See cachefspack(1M).
Many users choose to manually create the packing rules file and edit it by hand. Users can edit the packingrules (using any editor) to
permanently change the packingrules file, or to gain access to more powerful options that are not available from the command line (such as
the command). It is much easier to enter complex wildcard expressions by editing the packingrules file.
Following is a description of the lines in a packing rules file. Blank lines and lines that begin with a pound sign are ignored. Lines
can be continued by placing a backslash () immediately before the newline character. All other lines in the packingrules file have one
of the following formats:
This line identifies a directory (or pair of directories)
under which files should be packed. At least one directory name must be specified. The arguments must be fully qualified
path names and may include environment variables.
This line enumerates a list of files and subdirectories
beneath the current directory to be packed. This specification is recursive. That is, specifying the name of a directory
automatically includes all files and subdirectories it contains.
This line enumerates a list of files that are not to be packed.
Regular expressions are permitted.
There are important differences between the arguments to the and the statements. The arguments to statements can contain slashes and are
interpreted as file names relative to the directories. The arguments to statements are simpler names or expressions that cannot contain
slashes. An statement will not override a LIST statement. statements only exclude files that are found beneath listed directories.
If the first name argument to a or an statement begins with an exclamation point the remainder of the statement will be executed as a com-
mand that will be run in the current directory. The output of the command will be treated as a list of newline separated file names to be
packed command) or to be excluded from the packing list command). For the command, the resulting file names will be interpreted relative
to the enclosing directory.
Blanks can be embedded in an argument by escaping them with a backslash () or enclosing the argument in double quotes (` " '). Double
quotes can be passed in arguments by escaping the double quotes with a backslash ().
lines only apply to the statement that precedes them. lines can appear before any statement (in which case they apply to all or after a
statement (in which case they only apply to the that precedes them). Any number of these statements can occur in any combinations. The
order is not important.
EXAMPLES
The use of these statements is illustrated in the following packing rules file.
#
# Ignore junk files.
#
IGNORE core *.o *.bak *%
#
# Pack everything in the work subdirectory and in a few
# favorite mailboxes.
#
BASE /net/bigserver/export/home/myname
LIST work
LIST m/incoming
LIST m/action
LIST m/pending
#
# Pack two important project directories but skip
# all postscript output.
#
BASE /net/bigserver/export/projects $HOME/projects
LIST poindexter epiphany
IGNORE *.ps
#
# Pack the foonly package.
#
BASE /net/bigserver/opt/foonly /opt/foonly
LIST !cat .packinglist
#
# Also pack the latest executables for the standard
# build environment.
#
BASE /net/bigserver/export/buildenv $HOME/buildenv
LIST !find . -type f -a -perm -111 -a -print
AUTHOR
was developed by Sun Microsystems, Inc.
SEE ALSO
cachefspack(1M).
packingrules(4)