Hello James,
Post adding spl file, getting error against file as follows:
07/03 17:55:15.37 RH-CA-VM-03 spelsrvr 4412 ERROR script.y 3882 E:/PROGRA~2/CA/SERVIC~1/site/mods/majic/zEmailFromINIT.spl at (3) syntax error
07/03 17:55:15.37 RH-CA-VM-03 spelsrvr 4412 ERROR intpnoex.c 640 Error 1 processing Spell file E:/PROGRA~2/CA/SERVIC~1/site/mods/majic/zEmailFromINIT.spl
07/03 17:55:15.38 RH-CA-VM-03 spelsrvr 4412 FATAL spel_srvr.c 306 Could not parse files in E:/PROGRA~2/CA/SERVIC~1/site/mods/majic
Spl file is as followed:
string cr::zEmailFromINIT(...) // Arg: CR Persistent_id
{
//
// Get the INIT alg for a CR with description beginning "created via email interface by ",
// extract the alg description and extract the text from the label 'FROM_EMAIL=' to the end of the description.
//
string method;
method="cr::zEmailFromINIT";
// Find an INIT alg for this CR, with description starting with 'created via email interface by '
string inPersid;
inPersid = argv[0];
string theDesc;
object alg_list;
object theAlg;
int alg_count;
int alg_index;
int idxFrom;
string sFrom;
string theFROMlabel;
send_wait(0, top_object(), "call_attr", "alg", "sync_fetch", "RLIST_DYNAMIC",
format("call_req_id='%s' and type='INIT' and description like 'created via email interface by %'", inPersid),
1, 0);
if (msg_error())
{
logf(ERROR, "%s: Error on sync_fetch for INIT ALG for %s", method, inPersid);
return "";
}
alg_list = msg[0];
alg_count = msg[1];
if (alg_count <= 0)
{
logf(SIGNIFICANT, "%s: no INIT alg for email interface for %s", method, inPersid);
return "";
}
// Get the first (and should be the only) INIT with an email description
alg_index = 0;
send_wait(0, alg_list, "dob_by_index", "DEFAULT", alg_index, alg_index);
if (msg_error())
{
logf(ERROR, "%s: Error on dob_by_index for INIT ALG for %s, index %d: %s", method, inPersid, alg_index, msg[0]);
return "";
}
theAlg = msg[0];
theDesc = theAlg.description;
theFROMlabel = "FROM_EMAIL=";
idxFrom = sindex(theDesc, theFROMlabel);
if (idxFrom >= 0)
{
sFrom = substr(theDesc, idxFrom + strlen(theFROMlabel));
return sFrom;
}
else
{
logf(ERROR, "%s: FROM_EMAIL not found in INIT ALG for %s", method, inPersid);
return "";
}
}