fdds_datadefn - DDS, create filename for binary output


SYNOPSIS

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

integer function fdds_datadefn(name, data_dict, data_alias)

character*(*) name
character*(*) data_dict
character*(*) data_alias

DESCRIPTION

This function creates a filename for binary output. The name is defined in data_dict and returned to the caller.

INPUT

Data_dict names one dictionary that describes the binary output.

If data_alias is specified (i.e. "out_data"), the user is allowed to override the filename (i.e.out_data= name). If an override is not defined, a name is derived automatically. The name is based upon the data_dict name and media. If the dictionary is a regular file, then the data is output to another regular file. The new filename is created using DATA_PATH, DATA_SUFFIX, and the last component of the dictionary name. If the dictionary is NOT a regular file (i.e. pipe, tape, ...), or if data_alias defines a blank name, then binary data is attached to the output dictionary, i.e. they share the same file, pipe stream, or tape media.

The values for DATA_PATH and DATA_SUFFIX are retrieved from the extended dictionaries.

OUTPUT

If the user defines an override via data_alias, two definitions are appended to data_dict. The first is an alias that references the override (i.e. $data= out_data). The second is an alias that prevents the override from being used again (i.e. $out_data= ).

The function returns name. It contains the override defined by the user, or the filename created by fdds_datadefn.

EXAMPLE

      character*1024 name, data_dict
      data_dict = 'line73'
      ...
      ! change alias used to default data path
      ! default is "DATA_PATH"
      j = fdds_printf('data_path=', 'CM_DATA_PATH')
      
      ! create data filename (suffix is "-") or
      ! retrieve override "out_data= filename"
      j = fdds_datadefn(name, data_dict, 'out_data')
    

AUTHOR

Randy Selzler, EPTG (May, 1994)