08-19-2008
Grabbing a value from an output file
I am executing a stored proc and sending the results in a log file. I then want to grab one result from the output parameters (bolded below, 2) so that I can store it in a variable which will then be called in another script. There are more details that get printed in the beginning of the log file, but what you see below gets printed at the end of the log file. This matters mentioning it because the line number where this value will show up in will not always be the same, due to possible errors that may occur in the program. I know that there is a grep -n command which tells you what line that value is, but seeing as this will be an automated script, I won't be able to see what line it is everytime the script runs. Any ideas/comments/suggestions?
Quote:
.............
db2 => CALL STORED_PROC('1-2',?,?,?,?)
Value of output parameters
--------------------------
Parameter Name : PROC_MSG
Parameter Value : STORED_PROC completed successfully
Parameter Name : BATCHES_UPDATED
Parameter Value : 2
Parameter Name : START_TS
Parameter Value : 2008-08-19-12.42.05.192288
Parameter Name : END_TS
Parameter Value : 2008-08-19-12.42.05.193165
Return Status = 0
db2 => disconnect current
DB20000I The SQL DISCONNECT command completed successfully.
db2 => quit
DB20000I The QUIT command completed successfully.
Thanks!
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I'm new to this forum and am not exactly sure where to post this question, so I'll start here. I'm looking for a command or simple script that will read in a large flat file (contains 2005 data) and will output a new file based on a quarter. Within each row, position 87-90 is a julian... (2 Replies)
Discussion started by: bsp18974
2 Replies
2. Shell Programming and Scripting
how do I write a script to checkout a file in cvs and cat the file into a file in my home directory
Commands are
cd /home/smr/sandbox
cvsroot
choose option 1
cvs co filename
cat filename > /home/smr/newfilename
Thank you! (4 Replies)
Discussion started by: llsmr777
4 Replies
3. Shell Programming and Scripting
I can grab the first line w/ sed how do you grab the last line of a file? (2 Replies)
Discussion started by: xgringo
2 Replies
4. Shell Programming and Scripting
Quick question...I'm trying to grab the .tif file name from this output from our fax server. What is the best way i can do this in a bash script? I have been looking at regular expressions with bash or using awk but having some trouble. thanks! The only output i want is... (5 Replies)
Discussion started by: kuliksco
5 Replies
5. Shell Programming and Scripting
Hi all,
Very new to shell scripting so appreciate some help!
There is a process count that I need to monitor, I have the AIX command that gives this value and I've cleaned it up with grep/awk so it only spits out the value I'm interested in:
echo "psc -i 10050 -s RELOAD_SERVICE" | tmadmin... (14 Replies)
Discussion started by: monty77
14 Replies
6. Shell Programming and Scripting
I have a script right now that I run a command which outputs just one word to a file. Well I need to grab that value and use it in another line of code so...
touch oraclesid.txt
echo $ORACLE_SID > oraclesid.txt
#grab that value
sqlplus v500/v500@<value>
how do I grab that value from the... (6 Replies)
Discussion started by: Blogger11
6 Replies
7. Shell Programming and Scripting
Here is another script I am trying to customize currently,
this script is used to send me disk space information, but at the moment I have to enter all the servers in manually SERVER= "xxx bbb ccc" ect..
how can I script it so that the servers are called off a txt file versus me entering all... (1 Reply)
Discussion started by: NelsonC
1 Replies
8. Shell Programming and Scripting
Hi,
I have a Report.txt file. Say the contents of this file are :
1 2 3 4 5 7 df v g gf
e r dfkf lsdk dslsdklsdk
Report Start: xxxxxxdad
asdffsdfsdfsdfasfasdffasdf
sadfasdfsadffsfsdf Report End.
sdfasdfasdf
sdfasfdasdfasdfasdfasdf
sadfasdfsdf
I need to grab from Report Start... (3 Replies)
Discussion started by: mrskittles99
3 Replies
9. Shell Programming and Scripting
Hi There,
I have a Solaris server that has a bunch of zones configured and I am trying to write a script that will take all interfaces other than the loopback ones (e.g. lo0:3 etc) and present them so that I can easily determine the zone that owns the IP
So in the case of the following... (2 Replies)
Discussion started by: hcclnoodles
2 Replies
10. Shell Programming and Scripting
Hi ALL,
How can I make a script take data from a file and execute the commands within `` in the file n put that that in a variable?
for i in `cat file`
do
file=`grep -i key file`
cp ${file} test
done
file
/tmp/`date +y`log
/tmp/unix`date +y`log (1 Reply)
Discussion started by: 3junior
1 Replies
LEARN ABOUT XFREE86
glgethistogramparameter
GLGETHISTOGRAMPARAMETER(3G) GLGETHISTOGRAMPARAMETER(3G)
NAME
glGetHistogramParameterfv, glGetHistogramParameteriv - get histogram parameters
C SPECIFICATION
void glGetHistogramParameterfv( GLenum target,
GLenum pname,
GLfloat *params )
void glGetHistogramParameteriv( GLenum target,
GLenum pname,
GLint *params )
PARAMETERS
target Must be one of GL_HISTOGRAM or GL_PROXY_HISTOGRAM.
pname The name of the parameter to be retrieved. Must be one of GL_HISTOGRAM_WIDTH, GL_HISTOGRAM_FORMAT, GL_HISTOGRAM_RED_SIZE,
GL_HISTOGRAM_GREEN_SIZE, GL_HISTOGRAM_BLUE_SIZE, GL_HISTOGRAM_ALPHA_SIZE, GL_HISTOGRAM_LUMINANCE_SIZE, or GL_HISTOGRAM_SINK.
params Pointer to storage for the returned values.
DESCRIPTION
glGetHistogramParameter is used to query parameter values for the current histogram or for a proxy. The histogram state information may be
queried by calling glGetHistogramParameter with a target of GL_HISTOGRAM (to obtain information for the current histogram table) or
GL_PROXY_HISTOGRAM (to obtain information from the most recent proxy request) and one of the following values for the pname argument:
----------------------------------------------------------------
Parameter Description
----------------------------------------------------------------
GL_HISTOGRAM_WIDTH Histogram table width
GL_HISTOGRAM_FORMAT Internal
GL_HISTOGRAM_RED_SIZE Red component counter size, in bits
GL_HISTOGRAM_GREEN_SIZE Green component counter size, in bits
------------------------------------------------------------------------
Parameter Description
------------------------------------------------------------------------
GL_HISTOGRAM_BLUE_SIZE Blue component counter size, in bits
GL_HISTOGRAM_ALPHA_SIZE Alpha component counter size, in bits
GL_HISTOGRAM_LUMINANCE_SIZE Luminance component counter size, in bits
GL_HISTOGRAM_SINK Value of the sink parameter
------------------------------------------------------------------------
NOTES
glGetHistogramParameter is present only if GL_ARB_imaging is returned when glGetString is called with an argument of GL_EXTENSIONS.
ERRORS
GL_INVALID_ENUM is generated if target is not one of the allowable values.
GL_INVALID_ENUM is generated if pname is not one of the allowable values.
GL_INVALID_OPERATION is generated if glGetHistogramParameter is executed between the execution of glBegin and the corresponding execution
of glEnd.
SEE ALSO
glGetHistogram(3G), glHistogram(3G)
GLGETHISTOGRAMPARAMETER(3G)