Date: Fri, 28 May 2004 13:47:42 -0700
Reply-To: "Choate, Paul@DDS" <pchoate@DDS.CA.GOV>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Choate, Paul@DDS" <pchoate@DDS.CA.GOV>
Subject: Re: general newline character (escape) sequence
Hi Jim,
my $.02 - I think you'll need to id the operating system with SYSSCP or
SYSSCPL and then conditionally assign the right eol marker, along with any
file references.
In some cases you could perhaps indirectly create it and then refer to it.
Something along this line:
1149
1150 data _null_;
1151 file test;
1152 put ;
1153 run;
NOTE: The file TEST is:
File Name=test.dat,
RECFM=V,LRECL=256
NOTE: 1 record was written to the file TEST.
The minimum record length was 0.
The maximum record length was 0.
NOTE: DATA statement used:
real time 0.01 seconds
cpu time 0.00 seconds
1154
1155 data _null_;
1156 infile test pad recfm=n;
1157 input @1 crlf $char2. ;
1158 put crlf $hex4.;
1159 stop;
1160 run;
NOTE: UNBUFFERED is the default with RECFM=N.
NOTE: The infile TEST is:
File Name=\test.dat,RECFM=N,LRECL=256
0D0A
NOTE: DATA statement used:
real time 0.00 seconds
cpu time 0.00 seconds
This would work in Win and Unix I think, but in MVS there aren't always end
of line markers (fixed length datasets...) The concept of end-of-line
markers doen't hold across all platforms.
- regards
Paul Choate
DDS Data Extraction
(916) 654-2160
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
Groeneveld, Jim
Sent: Friday, May 28, 2004 5:10 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Q: general newline character (escape) sequence
Hi friends,
I want to embed line_ends or new_line characters within character strings
and macro variables. Of course I can embed OS-dependent newline characters,
like BYTE(13) and BYTE(10) as CRLF in DOS/Windows, but I would prefer an
OS-independent solution, like '\n' in C, which is being substituted
automatically by the used OS newline default.
Regards - Jim.
--
. . . . . . . . . . . . . . . .
Jim Groeneveld, MSc.
Biostatistician
Science Team
Vitatron B.V.
Meander 1051
6825 MJ Arnhem
Tel: +31/0 26 376 7365
Fax: +31/0 26 376 7305
Jim.Groeneveld@Vitatron.com
www.vitatron.com
My computer may have missed me, I did not; it, that is.
[common disclaimer]