BookmarkSubscribeRSS Feed
PhillipSherlock
Obsidian | Level 7

Hello, 

 

Someone sent me four programs with the .SAS extension. Each of the programs is between 2 and 4kb. The issue is that when I open them in both SAS 9.4 and Enterprise 7.15, they are empty. Might anyone know of a way to retrieve the programs?

 

Thank you for your time, 

Phil

13 REPLIES 13
SASKiwi
PROC Star

SAS programs are just text files. Try a file viewer like Notepad or Wordpad and see if that helps. 

PhillipSherlock
Obsidian | Level 7
Thank you for the suggestion. They are blank in notepad. I'm confused about how a file can be 4kb and still be blank.
jimbarbour
Meteorite | Level 14

Phil,

 

Try Notepad++ if you have it or maybe MS Word.  There might be some specialized text encoding going on that regular Notepad doesn't recognize and that SAS Display Manager and EG are not currently configured for.  Maybe there's some kind of double byte encoding being used?  Or maybe UTF or ?  Particularly if these files were sent from a country that uses a non-Roman alphabet, this may be the case.

 

Jim

jimbarbour
Meteorite | Level 14

@PhillipSherlock,

 

One other thought in addition to the one I mentioned above:  Try placing your cursor on the very first line and then pressing the "end" key.  It could be that all the carriage return/line feeds either got munged or are are being misinterpreted.  It doesn't sound like it, but it's something to check for.  I've seen files downloaded from, say, Unix to Windows that were transferred binary and thus the conversion from LF record terminators to CRLF record terminators never happened.  I've also seen files stored on mainframes with I think RECFM=U that were sent across and the lines were run into one line.  Not sure that is what is happening here, but it's something to check.  Try scrolling to the right as far as you can and see if anything shows up.

 

Jim

PhillipSherlock
Obsidian | Level 7
When I open the program in MS Word, I am seeing 43 rows of hollow rectangles.

What are my options for investigating/resolving coding issues?
jimbarbour
Meteorite | Level 14

@PhillipSherlock,

 

One thing you could try is to, in MS Word, highlight all the text.  Then try different fonts.  I've seen things sent in a font that turned up as odd shapes when the recipient didn't have the same font on their system.  Try a few different fonts after you've highlighted all the text and see if anything turns up.

 

As @SASKiwi suggested, you may have to get the files re-sent to you.  The sender should check them first to see if they can be read on the originating side.  Then, maybe put them into a Zip or gzip archive (depending on the environment) and re-send them.

 

Jim

 

PhillipSherlock
Obsidian | Level 7
Also, when I open the programs in Enterprise, I see the following:

N N N N N N ...
U U U U U U ...
L L L L L L ...
Kurt_Bremser
Super User

Notepad++ has an option to display certain special characters, and an option for hex display; use those to get a clue.

 

I would not be surprised if the files consisted entirely of hex null's.

SASKiwi
PROC Star

4000 space characters could do that. If none of the current suggestions help then get the sender to check what they sent in say Notepad to see if they have the same problem. Ask them to resend too.

Astounding
PROC Star

I would try to read the file as text using a SAS program.  This should give you some idea of what is really in there:

data _null_;
infile 'unreadable_program.sas';
input @;
list;
stop;
run;

That should give you the actual characters in the first line of the program.  Examine the log and see what is really in there.

jimbarbour
Meteorite | Level 14

@PhillipSherlock,

 

Any luck with this?  I suspect that indeed it is just a file of all nulls, but I'm curious if my font suggestion might have borne fruit (even though I don't consider it very likely).

 

Jim

PhillipSherlock
Obsidian | Level 7

Hi Jim,

 

Thank you for the suggestions! Unfortunately, your font suggestion did not bear good fruit because the program itself was rotten. 

 

Thank you for your time, 

Phil

jimbarbour
Meteorite | Level 14

I figured as much, but it was worth a shot.  Thanks for following up.

 

Jim

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
  • 13 replies
  • 1590 views
  • 1 like
  • 5 in conversation