Avoiding diSASters
by Peter Flom
SAS can be a powerful tool,
But misapply it, and look a fool.
To avoid common errors it's always best
To follow the advice that you'll read next.
SAS has DATA steps and PROCS,
And you can alternate them.
But woe betide the programmer
Who tries to integrate them.
INFORMATS can help you read<br>
Almost any data.
But put them right after the VAR NAME<br>
And do not wait for later.
The semicolon is your friend.
It's how all SAS statements end.
So if you've got some oddball errors
A dot and comma may end your terrors.
A program without comments will run just fine
(SAS really doesn't care)
But six months later will YOU know
Why you put that statement there?
Each variable has got a length
Assigned when it's first mentioned
If you state length explicitly
Your program may be strengthened.
Missing values plague all data
That I have ever seen
But using 999 for them
May distort the value's mean.
Now every MERGE should have its BY
There's a simple reason why
If not, then data sets might get replaced
And you would lose a lot of face.
And finally, please use each PROC
For just what it's intended.
That's all the advice that I have got
So here my poem's ended.
by Peter Flom
SAS can be a powerful tool,
But misapply it, and look a fool.
To avoid common errors it's always best
To follow the advice that you'll read next.
SAS has DATA steps and PROCS,
And you can alternate them.
But woe betide the programmer
Who tries to integrate them.
INFORMATS can help you read<br>
Almost any data.
But put them right after the VAR NAME<br>
And do not wait for later.
The semicolon is your friend.
It's how all SAS statements end.
So if you've got some oddball errors
A dot and comma may end your terrors.
A program without comments will run just fine
(SAS really doesn't care)
But six months later will YOU know
Why you put that statement there?
Each variable has got a length
Assigned when it's first mentioned
If you state length explicitly
Your program may be strengthened.
Missing values plague all data
That I have ever seen
But using 999 for them
May distort the value's mean.
Now every MERGE should have its BY
There's a simple reason why
If not, then data sets might get replaced
And you would lose a lot of face.
And finally, please use each PROC
For just what it's intended.
That's all the advice that I have got
So here my poem's ended.