Service Virtualization

 View Only
  • 1.  Mapping File Issue for COBOL message

    Posted Jul 20, 2021 07:25 AM
    Hi All,

    I am new to CA Devtest and looking for support on an issue that I have been facing as part of a POC implementation.
    We have a scenario with below details
    1. Transport -MQ
    2. Message Type - COBOL
    3. 1 Request and 2 response on the same queue

    We have a complex structure of the cobol message with multiple copybooks to map it.
    To start with, I am trying to parse data corresponding to a single copybook to build my understanding around mapping file so that I can develop it to parse the complex request and responses. 

    Please refer attachments to see mapping file, data and copybook.
    Approach: Upload RR pair
    Using the approach "Create VS Image by RR pairs", I am getting the below error in the last window. DPH used: "Copybook DPH" for both request and response
    I am getting error: "java.lang.Runtime Exception: Could not convert payload back to raw for copybook[INP-TYP-ID]. The record name element for the copybook does not appear to be a grouping"

    When I removed the entry for response paylaod in mapping file, the VS image gets created but null is coming in Transaction window for "Request" as mentioned below:
    body_INP-TYP-ID_1: <null>
    body_INP-TYP-ID_2: <null>

    It seems the data is not getting mapped to copybook.
    I have ensured to have six spaces before field starts in copybook file. Same column(6) I have mentioned while configuring service in the window"Configure How to parse the copybook"
    Could you please help me to pinpoint what is wrong with my mapping file. I have tried multiple permutations and combinations but they are not working.

    Note: To keep things simple I am using common data and copybook file for both request and response.

    Attachment(s)

    txt
    mapping file.txt   504 B 1 version
    txt
    copybook.txt   88 B 1 version
    txt
    Cobol-res.txt   8 B 1 version
    txt
    Cobol-req.txt   8 B 1 version


  • 2.  RE: Mapping File Issue for COBOL message

    Posted Sep 21, 2021 10:55 AM
    Hi Jyotsna,

    Your mapping file is not a valid XML, its is not having proper closing tag for <payloads>. In line 13 instead of <payloads> it should be </payloads>

    Also, check your copybook definition's indentation as well, I use as below:


    After changing these, I was able to process your message


    Hope this helps. 

    Thanks



    ------------------------------
    Regards,
    Vaibhav Jain
    Capgemini
    ------------------------------