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

Hi,

I'm running SAS 9.3 on Linux and working remotely and I'd rather not use X (poor connection etc) so I'm using -nodms (and tried -nodmsexp....whats the difference?) for interactive line mode.  This works most of the time, however I've now tried importing a 4million line CSV file, and I'm getting a message back about X being unavailable:

ERROR: The connection to the X display server could not be made <blah>

ERROR: Device does not support full-screen.

At this point things seem to hang.  Trying this with an X connection, and the import completes and returns a prompt however a SAS Session Management window is opened, despite the nodms flag.

I'm not particularly experienced with SAS and am mainly involved as a Linux system admin level.  Is there anyway to get true GUI-less SAS?

Thanks,

Chris

1 ACCEPTED SOLUTION

Accepted Solutions
Tom
Super User Tom
Super User

Most likely the message is from PROC IMPORT. For a CSV file there is very little value in using PROC IMPORT.  Just write the data step yourself.  You can copy and paste the variable names from the first line of the CSV file if you do not already know what variables there are.

data want ;

length var1 8 var2 $30 ...... varn 8 ;

infile 'myfile.csv' dsd dlm=',' truncover firstobs=2 lrecl=32000;

input var1--varn ;

run;

You can also create a simple .sas program and run it from the command line non-interactively.  Then you can use the -noterminal option to prevent that type of error message.

> sas -noterminal myprogram.sas

> more myprogram.log

>

View solution in original post

2 REPLIES 2
Tom
Super User Tom
Super User

Most likely the message is from PROC IMPORT. For a CSV file there is very little value in using PROC IMPORT.  Just write the data step yourself.  You can copy and paste the variable names from the first line of the CSV file if you do not already know what variables there are.

data want ;

length var1 8 var2 $30 ...... varn 8 ;

infile 'myfile.csv' dsd dlm=',' truncover firstobs=2 lrecl=32000;

input var1--varn ;

run;

You can also create a simple .sas program and run it from the command line non-interactively.  Then you can use the -noterminal option to prevent that type of error message.

> sas -noterminal myprogram.sas

> more myprogram.log

>

chrissycc
Calcite | Level 5

Thanks! I didn't realise the proc import would generate a message and require a window.  I have been using a .sas script generally, rather than working interactively, but ran into this issue while testing.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 2 replies
  • 1630 views
  • 0 likes
  • 2 in conversation