NAME
getval - get values from USP line or trace headers
SYNOPSIS
getval [ -Nntap ] [ -Ootap ] [ -Llnkey ] [ -Ttrkey ] [
-nsnstr ] [ -nenetr ] [ -rsnrst ] [ -renred ] [ -? ]
DESCRIPTION
getval retrieves values from the line header or the trace
headers (or both) of a USP dataset and writes these values
to stdout. If desired, this output data may be commented.
Otherwise it is output in a "raw" format. This program may
be embedded in script files to extract values from the
headers and either calculate new values required by the pro-
cessing flow or make decisions based on these values.
Another useful aspect of getval is the retrieval of info
pertaining to 3-D data into a file which may be then be used
for graphing this information.
getval gets both its data and its parameters from command
line arguments. These arguments specify the input, header
keys, the start and end traces and records.
Command line arguments
-N ntap
Enter the input data set name or file immediately after
typing -N unless the input is from a pipe in which case
the -N entry must be omitted. This input file should
include the complete path name if the file resides in a
different directory. Example -N/b/vsp/dummy tells the
program to look for file 'dummy' in directory '/b/vsp'.
-O otap
Enter the output file name immediately after typing -O
unless the output is to gto stdout in which case the -O
entry may be omitted.
-L lnkey
Enter the line header key for the value desired (see
scan documentation for the full list of keys)
-T trkey
Enter the trace header key for the value desired (see
scan documentation for the full list of keys). Note:
multiple -L and -T values may be specified for each run
of getval
-ns nstr
Enter the start trace number. The default is the first
trace of the record.
-ne netr
Enter the end trace number. The default is the last
trace of the record.
-rs nrst
Enter start record number. Default value is the first
record.
-re nred
Enter end record number. Default value is last record.
-V The command line argument '-V' may be specified to add
comments to the output denoting each column of
requested data.
-? Enter the command line argument '-?' to get online
help. The program terminates after the help screen is
printed.
Example of Use in a Script
#! /bin/sh
# This is a script to test program getval
# The aim of this is to be able to extract line or trace
# header values from input data and use these values
# inside a script
# The test data set is a single shot record called rec122
# Example 1: extract sample interval;
# calculate nyquist frequency
nsi=`getval -Nrec122 -LSmpInt`
fnyq=`expr 500 / $nsi`
echo "Sample Interval= "$nsi" Nyquist Frequency= "$fnyq
BUGS
Absolutely none, of course.
SEE ALSO
scan
AUTHOR
P. R. Gutowski, OBU/ATTC, pgutowski@amoco.com
Joe M. Wade, ATTC, jwade@amoco.com
COPYRIGHT
copyright 2001, Amoco Production Company
All Rights Reserved
an affiliate of BP America Inc.
Man(1) output converted with
man2html