I would like to create the macro the refresh every several mins to monitor the job status, once "MSGW" appears the macro should know "beep" me.. then I can do other things without monitoring the session all the time. The tech points is that I dont know how to compare the strings in the screen and don't know how to trigger beep in the macro..
I've coded the sample to prompt message for message wait job, but I do want to "Beep". anyone know it? the current screen will be on the work job screen, e.g. wrkusrjob xxx *active. then this macro is applied to monitor this screen.. by refreshing every 3 secs, prompts warning ifmessage wait job found.
[PCOMM SCRIPT HEADER]
[PCOMM SCRIPT SOURCE]
REM This line calls the macro subroutine
Dim MsgRow, MsgCol
MsgInd = False
MsgRow = 1
MsgCol = 1
MsgBody = "prompt message"
Do while MsgInd=False
MsgInd = autECLSession.autECLPS.SearchText("MSGW",1,MsgRow,MsgCol)
If MsgInd Then
MsgJob = autECLSession.autECLPS.GetText(MsgRow, 7, 10)
Msgbox MsgBody,,"Batch Monitor"