Thank you ! it works great !!
I just needed to tweak it to add a space after the 3 and before the S ----- parse(record,'$HASP373 ',' STARTED')
------------------------------
Joseph Sumi
------------------------------
Original Message:
Sent: Mon March 27, 2023 10:15 AM
From: RENE van TIL
Subject: z/Alert - WTO
Hi joe
Alerts 1804/1805/1806 do something similar so i took these as a sample
)SETF C2PXNAME = &STR(JOBSTART)
)SETF C2PXMSG = &STR('Job' jobname(0) 'is gestart')
)SETF C2PXDES = &STR('Heb hem gestart')
)CM Pass one query
)SEL &C2PEPASS = Y
)ENDSEL
)CM Alert condition
)SEL &C2PEPASS = N
)IM C2PSGNEW
define type=WTO jobname(8,char) as parse(record,'$HASP373','STARTED')
)DEFAULT )&?!<|>
select likelist=WTOrec msgid=($HASP373),
JOBNAME=(*)
So using this define in an alert the WTO shows for message "14:56:24.54 JOB00794 00000090 $HASP373 CRMBRT1A STARTED - INIT A - CLASS A - SYS 8018 "
C2P4801I Job CRMBRT1A is gestart
hope this helps
cheers
rene
------------------------------
Rene van Til
Original Message:
Sent: Mon March 27, 2023 09:03 AM
From: Joseph Sumi
Subject: z/Alert - WTO
Hello - I created an Alert for a WTO ($HASP373). I want to have additional selection criteria so I can trigger the alert for a specific jobname (or even a specific class.) How can I parse the message to define a "jobname" so i can select on it ? I've looked at the code generated by the WTO alert but not seeing a way to do this.
thanks, Joe
------------------------------
Joseph Sumi
------------------------------