IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

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


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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: 3156
Location: Tucson AZ

PostPosted: Thu Apr 19, 2007 4:57 pm
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Apr 19, 2007 6:26 pm
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

Global Moderator


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

PostPosted: Thu Apr 19, 2007 8:22 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 4
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top