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

then what does the PROC EXPORT DATA statement look like?

Al

art297
Opal | Level 21

I'm confused!  I thought you said you had gotten it to work, but that you were surprised that the output went to your flashdrive.

What did you submit when it went to your flashdrive?

alc
Calcite | Level 5 alc
Calcite | Level 5

Sorry for the confusion.  I submitted PROC EXPORT DATA=sashelp.class program that you gave me as a test to see if it would work on the University's syste.  I changed the output to go to the flash drive as noted on the attached log.    Then I proceeded to try to export the pps90 file that I have been working with. It failed to run and it got me wondering if the PROC EXPORT=work.pps90 statement is telling SAS tp look in the Work File when pps90 in on the flash drive.  At any rate, the PROC EXPORT=work.pps90 did not run. 

Thanks for getting back to me.

Al

art297
Opal | Level 21

If the sasfile pps90 is at the route of your e: drive (i.e., your flash drive), then why not just assign your flashdrive with a libname? e.g.,:

libname mydata "e:\";

PROC EXPORT DATA=mydata.pps90

            (firstobs=1600 obs=1900)

            OUTFILE= "e:\WANT.XLS"

            DBMS=EXCEL REPLACE;

            SHEET="Rows1600_thru_1900";

RUN;

alc
Calcite | Level 5 alc
Calcite | Level 5

thank you.  I will try it tomorrow.

Al

alc
Calcite | Level 5 alc
Calcite | Level 5

It appears that I was able to assign a libname to my E drive but ran into another problem or two.  I have attached the log from this morning's adventure in SAS.

Quite honestly, this data is essential to my work; otherwise, I would have dropped this execise.

Thanks for your help.

Al

art297
Opal | Level 21

Your latest log could imply a number of things:

1. Did the sheet you were trying to create already exist in the spreadsheet?  If so, then proc export would likely give you the kind of error you received.

2. How many fields are in the file you are trying to export?  If it is greater than 255, then you can't export them to an xls file, but would have to export them to an xlsx file.

Ksharp
Super User

Maybe you should try to drop some useless variate and copy this dataset from e:\ to c:\(Local disk) ,then use these code again.

art297
Opal | Level 21

Given that he/she is working from a university computing center, a c:\ drive may not be available to them.

alc
Calcite | Level 5 alc
Calcite | Level 5

Good Morning

The computing center uses Dell Optiplex 750 or 760.  There is a user section of the hard drive that is available.  Would Ksharp's suggestion make a difference.  I have also communicated with the people that originally set up the SAS files to see what they suggest.

Thanks

Al (he)

alc
Calcite | Level 5 alc
Calcite | Level 5

I lucked out - they sent me the data in csv files which I am able to handle.

Thanks for your help.

Al

alc
Calcite | Level 5 alc
Calcite | Level 5

Hi

They sent me the data in cvs files which I am able tgo handle.

Thanks for your help with SAS.

Al

alc
Calcite | Level 5 alc
Calcite | Level 5

Good Morning

Overnight I wondered what happened to naming my file pps90 in the command.  Should PROC EXPORT DATA=sashelp.class read PROC EXPORT DATA=work.pps90?

Or is it the case where pps90 is open and I am querying via your program?

Thanks for taking the time to deal with the newbie of newbies!

Al

Tom
Super User Tom
Super User

The problems you are having do not appear to be normal syntax issues.

The logs you posted seem to have PROC EXPORT running BEFORE it should be.  In fact before it has even finished parsing just the PROC statement, much less the rest of the statements.

That is why the suggestion to try exporting another dataset such as SASHELP.CLASS.  This will make sure that your SAS installation is working properly.  If that works then you might also want to check your PPS90 dataset.  What happens if you try to run PROC MEANS on the dataset?

PROC EXPORT has some quirks where machine settings such as the default printer driver can cause it trouble.

Look at this discussion;

http://communities.sas.com/message/21167

alc
Calcite | Level 5 alc
Calcite | Level 5

Hi

I think I might have had some success in that the log message said that rows 3_7 was successfullty created.  There are still several problems (1) when I go to the test file it is empty.  (2) when I tried the application on my pps90 file I realized that Art's suggested approach seems to assume that the file is in the work folder.  My is sitting on my flash drive E.  So if I have had some success, where is the data and how do I change the data= to look at the flash drive rather than the work folder.  Alternatively, I tried to copy and past pps90 into the work folder and failed.

Feels like I might be getting a bit closer. 

By the way, I never understood that sashelp.class provided an opportunity to test the command.

Thanks

Al

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 46 replies
  • 6692 views
  • 3 likes
  • 5 in conversation