PreviousNext
Help > Development > W-Language Functions for AS/400 > IFS functions > Mode for ASfOpen, ASfCreate, ASfSaveText/Binary
Mode for ASfOpen, ASfCreate, ASfSaveText/Binary

 This mode values is used to specify how to open or create an IFS file using ASfOpen, ASfCreate, ASfSaveText/Binary.

 

This mode is a combination (i.e., a sum) of the following constants:

     Open kind

ASfoAdd : add data from end of the existing file

ASfoTruncate truncates the file

ASfoCreate creates the file, which must not exist before

ASfoCreateIfNotExist creates the file if does not exist before, use existing file otherwise

     Usage

ASfoWrite write access

ASfoRead read access

ASfoReadWrite read and write access

ASfoBinary binary : no conversion

ASfoUnicode file is storing Unicode data

     Locking

ASfofoReadLock read locking

ASfoWriteLock write locking

     Rights. This is unix-like rights: read (r), write (w), execute(x) for user(u), group(g) and other(o). This are the same symbolic which are used by the Unix chmod command.

When creating a file, the object’s owner will always be the current user.

CHGAUT command allows adjusting user rights. CHGOWN allows changing object’s owner.

ASfoModeU_R the object’s owner has read access

ASfoModeU_W the object’s owner has written access

ASfoModeU_X the object’s owner has execution access

ASfoModeU_RW = ASfoModeU_R+ASfoModeU_W

ASfoModeU_RX = ASfoModeU_R+ASfoModeU_X

ASfoModeU_RWX = ASfoModeU_RW+ASfoModeU_X

ASfoModeG_R the object’s group has read access

ASfoModeG_W the object’s group has written access

ASfoModeG_X the object’s group has execution access

ASfoModeG_RW = ASfoModeG_R+ASfoModeG_W

ASfoModeG_RX = ASfoModeG_R+ASfoModeG_X

ASfoModeG_RWX = ASfoModeG_RW+ASfoModeG_X

ASfoModeO_R other users have read access

ASfoModeO_W other users have written access

ASfoModeO_X other users have execution access

ASfoDroitsO_RW = ASfoModeO_R+ASfoModeO_W

ASfoDroitsO_RX = ASfoModeO_R+ASfoModeO_X

ASfoDroitsO_RWX = ASfoDroitsO_RW+ASfoModeO_X

ASfoModeA_R = ASfoModeU_R+ASfoModeG_R+ASfoModeO_R

ASfoModeA_W = ASfoModeU_W+ASfoModeG_W+ASfoModeO_W

ASfoModeA_X = ASfoModeU_X+ASfoModeG_X+ASfoModeO_X

ASfoModeA_RWX = ASfoModeA_R+ASfoModeA_W+ASfoModeA_X