After I run my code, I click "Program Summary", but it doesn't print the code past the second line. See attachment for the program summary that printed. I am trying to figure out why this is happening and how to fix it. Thanks in advance for your help!
Here is the original code:
data employees;
input lname $ fname $ age job $ gender $; /*This is a comment*/
datalines;
Smith Al 55 Man M
Jones Ted 38 SR2 M
Hall Kim 22 SR1 M
Jones Kim 19 Sec F
Clark Guy 31 SR1 M
Grant Herbert 51 Jan M
Schmidt Henry 62 Mec M
Allen Joe 45 Man M
Call Steve 43 SR2 M
McCall Mac 26 Sec F
Sue Joe 25 Mec F
Murphy Cori 21 SR1 F
Love Sue 27 SR2 F
;
run;
proc print data=employees;
run;
proc sort data=employees;
by age;
run;
proc print data=employees;
run;
That's puzzling. I have copied your code, exactly, and run it within SAS Studio and the log is complete.
Are you getting the results and output data as expected?
Yes, I get the results and output data as expected. The issue is when I click the Program Summary button, it doesn't display all the code. I want to see the code with the syntax highlighting and formatting (in addition to the log file and results).
I was using SAS Studio: OnDemand when this problem occurred. I ran it in University Edition and it worked fine. I wanted to have this option for students to submit their homework assignments, but it will be frustrating if it sometimes doesn't display all the code.
Hmm. One thing that puzzled me was the datalines statement, or particularly how it was highlighted. Note that the syntaxer (word of the day) shows yellow around it - only the data lines themselves should be yellow. When I copy and paste the whole code into SAS/EG and SAS Studio, it doesn't do that.
Just to make sure that there aren't any artifacts in your code which might be doing something weird, can you please:
Then run it again and see if it makes any difference.
Unfortunately, it didn't make a difference. 😞 I just can't tell if it's a bug in the software or something I'm doing wrong in OnDemand...
Curioser and curioser.
OK, copy from the proc print down into another programming tab, and execute that. Do you get the full log for that?
Here is the new program summary attached when I do run the bottom half of the code.
Just to clarify, the log file is fine. It's the program summary that is not printing all the code. See in the attachment where it says, "Code: Program 1". The log file includes all the code.
I've also done this with other SAS files and it will only print the first two lines of code.
D'oh. Sorry. I see what you mean.
I just looked at the program summary when I ran it, and it showed everything.
data employees;
input lname $ fname $ age job $ gender $; /*This is a comment*/
datalines;
Smith Al 55 Man M
Jones Ted 38 SR2 M
Hall Kim 22 SR1 M
Jones Kim 19 Sec F
Clark Guy 31 SR1 M
Grant Herbert 51 Jan M
Schmidt Henry 62 Mec M
Allen Joe 45 Man M
Call Steve 43 SR2 M
McCall Mac 26 Sec F
Sue Joe 25 Mec F
Murphy Cori 21 SR1 F
Love Sue 27 SR2 F
;
run;
proc print data=employees;
run;
proc sort data=employees;
by age;
run;
proc print data=employees;
run;
Can you show what's in your autoexec.sas file?
I haven't edited the autoexec file at all (that I'm aware of). How do I access it in SAS Studio? Did you mean is there anything in the "Edit AutoExec File"? That is blank and I haven't added anything in there.
Why does it look like there is scroll box around the code?
I don't see anything like those scroll bars around the program code when I look at a program summary in SAS/studio.
If the code really is in a scroll-able box then is it possible that you scrolled the other lines of code out of the frame before generating the PDF?
I noticed the scroll bars as well. They aren't functioning and I can't click on them to scroll up/down.
This was working fine until I went to make an instructional video explaining how to use this feature. 😕 I've tried deleting cookies, history, resetting my preferences, logging in/out of SAS Studio multiple times. I need to know how to debug this, though, in case students have the same problem.
I was finally able to get it to work in a different user profile in Chrome. I guess I will have to recommend that until I figure out why it's not working in my own profile. Thanks for trying to help. I appreciate it!
Do you know how to report this bug to SAS? I asked technical support and they said to "report it on the SAS Support Communities" but I'm not sure how to do that. Do I need to create a new thread?
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.