fddx_in2 - open a DDS dataset for input, passing headers


SYNOPSIS

#include <fdds.h> (fixed-format sources)
#include <f90dds.h> (free-format sources)

integer function fddx_in2(alias, value, title)

character(*) alias
character(*) value
character(*) title

DESCRIPTION

Routine, "fddx_in2", opens an input dataset. All input headers are kept in their native format and are available to be passed on to any output; the "fdds_get" routines can be used to read the headers. The "Samples" will follow the headers in each trace and will be host-dependent complex if input is complex, otherwise they will be host-dependent float. Use "fddx_index" to get the offset index to the first data sample in each trace. The dataset is open with "r+" so that is can be modified.

After opening a file for input with "fddx_in2" the input buffer Dictionary will be left open for scanning. The open process will look for "alias" for the Dictionary (or usp, segy or su binary on input), "alias_data" for overriding the binary, and "alias_format" for overriding the format. The input parameter, "value", is the default value (eg. "stdin:") used for a fallback in cases where "alias" is not specified by the user. The input parameter, "title", should be a brief one line description of the application program. It will return a binary tag associated with the internal binary upon successful opening, a value of -2 if the dataset is not specified and no default value is given, otherwise a value of -1 to signify an open failure.

EXAMPLES

	integer :: in_bin, n1, ier, headerSize, bufferSize
	real, allocatable :: trace(:)
	
	in_bin = fddx_in2('in', 'stdin:', title);
	
	ier = fdds_scanf('size.axis(1)', '%d\0', n1)
	headerSize = fddx_index(in_bin, 'Samples', DDS_REAL)
	bufferSize = n1 + headerSize

	allocate(trace(bufferSize))
	ier = fddx_read(in_bin, trace, 1)
      

AUTHOR

Jerry Ehlers, BP America (May 2003)