BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Emma2021
Quartz | Level 8
I would like to import “D:\test1.csv” into sas and check the size, then compare with csv file from “C:\test.csv”.
If the test1 size is equal or larger than test.csv then save test1 as test.csv into the same folder otherwise keep looping import test1 until the size is equal or larger. It should break when the loop teachers 5 times.
How can I do that? Thank you.
1 ACCEPTED SOLUTION

Accepted Solutions
ChrisNZ
Tourmaline | Level 20

Use the finfo() function to obtain file size.

Use the fcopy() function to copy files.

View solution in original post

2 REPLIES 2
Reeza
Super User
By Size do you mean the # of rows/records?



ChrisNZ
Tourmaline | Level 20

Use the finfo() function to obtain file size.

Use the fcopy() function to copy files.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

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
  • 2 replies
  • 945 views
  • 1 like
  • 3 in conversation