AS400 Stored Procedures

Posted on 2012-08-15
Last Modified: 2012-08-15
I have a stored procedure that I know works, as I can call it through iSeries Client Access.  I have my outside person calling the same procedure and getting an error.  He's using a PHP interface, which I know nothing about.  

Is there any way for me to see him coming in, along with a log of some sort?
Question by:nickmbnabb
    LVL 37

    Expert Comment

    which error message does he get?
    usually accessing an as400 requires a middle ware like db2 connect
    do you know if he uses such middle ware?
    LVL 18

    Accepted Solution

    Most likely, they're making a connection through ODBC, and that should work fine. (It certainly does for me.) You CAN use middleware like DB2 Connect, but you can also connect directly via ODBC and JDBC.

    On the '400-side, you could monitor for QZDASOINIT jobs (since those typically service ODBC and JDBC jobs), but I speculate that the PHP isn't even successfully making a connection.

    I'm not sure how to do this in PHP, but you should be able to monitor for a connection error and diagnose the error-message from there.


    Author Comment

    He's said he's getting error QZ96920C6F54463000.   ???

    He is connecting to our AS400 successfully accessing a view through ODBC.

    Author Comment

    This is the result he's seeing:

    Connection = 0x2ac6eac48b00            
    Server Name = [AS400-dev][length = 9 (SQL_NTS)]            
    User Name = [FIRSTSCRIB][length = 10 (SQL_NTS)]            
    Authentication = [********][length = 8 (SQL_NTS)]
    UNICODE Using encoding ASCII 'ISO8859-1' and UNICODE 'UCS-2LE'

    Handle Type = 3
    Input Handle = 0x2ac6eac48b00
    Output Handle = 0x2ac6eac655e0
    Statement = 0x2ac6eac655e0            
    SQL = [call ycslibr.ycso82r ('                      ','CBHU 8073200   ')][length = 65]

    Author Comment

    On the '400-side, you could monitor for QZDASOINIT jobs (since those typically service ODBC and JDBC jobs), but I speculate that the PHP isn't even successfully making a connection.

    I did this, found him coming in.  Thanks!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Suggested Solutions

    November 2009 Recently, a question came up in the DB2 forum regarding the date format in DB2 UDB for AS/400.  Apparently in UDB LUW (Linux/Unix/Windows), the date format is a system-wide setting, and is not controlled at the session level.  I'm n…
    Recursive SQL in UDB/LUW (it really isn't that hard to do) Recursive SQL is most often used to convert columns to rows or rows to columns.  A previous article described the process of converting rows to columns.  This article will build off of th…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now