Sponsored Content
Top Forums Shell Programming and Scripting Assigning return value of an embedded SQL in a shell script variable Post 302447729 by Scott on Tuesday 24th of August 2010 05:39:00 AM
Old 08-24-2010
Hi.

You have thrown the output away (to /dev/null), and one or two more sets wouldn'g go amiss:

Change:
Code:
typeset -i sql_ret_val1=`sqlplus -s ${ORA_CONN_STR} <<EOF > /dev/null
SET HEADING OFF

To:
Code:
typeset -i sql_ret_val1=`sqlplus -s ${ORA_CONN_STR} <<EOF
SET HEADING OFF FEEDBACK OFF PAGESIZE 0



---------- Post updated at 11:39 AM ---------- Previous update was at 11:37 AM ----------

Ah. Didn't see your update Smilie
This User Gave Thanks to Scott For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Embedded SQL in AWK script

Hi All, Can I use AWK script to read data from Oracle table (some embedded SQL perhaps) The reason for this that I have a data file and I need to do some basic validations of the data in the file with some statistical figures related to the data file that I have stored in a Oracle table. Thanks... (2 Replies)
Discussion started by: 2nilotpal
2 Replies

2. Shell Programming and Scripting

return variable from PL/SQL procedure to shell

Hi i'm calling a pl/sql procedure which is returning one variable. i'm trying to assing this value to variable in shell script the code i wrote is ** in shell script** var= 'sqlplus user/pass @ret.sql' echo $var ** and variable dum_var number exec rt_test(:DUM_VAR); exit; in... (4 Replies)
Discussion started by: ap_gore79
4 Replies

3. Shell Programming and Scripting

Bourne shell script with embedded Sybase SQL

Hi, I need a simple (as possible) Bourne shell script that takes an input file of adminID's and spits out a list of adminID's and related tradeID's. Both adminID and tradeID are columns in a Sybase database table called "trades", in which they have a one-to-one relationship. adminID is a... (3 Replies)
Discussion started by: chatieremerrill
3 Replies

4. Shell Programming and Scripting

Shell script to catch PL/SQL return values

Hello, I need some help from the experts on PL/SQL and Shell scripting. I need a shell script that runs a PL/SQL procedure and gets the values returned from the PL/SQL procedure into the shell variables. The PL/SQL procedure returns multiple values. I was able to assign a single return value... (1 Reply)
Discussion started by: Veera_Raghav
1 Replies

5. Shell Programming and Scripting

Need to return fail or pass from shell script on the basis of pl/sql code execution

Hi guys, I am quite new in shell scripting. I am tring to promote some oracle jobs into control-M. In control-M, I am calling a script which establishes a connection with database and execute some procedures. Now I want if that PL/sql Block got failed script should return failure to... (2 Replies)
Discussion started by: alok1301
2 Replies

6. Shell Programming and Scripting

Assigning value of SQL output to a variable in shell scripting

I am trying to assgn the output of the select statement to a variable, like this "VARIABLE_NAME=$ db2 "select COLUMN_NAME_1 from TABLE_NAME where COLUMN_NAME_2='VALUE_TO_CHECK'"; " but the value that is getting into VARIABLE_NAME is "COLUMN_NAME_1 ----------------- VALUE 1... (3 Replies)
Discussion started by: sgmini
3 Replies

7. Shell Programming and Scripting

Shell script to catch PL/SQL return values

I tried searching the forum for similar posts but its closed now. Would appreciate any help on this. I am trying to capture return value from a select query into a variable. DB is Oracle I am able to spool it to a file but I donot intend to use it. Here is my script that does not work ;) I... (27 Replies)
Discussion started by: monie2717
27 Replies

8. UNIX for Advanced & Expert Users

Call parallel sql scripts from shell and return status when both sql are done

Hi Experts: I have a shell script that's kicked off by cron. Inside this shell script, I need to kick off two or more oracle sql scripts to process different groups of tables. And when both sql scripts are done, I will continue in the shell script to do other things like checking processing... (3 Replies)
Discussion started by: huasheng8
3 Replies

