BookmarkSubscribeRSS Feed
jdmarshg
Obsidian | Level 7

Is there a way to skp the last row of data within a data file using SAS DI Studio? 

 

 

Regards,

Jonathan

3 REPLIES 3
LinusH
Tourmaline | Level 20

If the source data is in a flatfile, you can tweak the User Written file object to do this:

https://communities.sas.com/t5/SAS-Data-Management/How-to-get-rid-of-the-last-record-while-reading-a...

 

For tables/SAS data sets, you probably nee to do a user written code (transformation, or in a pre/post code).

Data never sleeps
jdmarshg
Obsidian | Level 7

That sounds like a good solution but we do not have write access to the file to change it. 

The file reader is being used to read in the data. 

I will look into using the user written code to remove the last row from the data source.

 

Regards,

Jonathan

jdmarshg
Obsidian | Level 7

Disregard last statement. 

Testing concept. 

 

Regards,

Jonathan

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!

How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 1093 views
  • 0 likes
  • 2 in conversation