I had never heard of
set-attribute-list
so I looked it up. It is the name of an internal procedure in a Progress procedure, web2/admweb.p; maybe in other code too. It might look something like this:
Code:
PROCEDURE set-attribute-list :
/* ---------------------------------------------------------------------
Purpose: Accepts the value of the complete object attribute list and
runs procedures to set individual attributes.
Parameters (INPUT):
p-attr-list (CHAR)- comma-separated attribute list with the
format "name=value". Typical attributes are web-timeout,
web-state, and web-timeout-handler. In addition, other names
can be used provided the special-get-attribute procedure
exists in the target procedure to handle them.
Notes: Not all attributes are settable. Those which are a part of an
event such as enable/disable (which set ENABLED on/off) or
hide/view (which set HIDDEN on/off) can be queried through
get-attribute, but are read-only.
------------------------------------------------------------------------*/
DEFINE INPUT PARAMETER p-attr-list AS CHARACTER NO-UNDO.
DEFINE VARIABLE cntr AS INTEGER NO-UNDO.
DEFINE VARIABLE attr-name AS CHARACTER NO-UNDO.
DEFINE VARIABLE attr-value AS CHARACTER NO-UNDO.
DEFINE VARIABLE attr-entry AS CHARACTER NO-UNDO.
DO cntr = 1 TO NUM-ENTRIES(p-attr-list):
attr-entry = ENTRY(cntr, p-attr-list).
IF INDEX(attr-entry,"=":U) = 0 THEN DO:
MESSAGE
"Invalid element in set-attribute call:" SKIP
attr-entry SKIP "in" TARGET-PROCEDURE:FILE-NAME
VIEW-AS ALERT-BOX WARNING.
NEXT.
END.
ASSIGN
attr-name = TRIM(ENTRY(1,attr-entry,"=":U))
attr-value = TRIM(ENTRY(2,attr-entry,"=":U))
.
CASE attr-name:
WHEN "Web-Timeout":U THEN {set WebTimeout DECIMAL(attr-value)}.
WHEN "Web-State":U THEN {set WebState attr-value}.
WHEN "Web-Timeout-Handler":U THEN {set WebToHdlr attr-value}.
OTHERWISE
RUN special-set-attribute IN TARGET-PROCEDURE
(attr-name, INPUT attr-value) NO-ERROR.
END CASE.
END. /* DO... */
END PROCEDURE.
So as I read it, if the above were your code, your call with "debtor=<string_of_some_id> would fall into the
OTHERWISE
block of the
CASE
statement and run an IP called
special-set-attribute
in some other procedure. But
we don't know what's going on
for you because we don't know what code this handle "h_q-debtordiary" actually points to or what it does.
Having said all that, I don't think the above is your main problem. Rather, I think it is one symptom of your problem. And likely next week or next month, you'll have some other manifestation of this problem where you scratch your head and wonder "why the heck is my code doing what it's doing?"
Your problem is that you are trying to debug your code but you are doing it with poor man's tools, like
MESSAGE
statements, or maybe
ETIME
and the like. I've been there. I started in an organization where what you are currently doing was considered "debugging" and no one knew or used the debugging and diagnostic tools available in the OE platform. That old approach is time-consuming and frustrating and very limiting. But if you have the right tools and learn to use them it can be a lot quicker and easier. It might take you some time to accomplish this, and maybe you'll have challenges like getting licenses or learning to be productive with the tools, but it is well worth the time investment.
Launch your code from a properly-configured debugger and put a breakpoint at your
RUN
statement; you will see where "h_q-debtordiary" leads and what it does with its parameter. As you step through the code you will see your AVM state change, line by line, including record buffers going in and out of scope. It should quickly become obvious what is happening to your debtor record.