9. Shell Programming and Scripting

Return value to shell script, depending on status of pl/sql udpate

Hi All, I need to return value to the main shell script, depending on whether the UPDATE command in the embedded pl/sql is successfu or not. #!bin/ksh updateStatus=`sqlplus --conn details-- << EOF DECLARE var_rows NUMBER; BEGIN update table_name set column_name =... (7 Replies)
Discussion started by: rituparna_gupta
7 Replies

10. Solaris

Assigning an expression to a variable in shell script

i am trying to assign the following expression to a variable in Unix shell script and want to use that variable in some other expression. But unable to get the required thing done. Please help with this.... This is the expression which i want to provide as input the variable date '+%y:%m:%d' |... (3 Replies)
Discussion started by: ssk250
3 Replies
GFTODVI(1)						      General Commands Manual							GFTODVI(1)

NAME
gftodvi - make proof sheets from generic font files SYNOPSIS
gftodvi [-overflow-label-offset=real] [-verbose] gf_file_name DESCRIPTION
This manual page is not meant to be exhaustive. The complete documentation for this version of TeX can be found in the info file or manual Web2C: A TeX implementation. The gftodvi program converts a generic font (gf) file output by, for example, mf(1), to a device independent (DVI) file (that can then be typeset using the same software that has already been written for TeX). The characters in the gf file will appear one per page, with labels, titles, and annotations as specified in Appendix H (Hardcopy Proofs) of The Metafontbook. gftodvi uses other fonts in addition to the main gf file. A `gray' font is used to typeset the pixels that actually make up the character. (We wouldn't want all the pixels to be simply black, since then labels, key points, and other information would be lost.) A `title' font is used for the information at the top of the page. A `label' font is used for the labels on key points of the figure. A `slant' font is used to typeset diagonal lines, which otherwise have to be simulated using horizontal and vertical rules. The default gray, title, and label fonts are gray, cmr8, and cmtt10, respectively; there is no default slant font. To change the default fonts, you can give special commands in your Metafont source file, or you can change the fonts online. An online dia- log ensues if you end the gf_file_name with a `/'. For example, gftodvi cmr10.300gf/ Special font substitution: grayfont black OK; any more? grayfontarea /home/art/don/ OK; any more? slantfont /home/fonts/slantimagen6 OK; any more? <RET> will use /home/art/don/black as the `gray' font and /home/fonts/slantimagen6 as the `slant' font (this name indicates a font for lines with slope 1/6 at the resolution of an Imagen printer). The gf_file_name on the command line must be complete. Because the resolution is part of the extension, it would not make sense to append a default extension as is done with TeX or DVI-reading software. The output file name uses the same root as the gf file, with the .dvi extension added. For example, the input file cmr10.2602gf would become cmr10.dvi. OPTIONS
The argument to -overflow-label-offset specifies the distance from the right edge of the character bounding box at which the overflow equa- tions (if any) are typeset. The value is given in TeX points. The default is a little over two inches. Without the -verbose option, gftodvi operates silently. With it, a banner and progress report are printed on stdout. ENVIRONMENT
gftodvi looks for gf_file_name using the environment variable GFFONTS. If that is not set, it uses the variable TEXFONTS. If that is not set, it uses the system default. See tex(1) for the details of the searching. FILES
{gray.tfm,...} The default fonts. {gray.mf,...} The Metafont sources. SEE ALSO
tex(1), mf(1). Donald E. Knuth, The Metafontbook (Volume C of Computers and Typesetting), Addison-Wesley, 1986, ISBN 0-201-13445-4. Donald E. Knuth et al., Metafontware. AUTHORS
Donald E. Knuth wrote the program. It was published as part of the Metafontware technical report, available from the TeX Users Group. Paul Richards ported it to Unix. Web2C 2012 20 April 2007 GFTODVI(1)
All times are GMT -4. The time now is 05:11 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy