After working through the open ticket I was able to determine a few things. First, there is only one important API variable for the CA7MSG event. This variable is API.TEXT and it does indeed contain the entire message from CA-7. Part of my issue was that I was using a WTO with TEXTVAR to display what was in the message and it ended up being too long for TEXTVAR resulting in a RC=120 and no display of any of the first line of the message. This lead me to believe that I was missing something. Second, the example of the SMF0-19 rule in the manual does work properly but a few things should be noted. The events that come from CA-7 generate an API event in CA-OPS for every line of a message but the API rule will pick up the entire message with the first event. What this results in is an API rule that fires multiple times for each event (if it is more than one line). When I had first coded my test rule (not using the SMF0-19 example), I saw displays of the message text from my WTO for every line of the message. When I went back and looked at the SMF0-19 example I realized that the SELECT statement in the rule was controlling how many times the rule actually did something. The rule still fired for every line of the message but because of the SELECT, it only did something if the message included the message id, SMF0-19 and because the entire message is included in the API.TEXT variable in the first API event including the message ID all you need to do is parse out the message ID and check if it is something you wish to process. If it is, you send it off to whatever is going to process it and if not you just exit out of the rule. Any subsequent line beyond the first will not have the message ID included and thus will never be processed. It is similar to how )MSG rules process multiline messages and the hoops you have to jump through to get the entire message. Message rules however have some extra information that makes their processing a bit easier to control. The API events do not include this information and I will be posting an IDEA topic for the API events to include similar information.
Simple Example of API Rule. This is what I am going to set up to process CA-7 events. The msg_txt variable could be parsed before passing it to the REXX if needed and may be recommended if the event text is lengthy. This actually should make dealing with automation for something like an ABEND much easier to deal with.
PARSE VAR API.TEXT msg_id msg_txt
WHEN msg_id = "insert id to process here" THEN DO
PARSE VAR msg_txt var1 var2 var3
parm2pass = var1 var3
ADDRESS OSF "OI P(insert REXX here) A("parm2pass")"