39 - truncate file.

Usage:

mme    gefsye
zero   CC,ARGLIST
zero   39,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 truncates an existing file, and rewinds it. To execute this MME, the program must have write permission on the file.

The argument list indicated by ARGLIST has the form

zero    RETURN_WORD,USERID
zero    FILE,SUBFUNC
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   -- octal 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
  3  -- permissions denied
  4  -- file busy; try later
  5  -- incorrect cat/file description
  7  -- undefined device
 26  -- non-structured file entry
104  -- illegal new file size option
USERID
points to two words containing the userid under which the program is operating (in BCD characters).
FILE
indicates the file to be truncated. If SUBFUNC is 1, FILE will point to a PAT entry. If SUBFUNC is 2, FILE will point to a single word containing a file code, in the format
bci     1,0000FC
If SUBFUNC is 0, FILE will point to a file name given in 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. After the last pathname chunk comes a word containing the value -1.
SUBFUNC
points to a word containing a subfunction code. If the code is 0, FILE will point to a full pathname. If the code is 1, FILE will point to a PAT entry. If the code is 2, FILE will point to a file code.
OPTION
points to a single word that gives the new size of the file, in llinks. The new size must be greater than zero and less than or equal to the current size.

Copyright © 2000, Thinkage Ltd.