Sample 24571: Creating an ASCII file with no carriage returns (fixed format file)
Generate an ASCII fixed format flat file that contains no end of record markers.
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
/* If the option RECFM= is not specified on the FILE statement */
/* SAS defaults to a variable record format and puts carriage */
/* returns or end of record markers (EOR) after each line. To */
/* create a fixed file, specify RECFM=F on the FILE statement. */
/* */
/* If the option LRECL= is not specified on the FILE statement */
/* SAS defaults to a logical record length of 256. Specify the */
/* LRECL= option if you need to override this default. */
/* */
/* If a fixed format file is viewed in a text editor, the */
/* output appears as one continuous text string. Records shorter */
/* than the specified LRECL= are padded with blanks to the LRECL= */
/* value. */
data _null_;
infile datalines truncover dlm=',';
/* specify a valid path on your operating system */
file 'file specification.txt' recfm=f lrecl=20;
input string $20.;
put string ;
datalines;
The real voyage of
discovery consists
not in seeking new
landscapes but in
having new eyes.
- Marcel Proust
;
run;
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
OUTPUT to external file
The real voyage of discovery consists not in seeking new
landscapes but in having new eyes. - Marcel Proust
Generate an ASCII fixed format flat file that contains no end of record markers.
| Type: | Sample |
| Topic: | SAS Reference ==> DATA Step Common Programming Tasks ==> Reading and Writing External Data
|
| Date Modified: | 2005-12-08 11:34:05 |
| Date Created: | 2004-09-30 14:08:55 |
Operating System and Release Information
| SAS System | Base SAS | Tru64 UNIX | n/a | n/a |
| OpenVMS Alpha | n/a | n/a |
| Linux | n/a | n/a |
| HP-UX | n/a | n/a |
| HP-UX IPF | n/a | n/a |
| AIX | n/a | n/a |
| 64-bit Enabled Solaris | n/a | n/a |
| ABI+ for Intel Architecture | n/a | n/a |
| 64-bit Enabled HP-UX | n/a | n/a |
| Windows | n/a | n/a |
| 64-bit Enabled AIX | n/a | n/a |
| Solaris | n/a | n/a |
| OS/2 | n/a | n/a |
| Microsoft® Windows® for 64-Bit Itanium-based Systems | n/a | n/a |