LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (May 2008, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Mon, 19 May 2008 09:21:25 -0500
Reply-To:   "data _null_," <datanull@GMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "data _null_," <datanull@GMAIL.COM>
Subject:   Re: Transfer from Windows to UNIX
Comments:   To: Talbot Michael Katz <topkatz@msn.com>
In-Reply-To:   <200805191404.m4JAkxtD031327@malibu.cc.uga.edu>
Content-Type:   text/plain; charset=ISO-8859-1

TERMSTR= controls the end of line/record delimiters in PC and UNIX formatted files. This option enables the sharing of UNIX and PC formatted files between the two hosts. The following are values for the TERMSTR= option:

CRLF Carriage Return Line Feed. This parameter is used to read PC format files.

NL Newline. This parameter is used to read UNIX format files. NL is the default.

Use TERMSTR=CRLF to read a file that was created on the PC. If this PC format file was created using TERMSTR=NL, then the TERMSTR option is unnecessary.

On 5/19/08, Talbot Michael Katz <topkatz@msn.com> wrote: > Hi. > > I have code that needs to run on both Windows and UNIX platforms. If I > have a data step created in Windows that reads in data lines as follows: > > data ds1 ; > length var1 $16. ; > INFILE CARDS ; > input var1 $ ; > n + 1 ; > var1len = length(var1) ; > cards ; > potatoes > CABBAGE > Beans > ; > run ; > > then running in UNIX sees an extra character at the end (and the > corresponding lengths are all one bigger). Is there a way to modify the > infile and / or input statements and / or system options (and / or > something else) so that the code still works the same way in Windows, and > works the same way in UNIX as it does in Windows? Do I have to use a > macro that tests &sysscp or &sysscpl ? (If so, what's the most efficient > way?) > > Thanks! > > -- TMK -- > "The Macro Klutz" >


Back to: Top of message | Previous page | Main SAS-L page