BookmarkSubscribeRSS Feed
Hiandbye
Fluorite | Level 6

Hello, Is it possible to prepare a cleaner SAS code from DI studio that will exclude a lot of the autogenerated wrapper code

e.g.

%let etls_startTime = %sysfunc(datetime(),datetime.);
%let etls_recordsBefore = 0;
%let etls_recordsAfter = 0;

3 REPLIES 3
Hiandbye
Fluorite | Level 6

I tried the following but it didn't work: 

    if prxmatch('/^%let\\s+etls_.*;/i', strip(line)) then delete;
Patrick
Opal | Level 21

Your RegEx needs some amendment. Below should work.

data test;
	infile datalines4 truncover;
	input line $256.;
	if prxmatch('/^\%let etls_\w+.+;$/i', strip(line)) then delete;
	datalines4;
%let etls_startTime = %sysfunc(datetime(),datetime.);
%let etls_recordsBefore = 0;
%let etls_recordsAfter = 0;
;;;;

But as @MrSantos already advised, you should use the SAS  Content Assessment Tool with it's migration tools. 
What you're doing would only make sense if you wouldn't want to migrate to SAS Studio flows but to simple .sas programs ...but this would only make sense imho if the SAS Viya version you've licensed doesn't allow for the direct migration to SAS Studio Flow. 

MrSantos
SAS Employee

Hi,

 

Doing the migration of SAS DI jobs to SAS Viya manually the way you seem to be doing may not be the best option. Using the SAS  Content Assessment Tool to help manage the migration may save some time and help identify jobs that will migrate easily and jobs that will present difficulties. Here's a demo of a job migration using the Content Assessment Tool: https://youtu.be/IIxyUbdmZoM

 

Regards,

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 249 views
  • 0 likes
  • 3 in conversation