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.
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.
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.
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.
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 .
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.