BookmarkSubscribeRSS Feed
santhosh
Fluorite | Level 6


I am using proc export with | as delimiter


proc export data= xyz
outfile="path/sashelp.class.TXT" 
dbms=dlm replace ;
delimiter='|' ;
run;


Name|Sex|Age|Height|Weight
Alfred|M|61|2400|112.5
Alice|F|61|50|84
Barbara|F|61|50|98
Carol|F|61|50|102.5
Henry|M|61|50|102.5
James|M|61|50|83
Jane|F|61|50|84.5
Janet|F|61|50|112.5
Jeffrey|M|61|50|84
John|M|61|50|99.5
Joyce|F|61|50|50.5
Judy|F|61|50|90
Louise|F|61|50|77
Mary|F|61|50|112
Philip|M|61|50|150
Robert|M|61|50|128
Ronald|M|61|50|133
Thomas|M|61|50|85

but when i am uploading into software then it is not taking next line after completion of 1st line

Name|Sex|Age|Height|Weight

Alfred|M|61|2400|112.5Alice|F|61|50|84Barbara|F|61|50|98Carol|F|61|50|102.5Henry|M|61|50|102.5

i am getting output like this is there any solution to get 5Alice|F|61|50|84 in next row

2 REPLIES 2
UrvishShah
Fluorite | Level 6

Hi,

I am having SAS Snippet to directly export the any SAS dataset in .txt format based on the structure of that SAS dataset...You can find the attached file to solve your question...Hope it meets your requirements...

This snippet i developed where i have not considered Delimeter facility so by default it will put space between the variables as delimeter...

-Urvish

ballardw
Super User

What software are you "uploading into" and what OS is it running on?

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
  • 429 views
  • 0 likes
  • 3 in conversation