Hi I have list of products in a dataset,
which are classified by other name for eg:- there is a
product A> Malambo Shiraz Malbec 750ML(0388) which is a Red
wine.Now i need to generate a report where it shows if this
product appears then it should b displayed as red
wine,similarly for other products and other classification.
I dont wan use proc format.
Answers were Sorted based on User's Feedback
Answer / chandrakanth
please do not post complex answers if it can be done in very very simple.
data=dataset name;
set source dataset name;
if productA="Malambo Shiraz Malbec 750ML(0388)" then productA='Red Wine';
proc print data=dataset name;
run;
let me know if i am wrong
Is This Answer Correct ? | 4 Yes | 1 No |
Answer / sheetal
above answer is correct. Just need to correct syntax
errors. Following is the corrected code,
proc sql;
update [dataset_name]
set [wine_name_field] = "Red Wine" where [wine_name_field]
="Malambo Shiraz Malbec 750ML(0388)";
quit;
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / harsh
You can use HASH lookup for this. Performnace will depend
on the data size.
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / saurabh
Hi.
I don t know any specific reason why yu dont wan to use
proc format. It would be better if you use that as there
would be probably some more wines in the market where u can
apply this format of red wine....
Anyways I think you can try this.
* the content in brackets have to come from your program
proc sql;
update [dataset_name];
set [wine_name_field] = "Red Wine" where [wine_name_field]
="Malambo Shiraz Malbec 750ML(0388)";
exit;
let me know in case u require something else.
Is This Answer Correct ? | 0 Yes | 1 No |
what is the difference btw proc means and proc univariate?
Describe the function and untility of the most difficult SAS macro that you have written.
I have a dataset concat having variable a b & c. How to rename a b to e & f?
what is a method for assigning first.var and last.var to the by groupvariable on unsorted data? : Sas programming
What are _numeric_ and _character_ and what do they do?
what is hierarchy flattening? : Sas-di
What is difference between (a-z) and (a--z)
What is data _null_?
how can you import .csv file in to sas? : Sas programming
Explain proc univariate?
is it possible to generate sas datasets using proc print ???
1 Answers GSK GlaxoSmithKline,
Can you use a macro within another macro? If so how would SAS know where the current acro ended and the new one began?