Define fieldnames

Hi,

Is it possible in SAS to make from the contents of a field a
fieldname?

Tx
0
laika
3/4/2010 12:46:22 PM
comp.soft-sys.sas 136513 articles. 1 followers. Post Follow

2 Replies
217 Views

Similar Articles

[PageSpeed] 35
I could think of several ways but the most immediate one is proc
transpoe wher the id & idlabel are used to spesify the variable names.

Eli
0
Eli
3/10/2010 8:30:28 AM
On Mar 4, 7:46=A0am, laika <michel.verhe...@axa.be> wrote:
> Hi,
>
> Is it possible in SAS to make from the contents of a field a
> fieldname?
>
> Tx

The VVALUEX function can be used to obtain the formatted value of a
dynamically specified variable name.

Richard
0
Richard
3/10/2010 7:57:56 PM
Reply:
Similar artilces about - Define fieldnames:

About typedef -- define the function pointer or define function model?
What's the difference between these two declarations ? 1) typedef void (*pf)(void); 2) typedef void f(void); the first declaration is define a function pointer, what is the second ? define a function model? And can use the second declaration to define a function pointer as follow: typedef void f(void); f *pf; Whether the two declarations of pf1 are both pointer to a function? 1) typedef void (*pf)(void); pf pf1; 2) typedef void f(void); f *pf1; if yes, which is better? and I saw many codes used the second declaration, what is its' advantage or disa...

Re: how to retain user defined format after transposing #2
I believe you are mistaken. Try this: data eleven; set sashelp.class; where age=11; format weight 6.1; run; proc transpose data=eleven out=t; var weight; run; You will see that the two transposed variables, COL1 and COL2, do inherit the 6.1 format. Now comment out the VAR statement and rerun the PROC TRANSPOSE. All three numeric variables are transposed, but they do not have the same format. There is no obviously correct format for the new varriables, so they are given the default (BEST12.). Now change "weight" to "_numeric_" in the FORMAT stat...

