|
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"
>
|