In order for this site to work correctly, and for us to improve the site, we need to store a small file (called a cookie) on your computer.
By continuing to use this website, you agree to our cookies and privacy policy.
  
Home page Home page Home page Home page
Pixel
Pixel Header R1 C1 Pixel
Pixel Header R2 C1 Pixel
Pixel Header R3 C1 Pixel
Pixel

Version 3 Technical Highlights - User_Sub

A subroutine with four parameters which permits the developer to manipulate users from within any account on the system. Parameters are Action, UserName, UserRecord, Flag.

Action   The code for the action to be taken. Values identified thus far are

         0  Creates a new user. Needs user name in UserName, account to
            create user for in Record and returns a result flag in Flag.
            Flag can have the following values
               0  User created successfully
               2  Record exists but is not a user record
               7  Unable to create user (user already exists, account does
                  not exist, not a valid account etc.)

         1  Modifies an existing user record. Needs user name in UserName,
            new record (or partial record) in Record and returns result flag
            in Flag. Flag can have the following values
               0  User modified successfully
               2  Record exists but is not a user record
               3  Record does not exist

         2  Read a user record. Needs User name in UserName and returns user
            record in Record and result flag in Flag. Flag can have the
            following values
               0  Record read successfully
               2  Record exists but is not a user record
               3  Record does not exist

         3  Deletes a user record. Needs user name in UserName and returns
            user record in Record and result flag in Flag. Flag can have the
            following values
               0  Record deleted successfully
               2  Record exists but is not a user record
               3  Record does not exist

Note that codes other than the above return an error flag of 4. With Code 0 1 or 3, an interesting side effect is that if UserName contains a non-user record, but still a record that exists on SYSCONFIGURE, then Record returns the record even though the error flag is set. This could be used to good effect to read records from SYSCONFIGURE from a non-Sysprog account.

(Volume 4, Issue 5, Page 11)
Pixel
Pixel Footer R1 C1 Pixel
Pixel
Pixel
Pixel