pxfutime(3F)

PXFUTIME - Sets access and modification times of a file

As shipped in IRIX 6.5.15. Last changed in IRIX 6.5.5.

NAME
     PXFUTIME - Sets access and modification times of a file

SYNOPSIS
     CHARACTER*n path
     INTEGER ilen, jutimbuf, ierror
     CALL PXFUTIME(path, ilen, jutimbuf, ierror)

IMPLEMENTATION
     UNICOS, UNICOS/mk, and IRIX systems

STANDARDS
     IEEE standard interface for FORTRAN 77

DESCRIPTION
     On IRIX systems, this routine is in libfortran.so which is linked by
     default when compiling programs with the MIPSpro 7 Fortran 90 compiler
     or when compiling programs with the -craylibs option to the MIPSpro
     F77 compiler.

     The routine PXFUTIME provides the functionality of the utime(2) system
     call.

     When using the CF90 compiler or MIPSpro 7 Fortran 90 compiler on
     UNICOS, UNICOS/mk, or IRIX systems, all arguments must be of default
     kind unless documented otherwise.  On UNICOS and UNICOS/mk, default
     kind is KIND=8 for integer, real, complex, and logical arguments; on
     IRIX, the default kind is KIND=4.

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

     path        An input character variable or array element containing
                 the name of the file.

     ilen        An input integer variable containing the length of path in
                 characters.  If ilen is zero, all trailing blanks are
                 removed before calling utime.

     jutimbuf    An input integer variable.  It is a handle for a structure
                 of type utimbuf.  The handle must be created by a call to
                 the PXFSTRUCTCREATE(3F) routine prior to the call to
                 PXFUTIME.  The names of the components of the utimbuf
                 structure are actime and modtime.  These components can be
                 accessed through the PXFINTSET subroutine.  The
                 functionality obtained in utime by passing a NULL can be
                 obtained in PXFUTIME by passing a handle argument with a
                 value of zero.

     ierror      An output integer variable that contains zero if the call
                 to utime was successful or nonzero if the call to utime
                 was not completed.

     In addition to the errors returned by the utime(2) system call,
     PXFUTIME may return the following errors:

     EINVAL       If ilen is less than 0 or ilen is greater than LEN(path).

     ENOMEM       If PXFUTIME is unable to obtain memory to copy path.

     EBADHANDLE   If jutimbuf is an invalid handle or has an incorrect
                  handle type (UNICOS and UNICOS/mk systems only).

EXAMPLES
                program test

                character*12 filea, fileb
                integer ilenfila, ilenfilb, jutimbuf, ierr

          ! create file
                open(file='existfile', unit=9, status='NEW')
                write(9,*) 'HI', 1.2, 11, 'GOODBYE'
                endfile 9
                close 9

                filea = 'existfile'
                ilenfila = 0
                ilenfilb = 0

          ! Set file access and modification time to current time
                call pxfutime(filea,ilenfila,0,ierr)
                if (ierr.ne.0) then
                   print *,'FAIL: pxfutime'
                   print *,'nonzero status on existing file = ',ierr
                else
                   print *,'PASS: pxfutime'
                   print *,'zero status on existing file'
                endif

                end

     The output of this test on a UNICOS system is:

          PASS: pxfutime
          zero status on existing file

SEE ALSO
     Application Programmer's Library Reference Manual for the printed
     version of this man page.