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.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

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