Help using Base SAS procedures

file generation question

Accepted Solution Solved
Reply
Contributor
Posts: 31
Accepted Solution

file generation question

Dear,


I am in a support team and a set of users from a particular site are having a weird issue of unable to create a text file 'correctly'.

A simple dataset was exported to text file, but when they open text file in Notepad, the data is continuous without spaces but for all of us it displays as usual

However, when user opens that file in WordPad , it displays in a single column correctly.

I have attached "file.jpeg" showing the screenshots in it.

Dataset - see screenshot Dataset

When all of us open in Notepad -  See screenshot Normal

Problem when user opens in Notepad -  See screenshot Issue

file.JPG


Please see below points:

1)We are on Linux platform, our machine is Windows 7 ,running on SAS EG 6.1 (32-bit)

2) Used both known ways of exporting files

proc export
data=eb1
outfile="/<unixpath>/testfile.txt"
dbms=TAB replace;
putnames=no;
run;

data _null_ ;         
    set eb1 ;
    FILE '/<unixpath>/testfile.txt'  ; 
    PUT ebn2;
run ;

3)
When user creates text file , it opens with incorrect alignment. When we run it,it opens with correct alignment - with same code on same server.

4) proc setinit;run; returns same for all of us

5) The locale details in Windows machine are same.


Accepted Solutions
Solution
‎04-10-2015 02:27 AM
Super User
Posts: 7,799

Re: file generation question

Posted in reply to MarkNicholas

Notepad is a Windows program; you created your file in Linux. How did you transfer the file from Linux to Windows?

Looks like the transfer did not convert UNIX LF to Windows CR/LF. Notepad can't deal correctly with UNIX text files, Wordpad can.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers

View solution in original post


All Replies
Solution
‎04-10-2015 02:27 AM
Super User
Posts: 7,799

Re: file generation question

Posted in reply to MarkNicholas

Notepad is a Windows program; you created your file in Linux. How did you transfer the file from Linux to Windows?

Looks like the transfer did not convert UNIX LF to Windows CR/LF. Notepad can't deal correctly with UNIX text files, Wordpad can.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 217 views
  • 0 likes
  • 2 in conversation