ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

RPGLE not returning results

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • RPGLE not returning results

    I am working a program to print a Purchase order and the associated line items. The parameter of the PO is being passed correctly to the program, as when I am debugging it I can see that variable. If I run the header SQL statement with a PO, I get 1 line as a result, but none of the into variables seem to be updated. I am pretty new to this so I am sure I am missing something simple. Attached is the code. This is going through Infor XA, if that matters at all.
    Attached Files

  • #2
    What problem are you having?

    I can't see that you are checking for any errors or problems in the SQL statements. So what is your expected outcome if anything is wrong? How do you plan to solve problems with no feedback from the database if there are any errors?

    The first thing I would do is add error checking. I'd step through the code and see what is happening, after each SQL statement, is it reporting no error? Or, what is it reporting? Which statement is failing? And so forth. Narrow down where the problem is occurring and what the system says the problem is. Then scrutinize the part that is failing until you determine what the cause is.

    Comment


    • #3
      In debug, check the value of SQLCOD after each sql command.

      Comment

      Working...
      X