Hi everybody
We run a traditional data warehouse with several thousand jobs built in DI Studio and a lot of stored processes. There is a lot of user written code stored in SAS metadata, and we want to extract the SAS source code from SAS metadata TextStore and store it in disk files, which makes it much easier to scan for used macros, file names etc. There are about 2000 entries containing user written code from DI Studio transformations, pre- and post-process code and code used in Stored processes.
I use an automated process flow that extracts metadata to XML, reads the xml file into a SAS data sets using a XML MAP and - in a flllowing data step - formats the StoredText content to SAS programs and writes each entry to a disk file with the TextStore ID as file name. The link between files and jobs/transformations are maintained in tables, which are written along with the extraction.
It works very well. But some entries are longer than 32k, and they are truncated when read into the SAS data set. There seems to be no workaround like using the XML map to split the long texts in several records, so I have not figured out how to get content beyond the 32k limit out in disk files.
I hope someone has a good idea to solve this problem.
Sadly I can't offer help, but SAS should seriously work on lifting the limits for character variable length and metadata length.
The increase from 200 to 32k is 20 years old.
Thanks to LinusH !
Stupid I did'nt think of that myself. Of course the texts can be extracted from Metadata tables, and for my purpose a libname to the most recent backup is sufficient. I ran into a problem with transcoding danish national characters from Unicode, but that can be solved.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.