*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> f90/pxfcreat (3)              
Title
Content
Arch
Section
 

Contents


PXFCREAT(3F)					       Last changed: 1-6-98

NAME    [Toc]    [Back]

     PXFCREAT -	Creates	a new file or rewrites an existing file

SYNOPSIS    [Toc]    [Back]

     CHARACTER*n path
     INTEGER ilen, imode, ifildes, ierror
     CALL PXFCREAT(path, ilen, imode, ifildes, ierror)

IMPLEMENTATION    [Toc]    [Back]

     UNICOS, UNICOS/mk,	and IRIX systems

STANDARDS    [Toc]    [Back]

     IEEE standard interface for FORTRAN 77

DESCRIPTION    [Toc]    [Back]

     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
     7.2 F77 compiler.

     The PXFCREAT subroutine uses the creat(2) system call to create a new
     file or rewrite an	existing file.	The call is similar to PXFOPEN with
     an	iopenflag argument of O_WRONLY,	O_CREAT, and O_TRUNC.

     The value of imode	indicates specific file	modes.	If the file exists,
     imode is ignored.	The mode values	are used when path is a	new file.

     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 subroutine:

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

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

     imode     An input	integer	variable containing the	integer	value of
	       the symbolic constant for one or	more of	the following file
	       modes:

	       USER	 READ permissions bit:	S_IRUSR
			 WRITE permissions bit:	 S_IWUSR
			 SEARCH/EXECUTE	permissions bit:  S_IXUSR
			 Inclusive OR of READ/WRITE/EXECUTE:  S_IRWXU

	       GROUP	 READ permissions bit:	S_IRGRP
			 WRITE permissions bit:	 S_IWGRP
			 SEARCH/EXECUTE	permissions bit:  S_IXGRP
			 Inclusive OR of READ/WRITE/EXECUTE:  S_IRWXG

	       OTHER	 READ permissions bit:	S_IROTH
			 WRITE permissions bit:	 S_IWOTH
			 SEARCH/EXECUTE	permissions bit:  S_IXOTH
			 Inclusive OR of READ/WRITE/EXECUTE:  S_IRWXO

	       SETID	 Set user ID on	execution:  S_ISUID
			 Set group ID on execution:  S_ISGID

	       An integer value	for each of these symbolic constants is
	       retrieved through the use of PXFCONST or	IPXFCONST.  The
	       integer values may be combined through the use of a bitwise
	       inclusive OR function.

     ifildes   An output integer variable containing the file descriptor
	       returned	by creat().

     ierror    An output integer variable that contains	zero if	the file is
	       created or rewritten or nonzero if PXFCREAT is not
	       successful.

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

     EINVAL    If ilen < 0 or ilen > LEN(path)

     ENOMEM    If PXFCREAT is unable to	obtain memory to copy path

EXAMPLES    [Toc]    [Back]

	  program test
	  character*(12) path
	  integer ilen,	imod, ifilde, ierr
	  integer imodru, imodwu, imodwg, imodrg
	  integer ierr1, ierr2,	ierr3, ierr4
	  path = 'testfile'
	  imod = 0
	  ilen = 0
	  call pxfconst('S_IRUSR',imodru,ierr1)
	  call pxfconst('S_IWUSR',imodwu,ierr2)
	  call pxfconst('S_IRGRP',imodrg,ierr3)
	  call pxfconst('S_IWGRP',imodwg,ierr4)
	  imod = IOR((IOR(imodru,imodwu)),(IOR(imodrg,imodwg)))
	  call pxfcreat(path,ilen,imod,ifilde,ierr)
	  if (ierr.ne.0) then
	     print *,'FAIL: error from pxfcreat	= ',ierr
	  else
	     print *,'PASS: No error from pxfcreat = '
	  endif
	  end

SEE ALSO    [Toc]    [Back]

      
      
     creat(2), PXFCONST(3F)

     Application Programmer's Library Reference	Manual,	publication SR2165,
 for the printed version of this man page.

PXFCREAT(3F)					       Last changed: 1-6-98

NAME    [Toc]    [Back]

     PXFCREAT -	Creates	a new file or rewrites an existing file

SYNOPSIS    [Toc]    [Back]

     CHARACTER*n path
     INTEGER ilen, imode, ifildes, ierror
     CALL PXFCREAT(path, ilen, imode, ifildes, ierror)

