fdds_open - open a DDS binary stream


SYNOPSIS

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

integer function fdds_open(dict, format_alias, data_alias, mode)

character*(*) dict
character*(*) format_alias
character*(*) data_alias
character*(*) mode

DESCRIPTION

This function opens a data stream and returns a binary tag (handle). Definitions within dict describe the format and data name. It also contains the processing history associated with the data.

fdds_open may update the first dictionary named by dict. This may be required to accurately describe the input or output data.

This may be done for input or output stream This is required to fully describe the binary data associated with the binary stream. The stream is described by the dict dictionaries.

INPUT

Dict is a dictionary that describes the binary data to be opened.

format_alias is a definition name selected by the programmer. If specified, the end user is allowed to override the format definition using this name (eg. out_format= segy).

data_alias is a definition name selected by the programmer. If specified, the end user is allowed to override the data definition using this name (eg. out_data= line88).

mode determines how data may be accessed within the stream.

Mode   Access        Description
"r"    read only     open existing file
"w"    write only    create file or discard contents
"a"    append only   open existing or create
"r+"   read write    open existing file
"w+"   read write    create file or discard existing contents
"a+"   read append   open existing or create
"m"    read write    open memory resident file
    
Open processing retrieves the DDS_PATH definition from the extended dictionaries. The value names paths, delimited by white space, that are searched for special dictionaries. These dictionaries describe how to create formats and map field contents.

OUTPUT

The return value is a binary tag (small integer), or negative if the stream could not be opened.

The contents of dict may be updated during fdds_open processing to describe the binary data. dict may be scanned after returning from fdds_open. Definitions should NOT be appended to dict after the binary stream is opened.

EXAMPLE

      character*1024 in, out
      integer in_bin, out_bin
      ...
!     open an existing binary i/o stream
      in_bin = fdds_open(in, ' ', ' ', 'r')

      ...

!     open a new binary i/o stream
      out_bin = fdds_open(out, 'out_format', 'out_data', 'w+')
    

SEE ALSO

      fdds_close
    

AUTHOR

R. L. Selzler, EPTG (May, 1994)