two defination ?
two class with same name exist in different dynamic linked library: a.so class REGION() { public: .... ~REGION() {} } b.so class REGION() { public: .... ~REGION() {} } this breaks ODR ? my problem is that a.so's ~REGION be linked to b.so's ~REGION defination. moving the defination of ~REGION in a.so to a .cxx, wrongly linked reverse (why not inline ~REGION()?) thanks scl wrote: > two class with same name exist in different dynamic linked library: > > a.so > class REGION() { > public: > ... > ~REGION() {} > } > > b.so > class REGION() { > pub...

Can I define my own BlockType ?
Hallo NewsGroup ! Can I define my own BlockType ? I shouldn't like to use the S-Function block. I should like to use my own defined BlockType (such as Gain block) in my modells. My wish is to reduce the entries for the block in the modell description file(*.mdl). Thank and best regards Matthias ...

US-PA-Horsham: Telecomm Branch Eng., Expert Magix/Definity PBX, 5+yrs exp; 4M (45334257604)
US-PA-Horsham: Telecomm Branch Eng., Expert Magix/Definity PBX, 5+yrs exp; 4M (45334257604) =========================================================================================== Position: Telecomm Branch Eng. Reference: SMC01846 Location: Horsham PA Duration: 4M Skills: Certified Avaya partner. Must be expert with Magix and Definity PBX systems. Must be able to work with phone vendor dispatched to site for break/fix situations. Must be able to plan and complete moves, adds and changes. ...

Problems defining anonymous in scripts.
I've tried to create a script that will load a variable from a *.mat file and then define some anonymous functions that wrok on that data, as such. load mydata mydata then is a 237 x 2 double according to the Workspace browser. If then in the same file I define the function myfun = @(i) = (mydata(i,1) + 28.59 * mydata(i,2)); so that the mfile looks like load mydata myfun = @(i) = (mydata(i,1) + 28.59 * mydata(i,2)); If I run this script and then try to call myfun(2); I get the error ??? Undefined command/function 'mydata'. If I then define the same anonymous function in t...

How to define
I have a pair of tables which have foreign key dependencies on each other. Is there any better way to define them than to create both of them then, after both are defined, 'alter add' the constraints? I have basic distrust of separating the table creations from the constraint definitions, probably irrational. "Robert Stearns" <rstearns1241@charter.net> wrote in message news:10bg278fn24lo43@corp.supernews.com... > I have a pair of tables which have foreign key dependencies on each > other. Is there any better way to define them than to create both of...

software defined radio
i'am a student of ece studying IV year of b.tech.if anyone can find the matlab code for software defined radio plsssssssssss email it to www.dazzling_dolls77@yahoo.co.in ...

Problems defining a primary key !!
--0-1087829140-1065523112=:93703 Content-Type: text/plain; charset=us-ascii Hi , i'm doing the planification of the courses in a university. I have definned the following tables: 1- Table DAY representing a day (day_id,year,month ...) 2- Table PERIODE representing an hour of a day (periode_id,starting,ending,periode_number) 3- Table TEACHER representing a teacher (teacher_id,name,phone,address ...) 4- Table ROOM representing a ROOM in the university (room_id,description,name ...) 5- Table COURSE representing a course given by a teacher (course_id,name,...) Now i have to ...

default schema resolution for user-defined functions?
SQL Server 2005 64-bit 9.00.3042 SP2 When I map a database user to a login, I can specify a default schema for that user. After that, any SQL from that user w/o an explicit schema will be resolved to that default schema. I would like for this to happen in regards to user-defined functions (in this case, a scalar-valued function). However, it looks as if I must always explicitly specify the schema when using the function. In other words: I have a function foo() and a table bar in schema myschema. My default schema is myschema. This works: select blah from bar And this works: select...

How to define a defining word
In the "Extending the Compiler" chapter of "Starting Forth" (on-line version) it shows how one could define VARIABLE and CONSTANT: : VARIABLE CREATE 0 , ; : CONSTANT CREATE , DOES> @ ; That's fine. Makes sense. But then later, in explaining the code for CONSTANT, it says (in some shaded boxes): compile-time portion CREATE Create a new dictionary entry (example TROMBONES) , Compiles the value for the constant from the stack into the constant's parameter field. run-time portion ...

define new iterators
Hi, I have to define a composite class. I'm wondering if there are any easy way to define its corresponding iterator class. Can I inherent the iterator from some library? Best wishes, Peng PengYu.UT@gmail.com wrote: > Hi, > > I have to define a composite class. I'm wondering if there are any easy > way to define its corresponding iterator class. Can I inherent the > iterator from some library? > > Best wishes, > Peng you should almost always inherit from std::iterator to have the appropriate typedefs created for you and so that std::iterator_traits will wo...

Trying to define Surrogates
[apologies for the cross posting]. Bob Badour wrote: > I disagree that the concept of surrogate vs. natural is useful. Ok, I've had time to digest this now, and I have to say that I /do/ believe the distinction can be important, and I think your interpretation is slightly awry. Let me explain: Bob Badour wrote: > It is a surrogate for whatever a surrogate key is for. Think of any > natural key. How is it not a surrogate? o.k., a surrogate is a subsitute for something. That's agreed. > My name is not me. It is an arbitrary identifier chosen by my parents....

Defining __getitem__() in a class that inherits from (dict)
#!/usr/bin/python # Hi, # # I noticed something interesting when trying to define # the __getitem__() method in a class that inherits from # (dict). If within the __getitem__ method I attempt # to get an item from self, the __getitem__ method is # called in an infinite recursion. I am very fond of # inheriting from (dict) as in the class 'bar' below, # but this problem is making me think that I will have # to write them as in 'foo' below. Is there a workaround # to make the class 'bar' work as I planned? class foo: data = {} def __getitem__(self...

const/define -- efficiency for simple integrals
Is there any difference in efficiency between (at global scope): static const int MAX_CHAR (1024); and #define MAX_CHAR 1024 I'm wondering about both time and space efficiency. I can take the address of the static const int, so surely it must take up space. The define is 'just a number' so doesn't have to take up any space. Is this right? [ See http://www.gotw.ca/resources/clcm.htm for info about ] [ comp.lang.c++.moderated. First time posters: Do this! ] "studennett" <studennett@hotmail.com> wrote in message news:1144845365.832751.189...

How to define a define that defines some defines ?
Hi all, I have the following: /*--- SNIP ---*/ typedef struct Argument_s { char *address; int type; int length; } ARGUMENT; #define Function(F) int F( int ArgCount, ARGUMENT ArgVector[] ) #define First ArgVector[0] #define First_A First.address #define First_T First.type #define First_L First.length #define Second ArgVector[1] #define Second_A Second.address #define Second_T Second.type #define Second_L Second.length #define Third ArgVector[2] #define Third_A Third.address #define Third_T Third.type #define Third_L Third.length ...

defining regions of interest in widget programs
Hi all, It's the first time I'm trying to define and use ROIs, so I have the basic question of what's the best way to do it. Basically, I want to allow the user to define a ROI in a widget program, be able to display it with some kind of color shading (possibly the original image shining through) and manipulate the image pixels within the ROI. I checked the IDL help and the newsgroup archive and drew the following conclusions (without doing much testing yet): 1. DEFROI is not for widget programs. 2. CW_DEFROI is meant to do what I want, but is kind of clunky. According to...

FAQ 4.62 Why don't my tied hashes make the defined/exists distinction? #2 553624
This is an excerpt from the latest version perlfaq4.pod, which comes with the standard Perl distribution. These postings aim to reduce the number of repeated questions as well as allow the community to review and update the answers. The latest version of the complete perlfaq is at http://faq.perl.org . -------------------------------------------------------------------- 4.62: Why don't my tied hashes make the defined/exists distinction? This depends on the tied hash's implementation of EXISTS(). For example, there isn't the concept of undef with hashes that are tied to ...

Application defined or Object defined error
I have an Access 2000 database running on a network in a Citrix environment. The problem I am experiencing is that some users (not all) get the above error message occasionally, sometimes just once or twice a day, sometimes many times. It seems to revolve around two forms that are kept open most of the day. Form A has a list of tasks to be done by that user. This form requeries it's recordsource on the timer event once every ten minutes to pick up any new entries made by other users. Form B is utilised when an item is actioned and on update will delete the record and requery Form A to...

Defining Constants
Hi, I want to know if I can declare a constant in MATLAB. For example if I need the power frequency to be declared as f = 60 and I don't want it to change how do I do that. I am in the debugging phase of a multifile(20 files) program and this will help immensely. Thanks Sanjoy "Sanjoy Sarawgi" <ssarawgi@eecs.wsu.edu> wrote in message news:eed1253.-1@webx.raydaftYaTP... > Hi, > I want to know if I can declare a constant in MATLAB. For example > if I need the power frequency to be declared as f = 60 and I don't > want it to change how do I do...

preprozessor and #define Problem
Hello, I have a problem with a macro which will return a pointer. In the header trolley_position_SL_GR is defined: #define trolley_position_SL_GR ((real_T*) ssGetPWorkValue(S,4)) The function ssGetPWorkValue return a pointer on real_T. If I use something like: real_T *test; test = (real_T*) ssGetPWorkValue(S,4); //or test = *((real_T*) ssGetPWorkValue(S,4)+4); // for example everything works fine. If I use: teal_T *test; test = *(trolley_position_SL_GR+6); Now, I get a segmentation fault and if I set it in brackets like : test = *((trolley_position_SL_GR)+6); it works! Can someone exp...

characters that define each shell?
I regularly use the Bourne Shell and Bash for scripts and the Bash and the C Shell at the command line with the Bash on OSX and the Bourne Shell and C Shell on Solaris. I don't regularly use Zsh but I may someday. For obvious reasons, I have a database of unix commands which I limit to 80 characters. Thus, the 80 characters must be used to give an example and also try to explain what's being done or accomplished. Since many of the commands are shell-specific and some are root-specific and some are OS-specific, it's not always so easy. Clearly, the C Shell is the easiest by just ...

Querry Regarding Define
Hi All, #define _LIT16(name,s) static const TLitC16<sizeof(L##s)/2> name={sizeof(L##s)/2-1,L##s} #define _L(a) (TPtrC((const TText *)L ## a)) can any one explain me the above two, I am geting bit confused. Thanks In Advance. Priya "Priya Mishra" <mis.priya@gmail.com> writes: > #define _LIT16(name,s) static const TLitC16<sizeof(L##s)/2> > name={sizeof(L##s)/2-1,L##s} > #define _L(a) (TPtrC((const TText *)L ## a)) This looks like C++, not C. DES -- Dag-Erling Sm´┐Żrgrav - des@des.no On Wed, 14 Dec 2005 03:55:01 -0800, Priya Mishra wrote: > Hi All, ...

Re: Can ACL be defined after it is used?
> In named.conf, is it permitted to have an ACL definition after the ACL is > refered to? Is the following valid named.conf syntax? > > options { > blackhole { > PRIVATE_IP_SPACE; > }; > }; > acl "PRIVATE_IP_SPACE" { > 10.0.0.0/8; > 172.16.0.0/12; > 192.168.0.0/16; > }; > > It works both in 9.3.0 and 9.2.1, but I read the following in "BIND 9 > Administrator Reference Manual": > > "Note that an address match list'...

sql server 2005, access97, #name?
I'm moving backend data to sql server 2005 using the upsize wizard the script below seems to create a valid table and I can link it into access97 if I open the empty table in access97, everything is fine and I can add a row of data however once saved, if I closed & reopen the table, all fields show '#name?' I've tracked it down to where the 'sect' field is defined where it is in the script causes the error if I move it after the upsize_ts field, everything works fine I wonder why ? all service packs have been installed on the sql server access97 is running under c...