[Stackoverflow] [Progress OpenEdge ABL] progress openedge error 215 (create in for each block)

Status
Not open for further replies.
E

Ellen

Guest
I'm trying to write code for this scenario: Go through every customer (customer table) to see if they were members year 2018 (I find that info in the membership table, year field). If there is not a membership that year I want to create it (create customer).

My coding skills aren't great. I get error message 215 (not sure I can translate, but basically: create cannot be done on a 'each' modified post, something like that...).

This is the code I have tried: FOR EACH customer NO-LOCK, EACH membership: IF CAN-FIND (FIRST membership WHERE membership.year = 2019) THEN DO: LEAVE. END. ELSE DO: CREATE membership. ASSIGN membership.year = 2018 .... fill the rest of the table.... END. END.

Obviously I am doing it wrong. Suggestions would be very much appreciated!

Continue reading...
 
Status
Not open for further replies.
Top