I have a pretty basic routine that reads the contents of a text file. The routine does work successfully, but it appears if I enable "Automatically handle activities that fail" in my sequence job properties, this sequence causes the job's exception handler to trigger, even though it was in fact successful at reading the file. The code for the routine is as follows:
Code: Select all
Routine = 'ReadFile'
vFileName = Arg1
vArray = ''
vCounter = 0
OPENSEQ vFileName to vFileHandle
Else Call DSLogFatal("Error opening file list: ":vFileName,Routine)
Loop
While READSEQ vLine FROM vFileHandle
vCounter = vCounter + 1
vArray<vCounter,1> = Fields(vLine,',',1)
vArray<vCounter,2> = Fields(vLine,',',2)
vArray<vCounter,3> = Fields(vLine,',',3)
Repeat
CLOSESEQ vFileHandle
Ans = vArray
- WireXchange_Processor..JobControl (@Coordinator): Summary of sequence run
12:36:47: Sequence started
12:36:47: Wait_For_File (ROUTINE DSWaitForFile) started
12:36:47: Wait_For_File finished, reply=0
12:36:47: DateTime (JOB DateTimeToString) started
12:36:51: DateTime (JOB DateTimeToString) finished, status=1 [Finished OK]
12:36:52: Read_Date_Time_String (ROUTINE DSU.ReadFile) started
12:36:52: Read_Date_Time_String finished, reply=2018-01-03_1236_PM
12:36:52: Exception raised: @Read_Date_Time_String, Unhandled failure (2018-01-03_1236_PM ) encountered calling routine DSU.ReadFile
12:36:52: Exception handler started
12:36:52: Failure_Email (ROUTINE DSSendMail) started
12:36:52: Failure_Email finished, reply=0
12:36:52: Sequence finished OK