Description
Initialize the daemon.
In this method everything is prepared for the proper functioning of the daemon.
Parameters
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
unused
program code (program/bxmldaemonprocessor.p)
<ANCESTOR-CODE>
/* Get Extra specific information for this Xml daemon */
<Q-1 run XmlDaemonInfo (all) (Read) (NoCache)
(input viFcDaemonId, (DaemonId)
output dataset tqXmlDaemonInfo) in BXmlDaemon >
find first tqXmlDaemonInfo no-error.
if not available tqXmlDaemonInfo
then do:
<M-2 run SetMessageInDaemonLog
(input trim(#T-8'The XML input daemon is not properly configured. Specific configuration is missing.':120(372)T-8#) (icMessage),
output viFcReturnSuper (oiReturnStatus)) in BXmlDaemonProcessor>
assign oiReturnStatus = -3.
return.
end.
/* Check if the input directory is valid */
assign file-info:file-name = tqXmlDaemonInfo.tcXmlDaemonDirectory.
if file-info:full-pathname = ? or
index(file-info:file-type, "D") = 0
then do:
<M-57 run SetMessageInDaemonLog
(input trim(#T-50'The XML input daemon is not properly configured.':255(958149980)T-50#) (icMessage),
output viFcReturnSuper (oiReturnStatus)) in BXmlDaemonProcessor>
<M-43 run SetMessageInDaemonLog
(input trim(subst(#T-81'The specified input directory (&1) is invalid.':255(248861450)T-81#, tqXmlDaemonInfo.tcXmlDaemonDirectory)) (icMessage),
output viFcReturnSuper (oiReturnStatus)) in BXmlDaemonProcessor>
assign oiReturnStatus = -3.
return.
end.
assign vcInputDirectory = trim(replace(tqXmlDaemonInfo.tcXmlDaemonDirectory, "~\":U, "/":U)).