SAS Programming

DATA Step, Macro, Functions and more
BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.

A few of my colleagues and I have run into issues saving scripts while using SAS Studio. When saving (and occasionally when running) certain scripts, one of three things happens:

  1. The script saves/runs successfully with no error messages
  2. An error message pops up, and the file is not saved or the code not run:
    1. "null" error prompt
    2. "Unknown submission error" error prompt
  3. The script appears to save properly, but the file is in fact only partially saved.

 

When #3 above happens, it's easy to lose most of your script without knowing that there's an issue. This is obviously not good, and we end up spending more time backing up every file through some other method (like copying and pasting to Notepad) before attempting to save. We think we may have identified that the issue is related to text encoding, as certain formats or labels are created by copying and pasting text from other files like Excel, Word, or PDF documents. These errors do not occur with all scripts. Is this some sort of text encoding issue? It appears SAS Studio is using UTF-8, but saving the script through Notepad using UTF-8 encoding and the .sas extension does not fix the issue. 

 

Thanks,

 

Matt

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

I suspect without an a very explicit example such as the code file, the source document that text was copied from and pasted into the code file and the "corrupted" result that this forum won't provide a great deal of help. It sounds like a call to tech support where you can share all the details might be in order.

 

 

View solution in original post

7 REPLIES 7
Kurt_Bremser
Super User

If by "script" you mean a SAS program, then this

like Excel, Word, or PDF

is a complete no-go. NEVER (as in NEVER) use some kind of word processing for code. Always use the built-in editor of the environment you're coding in, or a proper text editor like Notepad++ or similar. Keep a loooong distance between your code files and anything that has text-processing capability.

matthew-masters
Calcite | Level 5

Thanks for you reply. The SAS code is always edited in the SAS Studio environment, never in other editors. The only thing that comes from other document types is format or labeling data-- these codebooks were created decades ago and saved in these formats. It would be possible, but entirely too time-consuming, to type information from these codebooks out by hand into the SAS editor, but my guess is that copying and pasting the information is somehow corrupting or introducing an error that the SAS Server is unable to solve. I may follow others' suggestions and reach out to support directly.

 

Thanks!

Reeza
Super User

You can copy your code from Word into NotePad++ and then show invisible characters. You'll see if there's any weird characters in the file that's causing issues. 

ballardw
Super User

I suspect without an a very explicit example such as the code file, the source document that text was copied from and pasted into the code file and the "corrupted" result that this forum won't provide a great deal of help. It sounds like a call to tech support where you can share all the details might be in order.

 

 

matthew-masters
Calcite | Level 5

I think you're right-- I was hoping that there was a simple solution that I was missing, or that this was a common issue (albeit I didn't see any existing topics on this). I'll reach out to support directly, thanks!

Reeza
Super User

Is this a custom SAS Studio installation? or On Demand?

Have you talked to SAS Tech Support?

matthew-masters
Calcite | Level 5

It is a SAS Studio installation, but I think the issue may be a bit too vague to solve here-- I will reach out to support as you suggest. Thanks!

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

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
  • 7 replies
  • 1346 views
  • 2 likes
  • 4 in conversation