According to this KB: https://knowledgebase.progress.com/articles/Article/000036646
the following code snippet should be legal:
/* *************************** Main Block *************************** */ TRIGGER PROCEDURE FOR WRITE OF {&arg1}.{&arg2} NEW BUFFER upd{&arg2} OLD BUFFER orig{&arg2}.
However, the compiler is throwing the following error: Multiple markers at this line - ** Unable to understand after -- "TRIGGER". (247) - ** Invalid statement. (254) - **
Use Case: I am attempting to create a 'write trigger' template that will be used to create custom Write event procedures for every table in our DB schema.
I am passing the database-name {&arg1} and the table-name {&arg2}.
Does anyone have an suggestions on the syntax for the line of code above? Is this even doable anymore in OE 11.7?
Software Versions:
OpenEdge Developer 11.7 x64
Win10 x64
So, I have resolved this issue. The root cause for the error in the dot-I file was my own ignorance. The content of the include file was correct; the issue was with the partial implementation of the line of execution in the class that was using the include file. Once I realized this, it was able to resolve the datatypes/values for the arguments in the class including this content.
How and when are you passing the arguments ?
The line of code itself is fine, as it works when you explicitly define the arguments in the same file (assuming you do have a sports2000 connected of course):
&SCOPED-DEFINE arg1 sports2000 &SCOPED-DEFINE arg2 customer TRIGGER PROCEDURE FOR WRITE OF {&arg1}.{&arg2} NEW BUFFER upd{&arg2} OLD BUFFER orig{&arg2}.
so the problem must be in how the arguments get set up.
Hi Rom,
Is the code above an include file, which is being included into a program that provides values for the arguments, or are you trying to compile it as is?
Ken
Hi Ken,
The code snippet is in an *.i file and being included into a program that provides values for the arguments.
I'd suggest logging a case with support. It would be helpful to get your schema definition and the code (including the program you're compiling the .i into) that's failing.
I've tried this and can't get it to error.
Ken, it should not matter that I'm writing this code using OE Developer?
No, not at all. As long as the path is correct, and the database is connected.
You're referring to Developer Studio. Right?
stupid question perhaps, but are you trying to compile the .i or the .p that's including the .i
The .i should not compile on it's own. If before you used the appbuilder, you didn't have an "auto compile" option. But perhaps the PDS settings are set to also compile .i files giving you that error.
show us the .i arguments
So, I have resolved this issue. The root cause for the error in the dot-I file was my own ignorance. The content of the include file was correct; the issue was with the partial implementation of the line of execution in the class that was using the include file. Once I realized this, it was able to resolve the datatypes/values for the arguments in the class including this content.