AS/400 HELP    

                                       "ODBCLOG” 

ODBCLOG provides a log of users using ODBC  type connections to your AS/400 as well as a controlling who is allowed to get  in via PC programs such as  Microsoft’s EXCEL.

ODBCLOG is a combination of two programs. ODBCLOG is an EXIT program  attached to QIBM_QZDA_INIT.   ODBCLOG  records all sign-on attempts and verifies them against file ODBCUSERS. 

ODBCHIST  displays the log file.

ODBCLOG was developed and tested at V5r1. 

PC INSTRUCTIONS:

Download "ODBCLOG to your PC.

Go to a DOS session and enter the following;

FTP SYSTEM                                        (system = your AS/400’s name or IP address)

Enter a valid user id and password

CD QGPL

LCD C:\DIRECTORY (directory= the directory on your pc where you downloaded “ odbclog.savf”

QUOTE    SITE     NAMEFMT   1

BIN

PUT       ODBCLOG.SAVF

QUOTE   RCMD   RSTLIB   SAVLIB(ODBCLOG)   DEV(*SAVF)   SAVF(QGPL/ODBCLOG)

 Note:  If there is a security problem restoring all objects with the command above,  sign on to your as/400 as Qsecofr and run RSTLIB  from the command line.

Download    ODBCLOG.SAVF        

 

AS/400 INSTRUCTIONS:

DO NOT ATTEMPT TO INSTALL ODBCLOG WITHOUT PERMISSION FROM YOUR AS/400 ADMINSTRATOR.

DO NOT ATTEMPT TO INSTALL ODBCLOG WITHOUT A FULL UNDERSTANDING OF THE COMMANDS LISTED BELOW. Improper use of ODBCLOG MAY STOP ALL ODBC CONNECTIONS TO YOUR AS/400.

1) In order for ODBCLOG to work it must be registered as an EXIT program.

3) The instructions below were tested on a v5r1 AS/400. They may not apply or work on other releases. ODBCLOG may not work on other releases.

 

WRKREGINF       scroll down to “QIBM_QZDA_INIT      ZDAI0100”

OPTION  8

If there is an exit program already attached to this exit point STOP here. Do not continue with instructions below. A similar function is most likely being performed by the existing exit program. 

OPTION  1  (add) 

enter   OPT         Exit          Library

                    Program     

         1           ODBCLOGCL     ODBCLOG

press enter to add ODBCLOGCL as an exit program.   

 

QUSRWRK subsystem must be stopped and restarted in order for ODBCLOG to work. 

 

HOW USERS ARE GIVEN PERMISSION VIA ENTRIES IN ODBCUSERS.

NOTE: To add / delete / modify users use STRDFU option 5  on datafile ODBCUSERS in Library  ODBCLOG

File ODBCUSERS is installed with no records.

RULES:

ONCE INSTALLED NO USER HAS PERMISSION. ALL ODBC ATTEMPTS WILL BE REJECTED. YOU MUST ENTER ONE OR MORE RECORDS INTO ODBCUSERS AS PER THE RULES LISTED BELOW.

The user will be rejected if his/her name (user profile name) is not entered in ODBCUSERS

The user will be rejected if his/her name is entered AND PERMISSION is 0 (zero) Anything else such as a blank or any other character or number grants permission  (0 = REJECT USER)  This gives you the ability to revoke permission to the user and give it back later.

To control permission for all users at once  enter a USER:  ALLUSERS  The permission entered for user ALLUSERS applies to ALL users. Permission code 0 stops ALL users no matter what their individual permission code is. This comes in handy if you want to suspend ODBC use for a time.  Simply change the permission to anything but 0 and the logic reverts back to the permission code for each user.    I recommend using a 1 to show they have permission (remember that ONLY a 0 rejects a user sign in.

 

To view ODBC sign-in attempts:

 

ADDLIBLE ODBCLOG

CALL ODBCHIST