Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Solution to split the XML in the 3rd file into multiple file

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

New User


Joined: 29 Jun 2006
Posts: 5

PostPosted: Thu Apr 19, 2007 4:02 pm    Post subject: Solution to split the XML in the 3rd file into multiple file
Reply with quote

I have a COBOL program which reads a file with zip code in it and appends it to a template file which is a XML template file and creates the output in a different file.

My problem is I have thousands of zip codes in the input file and my program is appending it to the template and every new version of this XML is getting appended to the o/p file.

I need a solution to split the XML in the 3rd file into multiple files. Experts any thoughts on this!!!

PS: standard XML length is say 52 lines or 52 records
Back to top
View user's profile Send private message

William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Thu Apr 19, 2007 4:57 pm    Post subject:
Reply with quote

You have a COBOL program, you can change its behavior?
Your thousands of zip codes are creating thousands of XML records?
You need to split the (thousands?) of XML records to a third file or into 3 files?
Your XML has a standard length?
Back to top
View user's profile Send private message
Hari108
Currently Banned

New User


Joined: 29 Jun 2006
Posts: 5

PostPosted: Thu Apr 19, 2007 5:44 pm    Post subject:
Reply with quote

1. No, I can't change the programs behavior
2. Yes, It is creating thousands of XML's after inserting the zip code into a particular attribute value of the XML template.
3&4. I need to split 1000 XML's (1 XML is of 52 records, each record is of length 250 this is standard) into 1000 different files or any other way which will be best by which i can download it straight to my PC.

I tried with SPLITBY=52 option, but i had to give n no. of OUTFIL to generate n no. of XML files icon_sad.gif

I was able to seperate the master file with 20 XML's ...but it was time consuming icon_sad.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Thu Apr 19, 2007 6:26 pm    Post subject: Re: Split a large file
Reply with quote

given the number of splitted files, it would be much simpler to download to the pc the whole file, and do the splitting on the PC;
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Thu Apr 19, 2007 8:22 pm    Post subject: Re: Solution to split the XML in the 3rd file into multiple
Reply with quote

My thoughts:

- Instead of cataloging 1000 datasets, maybe it would be better to create a PDS with 1000 members.

- I'm pretty sure that you can use DFSORT to generate an output dataset of all the required DD statements necessary to split the input into. This would be able to dynamically determine how many output DD statements would be needed based on the input. This would, of course, require that this output dataset be used in a subsequent job that would actually do the splits.

- Create a program that can properly split the dataset and dynamically create all of the necessary output datasets (or PDS members).
Back to top
View user's profile Send private message
Hari108
Currently Banned

New User


Joined: 29 Jun 2006
Posts: 5

PostPosted: Mon Apr 23, 2007 12:15 pm    Post subject:
Reply with quote

Thanks for your thoughts folks icon_smile.gif
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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 11 Tue May 16, 2017 2:20 pm
No new posts Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us