Hello.
Every time I run the first piece of code in any script I get the following error: WARNING: No logical assign for filename _GSFNAME. Then I run the same piece of code and it runs. I even opened a blank tab and hit run and still got the error. It must be a setting in VIYA that is incorrect.
This is the log returned and the warning is at the end.
Thanks,
Deb
42 %LET _BASEURL=%NRQUOTE(%NRSTR(****)); /*REMOVED OUR URL*/
Log lines 5 and 6 contain code for a DATA step, but this step never executed (no messages). This means your previous submit had something unbalanced (unbalanced quotes, non-terminated comment, or a %MACRO without %MEND) which prevents code from executing. The "magic statement" in line 87 managed to reset this condition, and so the FILENAME in line 92 tries to clear a file reference which was never defined (log line 20 did not execute).
Thank you for the quick reply. How would I go about changing this code or getting rid of it all together since it is not a part of any my scripts? I can hit run as soon as I launch VIYA on a blank page and this is what I get. It's like it's programmed into SAS somewhere and executed before my first piece of scripted code runs. I hope that makes sense.
If SAS/Studio for VIYA is like normal SAS/Studio then you should be able to change your preferences to NOT HIDE the code that SAS/Studio submits before and after your code.
Thanks, Tom. I changed the preferences like you suggested and it's still the same. I see the code in the log after I hit run but I don't know where that code is to fix it. Visually, there was no code to run but this is what I get after hitting run on a blank page.
Photographs of Text are not really that helpful. Copy the actual text from the log. Especially the lines numbered 1 to 80 that look to be the PRE code that SAS/studio generated for you.
The code you posted is NOT the cause of your problem. Earlier code (your code) with unbalanced quotes or similar caused this behavior.
The default pre and post code is necessary for SAS Studio to work as intended. Do not disable it.
If this issue only happens the first time you run code after starting SAS Studio, then you might have mis-defined startup code which runs when the workspace server connection is established.
Catch the best of SAS Innovate 2025 — anytime, anywhere. Stream powerful keynotes, real-world demos, and game-changing insights from the world’s leading data and AI minds.