Portal | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
can we split the XML records using DFSORT?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
useit

Active User


Joined: 05 Oct 2006
Posts: 151

PostPosted: Fri Sep 19, 2014 4:29 pm    Post subject: can we split the XML records using DFSORT?
Reply with quote

hi,
can we split the XML records using DFSORT??.

say for example .

i have input file (FB,LRECL=32760).

a single line can contain multiple XMLS.

ex:

<?xml version="1.0" encoding="utf-8"?><xmldata1><?xml version="1.0" encoding="utf-8"?><xmldata2><?xml version="1.0" encoding="utf-8"?><xmldat3>

in the above example we have 3 xmls records in the same line. can we split this record into 3 single records??

my output should be:

<?xml version="1.0" encoding="utf-8"?><xmldata1>
<?xml version="1.0" encoding="utf-8"?><xmldata2>
<?xml version="1.0" encoding="utf-8"?><xmldata3>

Regds,
useit
Back to top
View user's profile Send private message

Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7312
Location: Inside the Matrix

PostPosted: Fri Sep 19, 2014 4:52 pm    Post subject: Reply to: can we split the XML records using DFSORT?
Reply with quote

What level of DFSORT do you have? How many is the maximum number of xml elements you can have on one record?

I suspect you'd be better off with something which can parse xml directly.
Back to top
View user's profile Send private message
useit

Active User


Joined: 05 Oct 2006
Posts: 151

PostPosted: Fri Sep 19, 2014 5:02 pm    Post subject:
Reply with quote

bill.
DFSORT version leve is VERSION 1.12.

The record length of the input XML dataset can be any value up to 32760.


Regds,
useit
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7312
Location: Inside the Matrix

PostPosted: Fri Sep 19, 2014 5:12 pm    Post subject: Reply to: can we split the XML records using DFSORT?
Reply with quote

You have said how many bytes are in a record already. I was wondering how many xml elements there may be on a record.

With your level of DFSORT, you only have 100 parsed fields available (2.1 has 1,000).

With 32760 bytes, you will easily have more than 100 elements potentially present. Possible that you have more than 1000.

Using 1000 parsed fields, or even 100, would be a lot of code.

Why do you want to split it up anyway?
Back to top
View user's profile Send private message
useit

Active User


Joined: 05 Oct 2006
Posts: 151

PostPosted: Fri Sep 19, 2014 5:37 pm    Post subject:
Reply with quote

i have built a COBOL test driver for DB2 stored procedures which use XML to pass data(common for all stored proc).in order to process as many input XML I wanted to split the record and read one by one until end of i put.
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts JCL to extract repeating records saikarthik94 DFSORT/ICETOOL 6 Mon Oct 05, 2020 8:05 pm
No new posts Join lines with dfsort kushkush DFSORT/ICETOOL 5 Mon Oct 05, 2020 12:16 pm
No new posts Read 4MB message and split into multi... myselfsk15 COBOL Programming 9 Fri Sep 25, 2020 7:24 am
No new posts Group selective VB records - Trailer ... Premnath_TJ DFSORT/ICETOOL 16 Sun Sep 13, 2020 3:38 am
This topic is locked: you cannot edit posts or make replies. SORT the records based on the second ... Ramsee SYNCSORT 1 Wed Aug 19, 2020 3:01 pm

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