c_getnam - Returns the host filename of a TAE parameter

SYNTAX

#include "las.h"

FUNCTION c_getnam (block, param, element, hname, ext, access)

     struct PARBLK      *block;
     char               *param;
     long               *element;
     char               *hname;
     char               *ext;
     long               *access

PARAMETERS

block (input, PARBLK)

TAE parameter block passed by reference. It is assumed that TAE has been initialized prior to calling c_getnam().

param (input, character, length (*))

Defines the TAE parameter name in the TAE parameter block which contains the file specifications.

element (input, long)

Defines which element of the input parameter array specified by param will be 0 (zero) in 'C' or 1 (one) in FORTRAN for input parameters that contain only a single element.

hname (output, character, length (CMLEN))

Character string which contains the hostname of the file specified in TAE parameter param.

ext (input, character, length(*))

Character string denoting the default extension for the file. If the user does not specify an extension (;), this extension is appended to the filename. If the user specified an extension (;), the filename is not changed.

access (input, I*4)

Denotes the type of access for which the file is to be opened. If access is for input, a check is made to ensure the file exists on disk. If access is for output, a check is made to ensure the file does not exist. If access is for update, no check is made if the file exists or not.

Valid values for access are:

     = IREAD   (0): read access
     = IWRITE  (1): write access
     = IUPDATE (2): update access

DESCRIPTION

The c_getnam() routine is used to return the host filename of the file specifications defined by TAE parameter param.

RETURN VALUE

c_getnam() returns

     E_SUCC (0)  --> successful completion
     E_FAIL (-1) --> operation failed

The routine may output other informational error messages.