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();


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>
XXXXXXXXXXX - Copybook Msg

at com.itko.lisa.vse.stateful.protocol.copybook.CopybookDataProtocol.updateResponse(
at com.itko.lisa.vse.stateful.common.DataProtocolStandardControlFilter.subPreFilter(
at com.itko.lisa.test.FilterBaseImpl.subFilter(
at com.itko.lisa.test.FilterBaseImpl.preFilter(
at com.itko.lisa.test.TestNode.doFilters(
at com.itko.lisa.test.TestNode.doPreFilters(
at com.itko.lisa.test.TestNode.executeNode(
at com.itko.lisa.test.TestCase.execute(
at com.itko.lisa.test.TestCase.execute(
at com.itko.lisa.test.TestCase.executeNextNode(
at com.itko.lisa.editor.WalkThruPanel.prepAndExecNode(
at com.itko.lisa.editor.WalkThruPanel.access$900(
at com.itko.lisa.editor.WalkThruPanel$10.doCallback(
at com.itko.util.swing.panels.ProcessingDialog$
at 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.