A job to identify unused labels in application .
Here my label file is IFC
static void I4C_UnusedLabels(Args _args)
{
str 50 labelId;
int i;
int maxLabel = 2000;
xRefNames names;
XRefReferences ref;
{
str 50 labelId;
int i;
int maxLabel = 2000;
xRefNames names;
XRefReferences ref;
str info = “LabelId#LabelStr\n”
;
;
while (i <= maxLabel) {
labelId = “@IFC” + int2str(i);
// The particular label file.
select recid from names
where names.Name == labelid
exists join ref
where names.RecId == ref.xRefNameRecId;
labelId = “@IFC” + int2str(i);
// The particular label file.
select recid from names
where names.Name == labelid
exists join ref
where names.RecId == ref.xRefNameRecId;
if (! names.RecId)
{
info += strfmt(“%1#%2\n”, labelId,
{
info += strfmt(“%1#%2\n”, labelId,
SysLabel::labelId2String(labelId));
}
}
i++;
}
}
No comments:
Post a Comment