I have one main module that contains the XML generate statement and the submodule does the XML parsing. I have open and close statments for the output files in both the modules and write the XML data in the output file in the called module. Since it calls the submodule so many times, the job took much time to complete. I tried removing the open and close statements in called module and retain only write statements in the called module. But i got the protection exception. Could anyone help me on this?
Sub Module: XXXXSUB
XML GENERATE WS-XML-OUTPUT-DATA
COUNT IN WS-XML-CHAR-COUNT.
XML PARSING IN SUBMODULE:
XML PARSE XXXXSUB-XML-IN-REC
PROCESSING PROCEDURE 03100-XML-PARSE
DISPLAY 'PROBLEM IN ' XXXXSUB-PGM-NAME
DISPLAY 'XML ERROR CODE: ' XML-CODE
DISPLAY 'XML RECORD: ' XXXXSUB-XML-IN-REC
Is there any option to reduce the running time and space?