comp.soft-sys.sas - The SAS statistics package.
Hi Friends How to convert rtf file output(already exist) into any image file using SAS Let know the solution
Hi SAS9/ MDR gurus, I get the following error when I attempt to modify a SAS dataset registered in the SAS Metadata Repository. =============================================================== 88 data data5.test; 89 do a=1,3,2,4; 90 output; 91 end; 92 run; NOTE: The data set DATA5.TEST has 4 observations and 1 variables. NOTE: DATA statement used (Total process time): 93 libname data5 list; NOTE: Libref= DATA5 Scope= DMS Process Engine= META Physical Name= File Name= C:\xxx\xxx\xxx\xxx\xxx\data 94 proc sort data=data5.test; 95 by a; 96 run; ERROR: The member name DATA5.TEST already exists in metadata. NOTE: The SAS System stopped processing this step because of errors. NOTE: PROCEDURE SORT used (Total process time): real time 0.09 seconds cpu time 0.01 seconds 97 libname data list; NOTE: Libref= DATA Scope= DMS Process Engine= V9 Physical Name= C:\xxx\xxx\xxx\xxx\xxx\data File Name= C:\xxx\xxx\xxx\xxx\xxx\data 98 proc sort data=data.test; 99 by a; 100 run; NOTE: There were 4 observations read from the data set DATA.TEST. NOTE: The data set DATA.TEST has 4 observations and 1 variables. NOTE: PROCEDURE SORT used (Total process time): real time 0.07 seconds cpu time 0.03 seconds =========================================================================== Note that DATA5 is the library registered in the MDR and DATA is a regular SAS library which points to the same physical folder. OPSYS: Windows XP SAS: 9.1.3 SP3 I've spoken to SAS Tech Support who've made suggestions about using the METAOUT= option on the meta LIBNAME statement which didn't work. And they mentioned that in SP4 METAOUT= is being changed, not in any useful way. So, in summary, what I expect to do is: A. Write normal base SAS code with multiple data steps and proc steps that create and modify the same SAS data set several times B. Be able to access these SAS datasets using a (META) Libname that points to the MDR which then points to the physical folder using base SAS engine. C. Have the MDR stay in sync with the changes in each step. This is my understanding of how the MDR works - an additional layer between the user program and the physical folder in order to provide security and remove the need for the user to know anything about the physical storage of the data. If you can help with this, I'd be very grateful. Regards MK
You have misunderstood how the RETAIN statement works here. It does not change the value of any variable that is in your input data set. All the variables in your input dataset are by definition automatically RETAINed. When you initialize the variables in the RETAIN it also sets the variable type. This is one of the places where you can have a problem with character variables. The lengths in the input data set may be different from the ones set in the RETAIN. If you are working with a standard data structure then try to get hold of a data set that has all the variables defined with the appropriate length, label etc.. and then use it as: data myfinaldata ; if 0 then set <insert the name of the standard dataset> ; set <your input data set> ; run ; This should get you what you want. If you don't have a standard data set then define one with ATTRIB statements and use the same code as above. Venky Chakravarthy On Tue, 11 Apr 2006 14:23:45 -0400, Rathindronath < XXXX@XXXXX.COM > wrote: >Thanks a loteveryone. But i should not use C & E in the retain sattement ( >NO HARDCODING). > >I am supposed to have A, B, C, D, E variables in a dataset. >My goal is to check if A, B, C, D, E all of those variable are in the >dataset. If not then just put the missing varibles TO it but no values ( >CAUSE THESE VARIABLES DIDN'T HAVE ANY VALUES). > >Like I have A, B & D variables in the dataset. Now I should check if I >have A, B, C, D & E all of them is in the datatset. If not then put the >rest of the variables to that dataset. Like put C & E ( cause they are not >there, though they were supposed to be there). so the dataset become have >all the variables: A, B, C, D, E.