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.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 9 replies
  • 4369 views
  • 1 like
  • 4 in conversation