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

I would like to export  sas output as .txt file with pipe delimiter.

Please help

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User
If proc export will not work, because of an issue on the remote server, neither will a data step. PROC EXPORT simply generates the data step code for you.

The exception is using the GUI, which uses a different approach and allows you to move files across environments more easily. But that usually cannot be automated.

I'm guessing you think you need a data step to export it to a location the server doesn't have access to? You would still create the file on the server and then use a different method to move the file.

View solution in original post

9 REPLIES 9
avatar
Fluorite | Level 6

I can not use proc Export in  remote setup. I need to use a  in data step/

 please advise

thanks

PaigeMiller
Diamond | Level 26

PROC EXPORT works in SAS running on remote computers.

--
Paige Miller
avatar
Fluorite | Level 6
I got this below code – how do I use it with filename statement. Please explain


FILENAME dlmtest &filename lrecl=5000;
DATA _NULL_;
set New_Daily_claims;
file dlmtest dsd LRECL=5000 dlm = '|'; /*  CHANGE THAT TO PIPE SYMBOL, Note: DSD AND LRECL Are required. */
PUT(_ALL_)(+0);
RUN;




Tom
Super User Tom
Super User

Looks like you already know how to make a delimited file where pipe is the delimiter.

What is the question now? 

avatar
Fluorite | Level 6
I am getting error --- when I run that code with my sas dataset


PaigeMiller
Diamond | Level 26

A working example of data step code is provided at the link I gave earlier.

--
Paige Miller
Tom
Super User Tom
Super User

Why can neither see your screen nor read your mind.

 

Please post the lines of text from the SAS log that shows what you ran and what error was generated. Make sure to the use Insert Code icon (looks like {i}) to get a pop-up window to paste in the lines from the log so that the formatting is preserved.

Reeza
Super User
If proc export will not work, because of an issue on the remote server, neither will a data step. PROC EXPORT simply generates the data step code for you.

The exception is using the GUI, which uses a different approach and allows you to move files across environments more easily. But that usually cannot be automated.

I'm guessing you think you need a data step to export it to a location the server doesn't have access to? You would still create the file on the server and then use a different method to move the file.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

SAS Enterprise Guide vs. SAS Studio

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.

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
  • 9 replies
  • 3271 views
  • 1 like
  • 4 in conversation