02-18-2016 02:47 AM
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.
02-18-2016 04:24 AM
Not quite clear to me what your asking. If you mean how do you apply properties to variables in code then that is simple:
length <your_variable> <your_length>; /* e.g. avar $4 */
format <your_variable> <your_format>; /* e.g. avar best10.*/
informat <your_variable> <your_format>;
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.
02-18-2016 09:28 PM - edited 02-18-2016 09:32 PM
Thanks for your reply.
I mean follow procedure.
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?
02-19-2016 04:17 AM
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.
02-19-2016 06:45 PM
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 .