I need to distinguish between these two cases:
1) abend (ABEND) after success (SUCC) => action1
>>every run ALEIDOCFAILCHECKEMAIL-028A SUCC 10 04:02 00:03 0 #J29703
>>every run ALEIDOCFAILCHECKEMAIL-028A ABEND 10 04:16 00:01 1 #J10616; <07:50
2) abend after abend => action2
>>every run FIGL-IE-D-0964-CITI_MT940 ABEND 10 02:29 00:02 1 #J28862
>>every run FIGL-IE-D-0964-CITI_MT940 ABEND 0 02:49 00:02 1 #J12900; &0:20
The ">> every run" lines are in 'inputfile'.
So what is needed here is the syntax to read the inputfile and if last line is ABEND with the entry above SUCC => action1, and if last line is ABEND with entry above also ABEND => action2.
Thank you for very much for your highly appreciated help.