|Date: ||Mon, 19 May 2008 11:50:44 -0400|
|Reply-To: ||Talbot Michael Katz <topkatz@MSN.COM>|
|Sender: ||"SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>|
|From: ||Talbot Michael Katz <topkatz@MSN.COM>|
|Subject: ||Re: Transfer from Windows to UNIX|
Thank you for responding. I tried the ASCII mode FTP, and that appeared
to get UNIX to work the same way as Windows with no modifications to the
Thanks again to all who responded, on or offline.
-- TMK --
"The Macro Klutz"
On Mon, 19 May 2008 10:51:20 -0400, Keintz, H. Mark
>Talbot asks why his SAS program on UNIX appears to add 1 byte to the
>length of character variables from a sequence of ascii records following
>his CARDS statement.
>Tablot, this has the markings of failure to convert the two byte
>line-termination codes (carriage-return, followed by a line-feed) used
>by windows to the single-byte code (line-feed only) used by unix. As a
>result the value "potatoes" is seen by unix sas as "potatoes " where the
>trailing blank is really a non-printable trailing carriage return.
>If this is the problem, then you have options:
> 1. If you ftp the program from windows to unix, be sure to use the
> 2. put the data in a separate file and use the INFILE statement with
>the "termstr=crlf" option.
> 3. After moving the program to unix,open it up with any of a number of
>unix editors (I use PICO) make a minor modification to the program (e.g.
>move a semi-colon) and save the file. At least on our unix system the
>editor is smart enough to recognize the extraneous carriage-return and
>delete it upon saving.
>Note if you had been reading numeric instead of character data, you
>would have gotten error messages about invalid values.
>From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
>Talbot Michael Katz
>Sent: Monday, May 19, 2008 10:05 AM
>Subject: Transfer from Windows to UNIX
>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) ;
>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,
>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
>-- TMK --
>"The Macro Klutz"