BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
lola
Calcite | Level 5

Using inherited code, created a large (6.5m KB) text file, that is too large to open in notepad or word pad. It will be forwarded as a backup file to institutions requesting the data. How do I open it to view what they will receive or more to the point how will they open it?

I reviewed the set file but not meaningful. I want to review the file content. Help?

1 ACCEPTED SOLUTION

Accepted Solutions
Astounding
PROC Star

I think what PG Stats is referring to is that you can mark the answers you receive as "Correct" or "Helpful".  Those who provide answers look forward to getting that form of feedback.

Here's a quick and dirty way to examine a portion of a file, using SAS:

data _null_;

  infile 'path to file';

  input;

  if _n_ < 1000 then list;

  else stop;

run;

You can easily change the range of rows to examine, such as:

if (20050 <= _n_ <= 20923) then list;

else if _n_ > 20923 then stop;

Good luck.

View solution in original post

23 REPLIES 23
PGStats
Opal | Level 21

Given that no one ever provides a correct answer to your questions, I'm not even going to try. - PG

PG
lola
Calcite | Level 5

I am unsure about your response, but thank you for replying.

I have gotten many great answers and correct direction on this forum. If my gratefulness has not been clear, I readily provide now. Thanks again.

Astounding
PROC Star

I think what PG Stats is referring to is that you can mark the answers you receive as "Correct" or "Helpful".  Those who provide answers look forward to getting that form of feedback.

Here's a quick and dirty way to examine a portion of a file, using SAS:

data _null_;

  infile 'path to file';

  input;

  if _n_ < 1000 then list;

  else stop;

run;

You can easily change the range of rows to examine, such as:

if (20050 <= _n_ <= 20923) then list;

else if _n_ > 20923 then stop;

Good luck.

lola
Calcite | Level 5

Thanks so much for letting me know about how to best provide feedback! I will do that first here now and then get back to your message. Smiley Happy

lola
Calcite | Level 5

I only see "reply" and "Liked" as available options, so used those. Do not see "correct" or "helpful." I will explore that/those later. Thanks again.

Reeza
Super User

Go to the main discussion page, not the update/summary page to see those options.

Community_Help
SAS Employee

Hi lola, thanks for being part of this community - and Welcome!

Thank you all for wanting to mark answers correct/helpful.. and thank you to you all for helping lola. If you have any questions just let me know. Smiley Happy

Peter_C
Rhodochrosite | Level 12

Iola

if you have base SAS (not Enterprise Guide and not SAS Studio) you can easily open that file with code

PROC FSLIST FILE= "your very large file" ;

RUN ;

lola
Calcite | Level 5

Yes, base sas. Thank you!

lola
Calcite | Level 5

Peter, so I tried:

PROC FSLIST FILE= "D:\Users\\xyz.txt" ;

RUN ;

The program continues to run for a very long time. The prgm to generate took an hour, so I let this run an hour and it says it is still running, but I can click and make changes in the program, so apparently not. Any detectable syntax issue? Or am I missing a no-brainer? Thank you.

lola
Calcite | Level 5

Update: these are a series of programs that can be run in two sequences. The next in one sequence actually uses that txt file data, thus my answer. Thank you!!!

lola
Calcite | Level 5

I should add that a separate window with the name FSLIST: 😧 pathname  does generate and a blank slate. Thank you.

lola
Calcite | Level 5

Astounding, this worked well. Thanks. It increased my confidence in the data, however I still would like to be able to open macro data file. Thanks so much.

Reeza
Super User

lola wrote:

created a large (6.5m KB) text file, that is too large to open in notepad or word pad.

What is that, 6.5 MB? 6.5 GB? 

Try Notepad++, or use unix commands such as head to look at a few lines at a time.

You can also look into grep if you're looking for particular fields.

The best thing to do is actually run the process that would generate a test file and then run your big file once you're sure it's what you need.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 23 replies
  • 1634 views
  • 17 likes
  • 9 in conversation