How to set Field atributes in program screen

Reply
Occasional Contributor
Posts: 7

How to set Field atributes in program screen

Hi,

Do you know how to set Filed attributes in program screen by not manually in attribute window but program code?

I could change color of fields by Fileld function, but could not set Chois groupm, Fomat, Informat, List or and so on.

 

 

 

Super User
Super User
Posts: 7,720

Re: How to set Field atributes in program screen

Hi,

 

Not quite clear to me what your asking.  If you mean how do you apply properties to variables in code then that is simple:

data <your_library>.<your_dataset>;

  length <your_variable> <your_length>;  /* e.g. avar $4 */

  format <your_variable> <your_format>;  /* e.g. avar best10.*/

  informat <your_variable> <your_format>;

run;

 

Or you can use proc datasets - check the SAS docs.  However you need to be clearer on what software you are using, and what you want to do.

Occasional Contributor
Posts: 7

Re: How to set Field atributes in program screen

[ Edited ]

Hi, RW9.

Thanks for your reply.

 

I mean follow procedure.

1.Run SAS.

2.Create new catalog "WORK.NEW" in Explorer.

3.Create new entry "Program Screen" in this catalog.

4.Make filed by enter "&TEST".

5.Tools>Filed Attributes>>Attr window is open.

6.You can change attributes by keyboard type or mouse click.

7.I wanna control these attributes by not manually but command.

 

This is a function of SAS AF.

Should I post to another community?

 

Best Regards.


sample.png
Super User
Super User
Posts: 7,720

Re: How to set Field atributes in program screen

Oh, your using SAS/AF.  Sorry, haven't used that in over 8 years now, surpised anyone is still using it.  Afraid I can't help with that question, and there isn't a forum for it, maybe someone else can help with that.  What are you using it for, there is bound to be better solutions out there.

Super User
Posts: 11,134

Re: How to set Field atributes in program screen

It has been eve longer for me than for @RW9 using SAS/AF but there were a lot of methods for retrieving and setting properties. Look in the online AF help for _get or _set under methods as a start.

 

Some of what you are doing looks like it might belong in an INIT: code block .

Ask a Question
Discussion stats
  • 4 replies
  • 287 views
  • 0 likes
  • 3 in conversation