asnqfile

Date:

10-20-2011

NAME

ASNQFILE, ASNQUNIT - Returns the assign options currently in effect for a file name or unit number

SYNOPSIS

CALL ASNQFILE(file, attr, istat)
CALL ASNQUNIT(iun, attr, istat)

DESCRIPTION

ASNQFILE queries the assign environment for any assign options currently in effect for a file name. ASNQUNIT queries the assign environment for any assign options currently in effect for a unit number. The assign options may have been established earlier by the assign(1) command or the ASSIGN, ASNUNIT, or ASNFILE (see ASSIGN(3F)) library routines.

When using the Cray Fortran compiler, all arguments must be of default kind unless documented otherwise. On Cray systems, the default kind is KIND=4 for integer, real, complex, and logical arguments.

The following is a list of valid arguments for this routine:

file

A character variable or array element containing the file name.

attr

A character variable or array element that receives the option’s value in the form of a character string. If the options exceed the length of attr, istat is set to a positive error code. If no assign options are found for the specified unit or file, ‘ ‘ is returned in attr.

istat

An integer KIND=4 variable or array element that receives one of the following return statuses:

0

Options were found for the specified file or iun.

-1

No options were found for the specified file or iun.

>0

An error condition was encountered. Use the explain(1)command to obtain information about a particular error code.

iun

An integer KIND=4 variable or array element containing the unit number.

SEE ALSO

assign(1), explain(1)

asnctl(3f), ASSIGN(3F)