RexxSQL and var names?

Help
William
2005-10-02
2012-08-14
  • William
    William
    2005-10-02

    Hi guys,

    I'm using the RexxSQL API and need help with the Rexx variable names returned from different calls. Example:
    SQLCommand( DB, 'Select * from Table' )
    What var names are returned?? I have a table that has:
    ID
    Supplier
    Location
    Rack
    Shelve
    Schedule
    I would expect something like this:
    DB.ID.0 = 1
    DB.ID.1 = some name
    etc.
    I don't!
    I don't know what name is returned.
    I remember some time ago IBM have a call that would return
    all of the var names defined with in a rexx work space.
    Is something like that still available??

     
    • Dave Martin
      Dave Martin
      2005-10-03

      The names will come back as DB.ID.1, DB.Supplier,1, DB.Location.1 etc.

      If I recall correctly case matters with this API so your DB field names and the stem name case matter (I may be incorrect on that point).

      Dave

       
    • William
      William
      2005-10-05

      I found in further testing that you can't trust the return code
      from these function.

       
    • William
      William
      2005-10-05

      Dave,

      I found in further testing that you can trust the return code
      from these function. The command may or may not run correctly.
      You must check the SQLROWCOUNT to see what happened.
      In my case I was getting RC=0 but the command has in fact failed.

      By setting the SQL Debug var to 3, I could see what is going on.
      But you can not use this while running a CGI type script.
      You must run in a terminal session to debug your script.