Class compile error 5475
I have a task that has been working successfully for some time now but when I attempt to recompiled I get this error:
--------------------------- Studio --------------------------- ERROR #5475: Error compiling routine: ACLIB.Utils.PurgeOrphanedMessages:PurgeOrphaned. Errors: ERROR: source lines(38) : MPP5610 : Referenced macro not defined: 'vaExtentGbl' TEXT: . Set segid=$G($$$vaExtentGbl(%tID,"segs",1),"0,0"), data=$S(segid[",":$G($$$vaSegment(segid)),1:$G($$$vaSegmentGbl(segid))), %C105172d(16)=$Case($$$vaDataSegName(data),"FHS":"FHS","BHS":"BHS",:$$$vaDataDocName(data)) ERROR: source lines(38) : MPP5610 : Referenced macro not defined: 'vaSegment' TEXT: . Set segid=$G($$$vaExtentGbl(%tID,"segs",1),"0,0"), data=$S(segid[",":$G($$$vaSegment(segid)),1:$G($$$vaSegmentGbl(segid))), %C105172d(16)=$Case($$$vaDataSegName(data),"FHS":"FHS","BHS":"BHS",:$$$vaDataDocName(data)) ERROR: source lines(38) : MPP5610 : Referenced macro not defined: 'vaSegmentGbl' TEXT: . Set segid=$G($$$vaExtentGbl(%tID,"segs",1),"0,0"), data=$S(segid[",":$G($$$vaSegment(segid)),1:$G($$$vaSegmentGbl(segid))), %C105172d(16)=$Case($$$vaDataSegName(data),"FHS":"FHS","BHS":"BHS",:$$$vaDataDocName(data)) ERROR: source lines(38) : MPP5610 : Referenced macro not defined: 'vaDataSegName' TEXT: . Set segid=$G($$$vaExtentGbl(%tID,"segs",1),"0,0"), data=$S(segid[",":$G($$$vaSegment(segid)),1:$G($$$vaSegmentGbl(segid))), %C105172d(16)=$Case($$$vaDataSegName(data),"FHS":"FHS","BHS":"BHS",:$$$vaDataDocName(data)) ERROR: source lines(38) : MPP5610 : Referenced macro not defined: 'vaDataDocName' TEXT: . Set segid=$G($$$vaExtentGbl(%tID,"segs",1),"0,0"), data=$S(segid[",":$G($$$vaSegment(segid)),1:$G($$$vaSegmentGbl(segid))), %C105172d(16)=$Case($$$vaDataSegName(data),"FHS":"FHS","BHS":"BHS",:$$$vaDataDocName(data)) --------------------------- OK ---------------------------
The error above is related to something I did not write, possibly from the
For this class, I just modified the SQL Statement to include 'AND Name NOT LIKE '%ACK%'. Here is the complete SQL statement.
&sql(DECLARE C1 CURSOR FOR
Select TOP :%tMaxCountToPurge ID, TimeCreated Into :%tID,:%tTimeCreated From EnsLib_HL7.Message
Where TimeCreated < :%tDoNotDeleteDate AND Name NOT LIKE '%ACK%'
Order By TimeCreated Asc)
Note that the query works correctly in the Terminal application.
When I debug the task, the error code indicated above appears in the INT file.
Do I need to recompile my Ensemble or %sySite classes? I am not certain what would have changed to cause the error; my simple addition to the WHERE condition should not cause this problem.
Thank you.
does it work if you revert to the original state?
Thank you for your reply.
I had to add EnsHL7 to the list of includes. It is interesting that this compiled previously without the reference.
It seems that you have lost the ????.inc the includes the definitions of
$$$vaExtentGbl
$$$vaSegment
$$$vaSegmentGbl
$$$vaDataSegName
$$$vaDataDocName
either you lost the related Include statement or the whole file is lost
So in Studio run a "search in files" over *.inc for
#Define vaExtentGbl
#Define vaSegment
#Define vaSegmentGbl
#Define vaDataSegName
#Define vaDataDocName
to find out which .inc you are missing.
The query you changed is totally unrelated to it, as far as it seems.
if your class inherits from some other the include may have gone there?
typically explained by: "We do not reference it here. "
Git remembers everything ;)
Right!
But without Git (several years back) . . . . . . . .
It's a matter of organization and discipline anyhow.
another way to explain your phenomenon:
I experienced such a case where the bomb was sleeping for 5 years.
Nobody remembered the change of a.INC and not the reason for the change.