IMPLEMENTATION    [Toc]    [Back]

     UNICOS, UNICOS/mk,	and IRIX systems

STANDARDS    [Toc]    [Back]

     IEEE standard interface for FORTRAN 77

DESCRIPTION    [Toc]    [Back]

     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
     7.2 F77 compiler.

     The PXFCREAT subroutine uses the creat(2) system call to create a new
     file or rewrite an	existing file.	The call is similar to PXFOPEN with
     an	iopenflag argument of O_WRONLY,	O_CREAT, and O_TRUNC.

     The value of imode	indicates specific file	modes.	If the file exists,
     imode is ignored.	The mode values	are used when path is a	new file.

     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 subroutine:

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

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

     imode     An input	integer	variable containing the	integer	value of
	       the symbolic constant for one or	more of	the following file
	       modes:

	       USER	 READ permissions bit:	S_IRUSR
			 WRITE permissions bit:	 S_IWUSR
			 SEARCH/EXECUTE	permissions bit:  S_IXUSR
			 Inclusive OR of READ/WRITE/EXECUTE:  S_IRWXU

	       GROUP	 READ permissions bit:	S_IRGRP
			 WRITE permissions bit:	 S_IWGRP
			 SEARCH/EXECUTE	permissions bit:  S_IXGRP
			 Inclusive OR of READ/WRITE/EXECUTE:  S_IRWXG

	       OTHER	 READ permissions bit:	S_IROTH
			 WRITE permissions bit:	 S_IWOTH
			 SEARCH/EXECUTE	permissions bit:  S_IXOTH
			 Inclusive OR of READ/WRITE/EXECUTE:  S_IRWXO

	       SETID	 Set user ID on	execution:  S_ISUID
			 Set group ID on execution:  S_ISGID

	       An integer value	for each of these symbolic constants is
	       retrieved through the use of PXFCONST or	IPXFCONST.  The
	       integer values may be combined through the use of a bitwise
	       inclusive OR function.

     ifildes   An output integer variable containing the file descriptor
	       returned	by creat().

     ierror    An output integer variable that contains	zero if	the file is
	       created or rewritten or nonzero if PXFCREAT is not
	       successful.

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

     EINVAL    If ilen < 0 or ilen > LEN(path)

     ENOMEM    If PXFCREAT is unable to	obtain memory to copy path

EXAMPLES    [Toc]    [Back]

	  program test
	  character*(12) path
	  integer ilen,	imod, ifilde, ierr
	  integer imodru, imodwu, imodwg, imodrg
	  integer ierr1, ierr2,	ierr3, ierr4
	  path = 'testfile'
	  imod = 0
	  ilen = 0
	  call pxfconst('S_IRUSR',imodru,ierr1)
	  call pxfconst('S_IWUSR',imodwu,ierr2)
	  call pxfconst('S_IRGRP',imodrg,ierr3)
	  call pxfconst('S_IWGRP',imodwg,ierr4)
	  imod = IOR((IOR(imodru,imodwu)),(IOR(imodrg,imodwg)))
	  call pxfcreat(path,ilen,imod,ifilde,ierr)
	  if (ierr.ne.0) then
	     print *,'FAIL: error from pxfcreat	= ',ierr
	  else
	     print *,'PASS: No error from pxfcreat = '
	  endif
	  end

SEE ALSO    [Toc]    [Back]

      
      
     creat(2), PXFCONST(3F)

     Application Programmer's Library Reference	Manual,	publication SR2165,
 for the printed version of this man page.

[ Back ]
 Similar pages
Name OS Title
link Tru64 Creates an additional directory entry for an existing file
unlink Tru64 Creates an additional directory entry for an existing file
link Tru64 Create a hard link to an existing file on the local file system
newtag IRIX creates a new tag within an object relative to an existing tag
mkfset Tru64 Creates a fileset in an existing AdvFS domain
create_replica HP-UX Creates a replica of an existing directory in the specified clearinghouse
dup FreeBSD duplicate an existing file descriptor
tunefs_hfs HP-UX tune up an existing HFS file system
tunefs Tru64 Tunes an existing UFS file system
creat IRIX create a new file or rewrite an existing one
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service