basic.%creat C Function/BASIC Program

basic.%creat

Command basic.%creat C Function/BASIC Program
Applicable release versions: AP/Unix
Category BASIC Program (486)
Description creates a new ordinary Unix file or prepares to rewrite an existing Unix file designated by "string" for write only. "mode" controls the file mode. Valid values of "mode" are in the include "mode.h". Combinations of the modes are obtained by adding several elementary modes together.
Syntax file.descriptor=%creat(string, mode)
Options
Example
include dm,bp,unix.h mode.h

* Create a unique temporary file
* read and write permission for user,
* read for group
fd=%creat( "/tmp/":system(19),
              S$IRUSR+S$IWUSR+S$IRGRP)

Note the usage of the plus operator to combine flags, where a regular C program 
would have used an 'or'.
Purpose
Related basic.%read
basic.%write
basic.cfunc
basic.cfunction
basic.%whex
basic.%rdhex
basic.%close
basic.%unlink
basic.%fsize