AnsweredAssumed Answered

Run time Updation of the mainframe response

Question asked by sdabbiru on Dec 22, 2017
Latest reply on Jan 3, 2018 by sdabbiru

Hi All,

 

One of our mainframe transaction has has been upgraded from V1 to V2 with some 9 additional fields in the response copybook for different groups. I have a situation where I have few hundreds of these transactions and I cannot manually update all of them. Hence I have arrived at a solution where I have added a scriptable DPH before the response copybook filter. In this filter I have used the below line to extract the response from the response selection step which is in XML format 

String xmlRecords = testExec.parseInState(lisa_vse_response.getBodyAsString());

Then I used the DOM parser to parse this XML string and add the new fields to the required groups. (As this I felt easy to read the specific nodes and add the new fields accordingly).

 

Once I have added the fields, I created the transient response copy using the below code and passed the updated XML string.

 

com.itko.lisa.vse.stateful.model.TransientResponse r = new com.itko.lisa.vse.stateful.model.Response().createTransientCopy();
r.setBodyText(xmlRecords);
testExec.setStateObject("lisa.vse.response",r);

 

Now when the response copybook filter is getting implemented on this, I'm getting the below error and the copy book implementation is not happening. Instead of getting a fixed length response, I'm getting the XML which I have set in the above code.

 

Did not get a valid response object so we ignore processing this transaction.
java.lang.RuntimeException: Unable to convert the generic XML version of this response back to raw: <?xml version="1.0" encoding="UTF-8"?><copybook-payload>
<Body>
<OUTPUT-MESSAGE>
XXXXXXXXXXX - Copybook Msg
</OUTPUT-MESSAGE>
</Body>
</copybook-payload>

at com.itko.lisa.vse.stateful.protocol.copybook.CopybookDataProtocol.updateResponse(CopybookDataProtocol.java:614)
at com.itko.lisa.vse.stateful.common.DataProtocolStandardControlFilter.subPreFilter(DataProtocolStandardControlFilter.java:175)
at com.itko.lisa.test.FilterBaseImpl.subFilter(FilterBaseImpl.java:148)
at com.itko.lisa.test.FilterBaseImpl.preFilter(FilterBaseImpl.java:95)
at com.itko.lisa.test.TestNode.doFilters(TestNode.java:1464)
at com.itko.lisa.test.TestNode.doPreFilters(TestNode.java:1417)
at com.itko.lisa.test.TestNode.executeNode(TestNode.java:964)
at com.itko.lisa.test.TestCase.execute(TestCase.java:1288)
at com.itko.lisa.test.TestCase.execute(TestCase.java:1203)
at com.itko.lisa.test.TestCase.executeNextNode(TestCase.java:1188)
at com.itko.lisa.editor.WalkThruPanel.prepAndExecNode(WalkThruPanel.java:1058)
at com.itko.lisa.editor.WalkThruPanel.access$900(WalkThruPanel.java:71)
at com.itko.lisa.editor.WalkThruPanel$10.doCallback(WalkThruPanel.java:965)
at com.itko.util.swing.panels.ProcessingDialog$2.run(ProcessingDialog.java:194)
at java.lang.Thread.run(Unknown Source)

 

When I manually kept this updated XML string in the VSI , the copy book is able to parse it and generate the fixed length response. Not sure what is that I'm missing.

 

Any help is much appreciated.

 

Regards,

Shivakumar.

Outcomes