Desktop productivity for business analysts and programmers

How do I write to a text file on a network drive from EG?

Reply
New Contributor
Posts: 4

How do I write to a text file on a network drive from EG?

47     data _null_ ;
48       file 'T:\GroupDrive\m\Out\report01&sysdate9..txt' ;
49       set source.report ;
50       put rpt_dt mmddyy10. " , "
51            facility $3. " , "
52    metric " , "
53    adm_ct  " , "
54    num_harm ;
55     run ;

ERROR: Insufficient authorization to access /apps/sas/sas92/config/SASMachine/T:\GroupDrive\Out\report01&sysdate9..txt.

As you can see, I attempted to write to a file on a network drive.  EG puts a prefix that relates more to the location of the machine than anywhere on our windows network.

@agdesilva
Grand Advisor
Posts: 17,345

Re: How do I write to a text file on a network drive from EG?

When you go to run your code is there an option to RUN LOCAL?

If not, then you're running EG on a server and you'll need to create the file on the server and then download it.

Grand Advisor
Posts: 10,211

Re: How do I write to a text file on a network drive from EG?

And the / tells us your using a SAS Unix system, probably on a server. You would need a path that the server sees to that location and use appropriate syntax. I suspect that the SAS server doesn't match the network drive mappings you have from your PC.

Trusted Advisor
Posts: 1,056

Re: How do I write to a text file on a network drive from EG?

Talk to your SAS administrator. They should be able to tell you which locations on the SAS server that you should write to, and whether any of them are also available to Windows by something like Samba.

Tom

Ask a Question
Discussion stats
  • 3 replies
  • 505 views
  • 8 likes
  • 4 in conversation