OPS/MVS

 View Only
  • 1.  Getting MSGID on every line of an Ops/MVS MLWTO?

    Posted Feb 07, 2018 09:07 AM

    I'm trying to test a rule that will process a Connect:Direct message, so I have a little exec that issues an MLWTO to simulate the message. However, when the 4-line MLWTO is issued, the msgid I specify only comes out on the first line - the next 3 lines don;t have the msgid. The original Connect:Direct message has the msg is prefixing every line.

     

    Looking at other MLWTOs issued by various products, whether or not the msgid prefixes every line seems to be down tot he individual product - I know that z/OS's WTO macro does have separate field for the the msgid amd the message text, so if you want to put msgid on each WTO so be it.

     

    However, the Ops/MVS ADDRESS WTO takes a msgid parm and also a stem for each wto to be issued. It appends teh value in the msgid parm to the front fo the 1st WTO issued, but not the other lines, so you have the add teh msgid yourself manually.

     

    Should Ops/MVS's ADDRESS WTO command have an option to specify if the msgid is on every line or just the first?



  • 2.  Re: Getting MSGID on every line of an Ops/MVS MLWTO?

    Broadcom Employee
    Posted Feb 08, 2018 05:26 AM

    Hi Steve,

    There is a MLWTO parameter on the Message Rule event statement :

     

    )MSG msgidspec [MLWTO] [AUTO | NOAUTO] [NOOPSLOG] [SUPPRESS]

     

    MLWTO 
    (Optional) To be specified when interrogating a multi-line message and each data line is needed to be stored in stemmed msg.text.n variables for further manipulation. Rule will process after the end-line of the multi-line message is received. Wildcarding is not allowed if utilizing this keyword. Therefore the msgidspec must be that of the complete message ID of the multi-line message. For more information, see Execution Considerations for Msg Rules for details about processing multi-line messages.

     

    Please check if this answers your question..

    See the CA OPS/MVS manual :

    https://docops.ca.com/ca-opsmvs-12-3/en/using/using-automated-operations-facility-aof-rules/coding-each-aof-rule-type/message-rules/installation-requirements-for-msg-rules

     

    Best regards,

    Hennie Hermans

    Principal Support Engineer

    CA Technologies



  • 3.  Re: Getting MSGID on every line of an Ops/MVS MLWTO?

    Posted Feb 08, 2018 09:20 AM

    Hi Hennie,

     

    Sorry - I don't think I explained correctly. This is the message we want to trap:

     

    09.30.50 STC26813 SVTM052I COPY001 COPY SANFD002( 8,007) PNODE=OS16 989
    989 SVTM052I FROM XFR.PRD.PAR.SAV.FACT.R2.D180204
    989 SVTM052I TO VPPN.B8.SANFD002.FPS.PAYMENTS.PS.G0001V00
    989 SVTM052I COMPLETED 00000000/SCPA000I

    to test my new rule, I wrote the following in a little OpsEXEC:

    msgid = "SVTM052I"
    wto.1 = "COPY001 COPY SANFD002(8,007) PNODE=JHB-MWAY-PRD2 "
    wto.2 = " FROM FROM.DATASET "
    wto.3 = " TO TO.DATASET "
    wto.4 = " COMPLETED 00000000/SCPA000I "
    wto.0 = 4

    Address WTO "Msgid("||msgid||") Textvar(wto.) Route(1)"

    except that this produces:

    13.56.10 TSU14419 SVTM052I COPY001 COPY SANFD002(8,007) PNODE=JHB-MWAY-PRD2 826
    826 FROM FROM.DATASET
    826 TO TO.DATASET
    826 COMPLETED 00000000/SCPA000I

    where the 2nd, 3rd and 4th lines of the MLWTO don't have the MSGID on them, which is causing my )MSG rule to fail, as I'm looking for the text

    'SVTM052I COMPLETED 00000000/SCPA000I'

     in msg.text.4. Now I think that whether or not each line of an MLWTO has the message id is down to the programmer who constructs the WTO, so I could update my exec to manually add the MSGID to each line, but I'd like to know exactly whats going on.



  • 4.  Re: Getting MSGID on every line of an Ops/MVS MLWTO?
    Best Answer

    Posted Feb 08, 2018 09:33 AM

    To add to Hennie's response: Be sure to check the OPSFLAGS bits for your CD message to make sure it is a true MLWTO otherwise the MLWTO parameter will not work. Also, I never include the message ID in the text I am looking for in a message rule because as you found out, sometimes it is there and sometimes it is not. Additionally, if you look in the OPSLOG, you will see that even if each line isn't prefixed by the message ID, the message ID is still attached to each line which means your message rule (without MLWTO) will fire on each line of the message.

     

    As for the ADDRESS WTO, I have seen the exact same thing you have described. I just chalked it up to how CA implemented things but I think that even if you call the WTO macro directly, it ends up the same.



  • 5.  Re: Getting MSGID on every line of an Ops/MVS MLWTO?

    Posted Feb 08, 2018 10:05 AM

    Hi Travi,

     

    It's definitely a true MLWTO that I'm trapping, it's just the test on line 4 that is failing. If I do:

     

    msgid = "SVTM052I"
    wto.1 = "COPY001 COPY SANFD002(8,007) PNODE=JHB-MWAY-PRD2 "
    wto.2 = msgid " FROM FROM.DATASET "
    wto.3 = msgid " TO TO.DATASET "
    wto.4 = msgid " COMPLETED 00000000/SCPA000I "
    wto.0 = 4

    Address WTO "Msgid("msgid") Textvar(wto.) Route(1)"

    then it works, so this may be the best approach.



  • 6.  Re: Getting MSGID on every line of an Ops/MVS MLWTO?

    Posted Feb 08, 2018 10:33 AM

    Right, that works because you attach the message ID to the front of the message text just as it is in the CD message, however, as I mentioned, I don't include the message ID when I look at text in any message I am trapping. One reason is of course the message ID being there or not and the other is because by virtue of the message rule firing I already know that the message ID has been detected so why include that in the test of the message text? Unless there is a specific reason you need to test for the message ID in the message text, I would just leave it out of your compare as there is no reason to look for it again. So in your case I would look for the text:

     

    "COMPLETED 00000000/SCPA000I"

     

    and that is all. You can use the POS() function to do this.

     

    IF POS("COMPLETED 00000000/SCPA000I",MSG.TEXT) > 0 THEN...