asnctl(3F)

ASNCTL - Controls function of ASSIGN, ASNFILE, ASNUNIT, and ASNRM routines

Showing IRIX 6.5.30 (default release). Last changed in IRIX 6.5.19.

NAME
     ASNCTL - Controls function of ASSIGN, ASNFILE, ASNUNIT, and ASNRM
     routines

SYNOPSIS
     CALL ASNCTL(option, value, ier)

DESCRIPTION
     This routine is supported for programs compiled with the MIPSpro 7
     Fortran 90 compiler or compiled with the -craylibs option to the
     MIPSpro F77 compiler.

     The 'LOCAL' and 'NEWLOCAL' modes are useful for any utility written in
     Fortran when you want to use ASSIGN(3F) but do not want to access the
     assign environment file set up by the user.

     All arguments must be of default kind unless documented otherwise.  On
     IRIX systems, the default kind is KIND=4.

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

     option    A Fortran character variable containing either of the
               following values:

               'LOCAL'      Causes ASNCTL to establish a local assign
                            environment.  The old assign environment is
                            copied into the newly created local assign
                            environment.  Subsequent calls to ASSIGN,
                            ASNUNIT, ASNFILE, and ASNRM (see ASSIGN(3F))
                            affect only the newly created local assign
                            environment.  Any future Fortran OPEN requests
                            will also read from the local assign
                            environment initiated by this call to ASNCTL.
                            The user must set value to 1 when calling
                            ASNCTL with option='LOCAL'.

               'NEWLOCAL'   Causes ASNCTL to establish an empty local
                            assign environment.  Subsequent calls to
                            ASSIGN, ASNUNIT, ASNFILE, and ASNRM (see
                            ASSIGN(3F)) affect the newly created local
                            assign environment.  Any future Fortran OPEN
                            requests will also read from the local assign
                            environment initiated by this call to ASNCTL.
                            The user must set value to 1 when calling
                            ASNCTL with option='NEWLOCAL'.

               'RESTORE'    Restores the assign environment that was active
                            before the preceding 'LOCAL' or 'NEWLOCAL'
                            request.  Sets value to 1 when calling ASNCTL
                            with option='RESTORE'.

     value     Integer variable, constant, or array element containing the
               option value.

     ier       Integer variable or array element that is assigned the error
               status on return.  Zero (0) is usually returned, indicating
               no errors were encountered; otherwise, a positive error
               status is returned.


EXAMPLES
     The writer of the following Fortran program wants to disregard any
     assign information provided by the user.  However, the program
     requires sequential unformatted I/O on unit 11 with an unblocked file
     structure.  This is accomplished by the following:

CALL ASNCTL('NEWLOCAL',1,ier)       ! start local assign environment
CALL ASNUNIT(11,'-s unblocked',ier) ! assign the "unblocked" file structure
OPEN(11,form='unformatted')         ! open unit 11

SEE ALSO
     ASSIGN(3F)