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.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.