Tips from Jackie
DBC is becoming a very common interface method for AS/400 users accessing DB2/ 400 data from a Windows program. Programs such as Lotus 123, Microsoft Excel, Microsoft Access, Cognos Impromptu, Showcase Vista, Forest and Trees, and many more all allow you to access your AS/400 data through the ODBC driver. However, users do occasionally encounter problems. We are going to look at the most common problem you might encounter using Client Access’s ODBC driver under Windows 3.x. Windows 95 and DOS are somewhat different and are both addressed in the manual listed at the bottom of this column. The most common problem will sound familiar to many of you. “Where is my job?” This is very similar to the often heard AS/400 refrain “Where is my printout?”.
The ODBC database server program QIWS/QZDAINIT runs in the QSERVER subsystem. This is the program that is used when you access AS/400 data from your PC via the ODBC driver. If QSERVER is not running then start the subsystem using the command STRSBS SERVER. QZDAINIT is a prestart job and should be running when the subsystem is running. The problem is that with WRKACTJOB you won’t see this job! To see prestart jobs you must use F14 after invoking WRKACTJOB. Your other choice is to use the command WRKSBSJOB QSERVER.
If you cannot find the QSERVER subsystem verify that you have installed AS/400 5763-SS1 option 12 - Host Servers.
OK, let’s get back to “Where is my job?”. The easiest way to find your copy of QZDAINIT and therefore your error messages is to use the Work with Configuration Status command on your APPC device. WRKCFGSTS CFGTYPE (*DEV) CFGD(your PCs local location name).
QZDAINIT will be associated with the user id QUSER not your router or signon user id. Use option 5 against this entry to work with the job and then option 10 to display the job’s joblog.
Sometimes the problem is that your job has ended very quickly and is not actually running when you are looking for it. In these cases you must cause the database server to generate a joblog. To generate a joblog you can change the job description used by QZDAINIT. CHGJOBD JOBD(QDFTJOBD) LOG(4 00 *SECLVL) Don’t forget to change the job description back to the way it was. Once the joblog is generated we are back to “Where is my printout?”. In this case the clue you need is to remember that the USERID the database server runs under is QUSER. You can use either WRKSPLF QUSER or WRKOUTQ QEZJOBLOG with F16 to jump to the bottom of the list.
Once you have done all this you should successfully be reading your
error messages. Exactly what to do with these messages is an excellent
topic for another time and place. No write-up on ODBC would be complete
without referring you to the manual “Client Access for Windows 3.1 ODBC
User’s Guide” SC41-3533-01. It is the best source of information on this
Jackie Jansen is an AS/400 Specialist and Consulting SE, providing national technical and marketing support for the AS/400 in Canada. Jackie frequently speaks at AS/400 Technical Conferences and User Group meetings.