get-value is an user-defined function. As is pointed on this article, the results can be unpredictable Progress KB - User Defined Functions (UDF) in WHERE clauses (FIND , CAN-FIND or FOR EACH) can be unpredictable
This is wrong; "and xxpick_status = (if open-only = yes then rpt-stat)"; an "else" is mandatory on the sentence.
I would change it to:
and (open-only = FALSE OR xxpick_status = rpt-stat)
Other option, similar to your first code is:
and xxpick_status = (if open-only = yes then rpt-stat else...
1.-
REPEAT TRANSACTION:
<some stuff: read "n" record >
<some stuff: update "n" record >
END.
2.-
DO TRANSACTION:
REPEAT:
<some stuff read "n" record >
<some stuff: update "n" record >
END.
<some stuff: confirm all ok or undo >
END.
Something like this should work:
{mylockcode.i &table=yourtable
&translocklabel=TRANS_LOCK
&sometableupdates="yourtable.field=value"}
Don't forget to init your vars i-Retries=0, c-message="" etc
I don't see why you need the Temp-Table. So, I would remove the temp-table and use only Variables,
and replace
FOR EACH main.stock WHERE company = inputCompany AND loc-cd = inputDepot:
IF stock.prod-code = pProdCode THEN DO:
By
FOR EACH main.stock EXCLUSIVE-LOCK WHERE company =...
your device must be defined on Printer maintenance, if is not defined the output is sent to a ".prn" file.
if you don't want the warning message add batchrun = TRUE. before gpselout.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.