BookmarkSubscribeRSS Feed
alepage
Barite | Level 11

Hello,

 

I need to modify an old program.  It uses around 4000 lines of codes to gather data from many datasets.  I am quite sure there is a better way to do this.

 

To gain time, I would like profit from the expertise of the SAS experts and pick directly the best method to gather data from many datasets to produce a pdf report at the end. It also could be a global table.

 

Could you share your suggestions with me?

Regards,

 

Alain

5 REPLIES 5
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Really going to be hard to give any information here.  No idea what any of that data format is, what mapping processes need to be done it, what outputs need to be, what systems we are talking about etc.  I would suggest you start by mapping out, in a migration document, all the various input types (CSV, Excel, databases etc.) what attached documentation you have for them, i.e. specifications you have on those datasets for format etc.  Then look at the code, review what is needed, assess newer methodologies for importing data etc.

Migrating existing code is not as simple as just changing some things, re-validation and testing, documentation, user notification and training etc.

Reeza
Super User

Sometimes you can and sometimes you can't.  I lean towards the second if it's data different data sets. 

 

First, evaluate and document the input data. If the input data cannot be combined somehow it's unlikely you can improve this process. 

Second, look at the code. Are there repetitive sections? If so, you can look at either creating a macro or simplifying somehow... 

Third, document your requirements and start a design from scratch. Evaluate how much time your conversion/modifications will take to see if it's worth the effort first.

Kurt_Bremser
Super User

- know your data. Get a grip on input structures, see where they are similar, so you can identify spots to re-use code

- know your code. Bring it into solid visual form, so you can get a grip on the logic. Good formatting makes identifying repeating or repeatable sections of code easier

 

Once you have solved these two points, you can decide if there is room for optimization, and where. For how, you can get back here.

sas-innovate-2024.png

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.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 982 views
  • 0 likes
  • 4 in conversation