- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Does anyone know how to import PRN type files (table) into SAS? Not sure if this type of file can be imported in SAS, if anyone has ideas, that would be great. Thanks for helping.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
The last time I worked with files that had a PRN extension they were Lotus 1-2-3 "print" files. Which were text intended to print in such a way that when you printed them to paper and matched the records then the lines would extend across multiple sheets.
These were fixed column with the column widths set by the spreadsheet software. If that is what you have, then you can write a SAS data step to read them. But it is not trivial because if a record exceeds the width of a piece of paper, typically about 80 columns, then you have to write code so that line 1 can be matched with the rest of that line.
If by PRN the file is a specific printer text markup, that's much more problematic.
If by Import you mean Proc Import, maybe. Really depends on the text file.
I strongly suggest copying the entire text of one of these files opened with a plain text editor such as Notepad, copy the text and open a text box on the forum using the </> icon above the message window and pasting the text so we can see the file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
The last time I worked with files that had a PRN extension they were Lotus 1-2-3 "print" files. Which were text intended to print in such a way that when you printed them to paper and matched the records then the lines would extend across multiple sheets.
These were fixed column with the column widths set by the spreadsheet software. If that is what you have, then you can write a SAS data step to read them. But it is not trivial because if a record exceeds the width of a piece of paper, typically about 80 columns, then you have to write code so that line 1 can be matched with the rest of that line.
If by PRN the file is a specific printer text markup, that's much more problematic.
If by Import you mean Proc Import, maybe. Really depends on the text file.
I strongly suggest copying the entire text of one of these files opened with a plain text editor such as Notepad, copy the text and open a text box on the forum using the </> icon above the message window and pasting the text so we can see the file.