04-27-2016 02:58 AM
I have a file that are extreamly large. Larger the 32.000.
I need SAS to read it, and the way i want it to do so is, that I expect to infile the first 32.000 bytes fine my tang <tag01> Then I will extract a new subset of the file starting with <tag01> and extracting to <tag02>, thereafter extract form <tag02> to <tag03> and so forth.
Thereafter I will drop som of the extracted segments and rebuild the file again. What I will leave out is some databloks, that are extreamly large, and when I rebuild the file the size is less the 32000.
04-27-2016 05:59 AM
Thanks for the advise, and you are totally right, it is a xml file. The problem is, that the file is to big for the SAS xml engine due to very big tatabloks. Therefore I will recuce the xml file by extracting the databloks and inserting a surogat-key instead. Thereby, when I read the xml file, I have a perfect dimensional model, with the databolks as my fact and the other datasets from the xml as my dimensions.
We are an organisation that is very SAS centric, therefore I will prefere to stick to SAS code.
04-27-2016 08:58 PM
04-27-2016 04:28 AM
As @Ksharp has stated it sounds like you are working with XML files. I would not recommend you try to read and modify these yourself, you can use the libname as @Ksharp has provided, and for more complex XML then the XML Mapper. However to properly work with XML data you would be far better off using software built to work with XML. There are plenty of paid/free ones out there:
XMLFox springs to mind. These allow you to alter/query/update XML files as if they were a database, i.e. searhing for tags, removing blocks etc.