pxflink
- Date:
10-20-2011
NAME
PXFLINK - Creates a link to a file
SYNOPSIS
CHARACTER*n existf, newf
INTEGER lenexist, lennew, ierror
CALL PXFLINK(existf, lenexist, newf, lennew, ierror)
IMPLEMENTATION
Cray Linux Environment (CLE)
STANDARDS
IEEE Std 1003.9-1992 standard interface for FORTRAN 77
DESCRIPTION
The PXFLINK routine uses the link function to link an existing file to a new file.
All arguments must be of default kind unless documented otherwise. Default kind is KIND=4 for integer, real, complex, and logical arguments.
The following is a list of valid arguments for this routine:
- existf
An input character variable or array element containing the name of an existing file.
- lenexist
An input integer variable containing the length of existf in characters. If lenexist is zero, all trailing blanks are removed before calling link().
- newf
An input character variable or array element containing the name of a new file.
- lennew
An input integer variable containing the length of newf in characters. If lennew is zero, all trailing blanks are removed before calling link().
- ierror
An output integer variable that contains zero if the link was successful or nonzero if the link was not completed.
In addition to the errors returned by the link(2) system call, PXFLINK may return the following errors:
- EINVAL
If lenexist < 0 or lenexist > LEN(existf)or lennew < 0 or lennew > LEN(newf).
- ENOMEM
If PXFLINK is unable to obtain memory to copy existf or newf.
EXAMPLES
program test
character*(12) filea, fileb
integer lenfila, lenfilb, ierror
filea = 'existfile'
fileb = 'newfile'
lenfila = 0
lenfilb = 0
call pxflink(filea,lenfila,fileb,lenfilb,ierror)
if (ierror.ne.0) then
print *,'FAIL: error from pxflink = ',ierror
else
print *,'PASS: No error from pxflink = '
endif
end
SEE ALSO
link(2)