3 - create file.

Usage:

mme    gefsye
zero   CC,ARGLIST
zero   3,BUFFER

Where:

CC
is either zero or a courtesy call address.
ARGLIST
points to a list of arguments for this call. The format of this list is described below.
BUFFER
points to a buffer that can be used in this operation. This buffer should be 355 words long.

Description:

This version of MME GEFSYE creates a file with a given set of characteristics. The argument list indicated by ARGLIST has the form

zero    RETURN_WORD,USERID
zero    FILE_NAME,PERMISSION
zero    OPTION,0
where
RETURN_WORD
points to two words where MME GEFSYE can return a status. MME GEFSYE will initialize these words to zeroes. When MME GEFSYE returns, the first word will contain
Bit 0      -- 1 to indicate completion
    1-11   -- error code, or 0 for success
    18-35  -- pointer to additional error info
              (if any)
See "expl mme gefsye" for a list of common error codes. Other possible error codes are
10  -- no space for file on device
13  -- space request greater than allowed
USERID
points to two words containing the userid under which the program is operating (in BCD characters).
FILE_NAME
points to an area of memory containing the name of the file to be created. This consists of four word chunks: the first two words of each chunk gives a component of a pathname (first chunk the userid, next chunk the name of the first catalog, and so on); the last two words of each chunk gives a password. Each component name and password is given as 1-12 BCD characters, left-justified and padded on the right with blanks. If a component has no password, the password part of the chunk is all blanks.

The password part of the final chunk of the pathname (the file name) may have a normal password or may have a special password block (as described later on).

After the last pathname chunk comes a word containing the value -1.

PERMISSION
points to a word giving general attributes for the file.
Bits 0-11
give general permissions (four octal digits, as described in "expl mme gefsye").
Bits 18-20
give an access code for the file:
0 -- normal
2 -- Read while Write
6 -- Monitor or Concurrent
Bit 30
if 1, WLOCK
Bit 32
if 1, NSAVE
Bit 35
if 1, SLOCK
OPTION
points into a buffer describing additional arguments for the file creation. Below we describe the bits of each word in the buffer.
OPTION-1:
  Bits 0-17:  BCD device name
                    or
              Bits 0-11 zero, 12-17 device code
              (see "expl mme gefsye")
                    or
              Zero
         18:  RDERR/DUP/ (if on)
         19:  ABORT/ARCHIVE/ (if on)
         20:  RDERR/JOURNAL/ (if on)
         21:  reserved
         22:  INCRSAVE/NO/ (if on)
         23:  ABORT/LOCK/ (if on)
         24:  ACCESS/MONITOR/ (if on)
         25:  VERIFY/YES/ (if on)
         26:  ABORT/ROLLBACK/ (if on)
         27:  reserved
         28:  AUDIT/DENIED/ (if on)
         29:  AUDIT/ALL/ (if on)
      30-35:  # of sectors in page; if 0,
              default is 5
 
OPTION:
      Bit 0:  reserved
          1:  random file (if on)
          2:  file created by TSS (if on)
          3:  file is IDS/I (if on)
          4:  size units will be llinks (if on),
              links (if off)
          5:  file already on tape or non-
              structured disk pack (if on)
          7:  IDS/I attributes present (if on)
          8:  user-specified info present
              (if on)
       9-12:  reserved
         13:  OPTION-1 is present (if on)
         14:  duplicate device specified (if on)
      15-17:  reserved
      18-35:  BCD device name
                   or
              bits 18-29 zero, 30-35 device code
              (see "expl mme gefsye")
                   or
              0 or -1 (no user specification)
                   or
              volinfo address if OPTION bit 5=1
              (see below)
 
OPTION+1:
  Bits 0-17:  initial file size (llinks/links)
      18-35:  maximum file size (llinks/links);
              0 => unlimited
 
    or if OPTION bit 5=1
 
        0-5:  volume type code (see "expl mme
              gefsye")
       6-35:  BCD volume serial number (left-
              justified, blank-filled)
Beginning at OPTION+2, there are triplets of words indicating specific permissions for the file being created. The first two words of each triplet give the BCD userid receiving the permission. The last word has the general permissions code in Bits 0-11 (see "expl mme gefsye"). Bit 17 should be on if this EXCLUDEs permission. Other bits are reserved.

The final triplet is followed by a word containing -1.

If OPTION bit 8 is on, a word of user-specified information (in Bits 1-35) comes next, followed by a word containing -1.

If OPTION bit 7 is on, five words of IDS/I attributes information comes next.

Word 0, Upper: first page number in range
        Lower: last page number in range
Word 1, Bit 1: MULTIUSER/YES/ (if on)
        12-17: COEXISTENCE/YES/ (if 1's)
        Lower: number of words in page
Word 2: maximum number of lines per page
Word 3: BCD `%` or `NO`
Word 4: base size
Finally, the end of the OPTIONS block is indicated by a -1.

Special Password Block

A special password block is two words long. It appears in the password part of the final chunk of a pathname. It has the form

zero    N,-1
zero    LIST,0
where LIST points to a list of password descriptors and N is the number of descriptors in the list. Each descriptor is four words long. The first two words give a password as 1-12 BCD characters, left-justified and padded with blanks. The next word gives a time when the password starts to apply, and the last gives a time when the password should stop applying. This lets you create passwords that are only in effect at certain times of the day. Times are given as a certain number of "ticks" after midnight, where each tick is 1/64,000 of a second.

Volinfo

The Volinfo value mentioned above is three words long. The first two words give a volume name (1-12 BCD characters, left-justified, blank filled). Bits 0-5 of the last word give a density code (for magnetic tapes only -- see "expl mme gefsye").

Notes:

If this version of MME GEFSYE completes successfully, the file will be created, although space for the file will not yet be assigned if it is already on magnetic tape or a non-structured disk pack.

However, the file will not yet be allocated for program use. Use MME GEMORE to allocate the file.

If a superordinate catalog specifies a default device for the file being created, bit 15 of OPTION will be set on when MME GEFSYE returns.

When the MME returns, bits 0-17 of OPTION+1 will be set to the actual space assigned to the file. This may differ from the requested size because of file duplication or because the size was specified in llinks but the device allocates space in different (larger) units.

See Also:

expl access

expl access permissions

expl mme gemore

Copyright © 2000, Thinkage Ltd.