Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
XML Parse for large file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
muralikrishnan_new

New User


Joined: 02 Jun 2013
Posts: 15
Location: India

PostPosted: Mon Jun 12, 2017 12:50 pm    Post subject: XML Parse for large file
Reply with quote

Hi All,
We are reading a xml documents from variable length file(LRECL=32004 i.e 32K file length).
We observed an issue when the xml content filled with 32000 bytes per line as mentioned below, and the second line starts with the
continuation of the xml tag.
?xml version='1.0' encoding='UTF-8'?><batch xmlns="www.bank.com"><batch-info id="doc_bank_20170518"><batch:sender-identifier>kbc</batch>
</batch-info><documents><documenturl="hasgh://ajhjk@yeuhd/jsdgfhgsdhfgsdhg_1"><lname>Murali</lname><Dept><Team>Development Delivery</Team><Project-
Role>Developer</project-Role></Dept></documents></batch>

a) We tried using only XML-PARSE operation and processing it. It was working fine.
b) But we check validation against a data on DB2 table using SQL, when we parse the second record the Start of Element of not captured in XML-EVENT
instead it skipped the <Project-Role> and capturing as END-OF-Document at first record end byte and next record it says as START-OF-DOCUMENT and throws an "EXCEPTION"
XML-CODE = 0000798819

But when we remove the SQL statement and do the processing , it works fine.

Do we have any logging dataset to capture the XML-PARSE for each element?
Whether it has to do with any memory allocation of the program?
Please help me to resolve the issue. Meanwhile i will try to post if i found anything more
Back to top
View user's profile Send private message

Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1925
Location: UK

PostPosted: Mon Jun 12, 2017 2:13 pm    Post subject:
Reply with quote

How can you have a second record when your "file" length = record length = 32004? I guess you may have meant 'data set' not 'file' and you were just confusing everyone by saying the data set length was 32k.

If you were running on a mainframe no exception was 'thrown' - nothing is 'thrown' on the msainframe in z/os - maybe z/Linux but not on the MVS part of the machine.

You have logging if you wrote it. I guess you screwed up the code change to add the sql.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8189
Location: East Dubuque, Illinois, USA

PostPosted: Mon Jun 12, 2017 4:56 pm    Post subject: Reply to: XML Parse for large file
Reply with quote

The issue has nothing to do with memory allocation -- period.

If you want to log your XML processing by using DISPLAY statements, you have that option. There is no logging of XML inherent in COBOL, however.

The OBVIOUS answer is that you (or whoever coded the SQL statements) screwed up the processing logic and caused the issue. Debug the added code and stop trying to blame the system for a programmer mistake.
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1819
Location: NY,USA

PostPosted: Mon Jun 12, 2017 10:26 pm    Post subject:
Reply with quote

Check it out, if this link helps.
http://ibmmainframes.com/about60662.html
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Moving a PS file as body of a mail! Vignesh Sid JCL & VSAM 4 Tue Nov 21, 2017 9:23 pm
No new posts unable to set RC = 4 when empty file migusd SYNCSORT 1 Tue Nov 21, 2017 1:21 am
No new posts VBS and VB, COBOL syntax is the same ... natt.sut COBOL Programming 3 Sun Nov 12, 2017 6:36 am
No new posts Updating data from one file to other!!! Vignesh Sid SYNCSORT 1 Mon Nov 06, 2017 2:42 pm
This topic is locked: you cannot edit posts or make replies. Need help how to pass the ESP variabl... Venkichaitu JCL & VSAM 12 Thu Nov 02, 2017 3:53 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us