|
Nat,
I don't know what the original rationale was, but being able to include
semi-colons within datalines can be quite useful when using datalines to
create include files and code being used within IML. For example, take a
look at: http://www.google.ca/url?
sa=t&source=web&cd=9&sqi=2&ved=0CFMQFjAI&url=http%3A%2F%2Fpsych.colorado.edu
%2F~carey%2Fsaspairs%2FDocs%2FIntroduction%2520to%2520SASPairs.doc&rct=j&q=w
hen%20datalines4%20needed&ei=adYlTcTXDsG78gaPiO37AQ&usg=AFQjCNEOzPHE9MNVrtwT
7PtiPb1AjIJGsw
or,in short form: http://tiny.cc/41c0l
However, more interestingly, I've always wondered why so many people end all
data lines with 4 (or more) semi-colons, or why the longer datalines command
is more often used than the shorter 'cards'.
Art
--------
On Thu, 6 Jan 2011 08:50:49 -0500, Nat Wooding <nathani@VERIZON.NET> wrote:
> Earlier in this thread, a couple folks commented on how they had never
>needed to deal with SAS data that had embedded semicolons. In case anyone
>missed it, yesterday's Post
>
>modulen: where does SAS look?
>
>included semicolons. Admittedly, the work that was being done was not a
>typical (to me, at least) SAS job. The first part of the post read:
>
>(Snip)
>
>I have stumped the local SUG with this problem, which hopefully has a
simple
>explanation. I am using the following code to write an attribute table and
>call a routine from a proprietary dll. The dll has 3 routines, but I am
just
>trying to call the first:
>
>***This section writes the attribute table; filename sascbtbl
>"C:\Home\HDD\SAS\sascbtbl.dat"; data _null_;
> infile cards;
> file sascbtbl;
> input;
> put _infile_;
> cards4;
>ROUTINE AprLimOpen MINARG=3 MAXARG=3 MODULE=APRLIM RETURNS=LONG;
> ARG 1 INPUT CHAR FORMAT=$cstr200. BYADDR;
> ARG 2 INPUT CHAR FORMAT=$cstr200. BYADDR;
> ARG 3 OUTPUT NUM FORMAT=pib4. BYADDR;
>
>(snip)
>
>Just as an afterthought, the Cards4 dates back to the early days of
>mainframe SAS jobs where it was common to submit a job with embedded data
>rather than read them from a tape or file. I can't think why I would have
>ever had data with semicolons but someone must have convinced Messrs. Barr
>and Goodnight of the need. Or, maybe they just wanted to be able to do Proc
>Explode. A SAS 72 manual or one of the later ones in the decade may give
>hints of the sequence of these events but mine is packed away.
>
>Nat Wooding
|