Help using Base SAS procedures

In a proc format picture definition

Reply
Occasional Contributor
Posts: 16

In a proc format picture definition

like 4<-<([0-9])0='xx' <-What does ([0-9])0 mean?
Valued Guide
Posts: 2,177

Re: In a proc format picture definition

Posted in reply to andrew0845
Interesting syntax
but it doesn't look valid for a picture range definition!

Where did you see it?
Occasional Contributor
Posts: 16

Re: In a proc format picture definition

It's just because I cannot "cut and paste" the whole code. I don't know where the wrong is. Whenever, I cut and paste the posted message is just part of the original message I intended to post!

The part posted is the part I don't understand. The other part, you can imagine, is just like a normal definition for a proc format picture.

I don't undertand the following way to express a range for a value in a picture definition.

I just show the uplimit of a range for a value: ([0-9])3, say.

Would you please tell me how I can understand that? Thanks!
Occasional Contributor
Posts: 16

Re: In a proc format picture definition

I forgot to mention that where I saw it. I saw it at the e-book for SAS Advanced Prep. Thanks!
Occasional Contributor
Posts: 16

Re: In a proc format picture definition

Posted in reply to andrew0845
The original code is as follows:

proc format;
picture agegrp
1-<([0-9])3='00 Youth'
13-<([0-9])0='00 Teen'
20-<([0-9])0='00 Adult'
70-high='000 Senior';
run;

< is the symbol for "smaller than". That is the way I can input the original code, otherwise, the most of part will disappear mysteriously after it is posted.

What does ([0-9])3 and ([0-9])0 mean in the picture definition?

Besides, if I only use < not -<, what would happend? Inclusive for the lower limit or upper limit?

Thanks!
Ask a Question
Discussion stats
  • 4 replies
  • 204 views
  • 0 likes
  • 2 in conversation