![]() |
|
|
#1
|
||||
|
||||
|
lets say I have a table named Covtable in a database that contains two records with the column title CovCode.Here is the table:
CovCode BI CL the libname statement is as follows libname DBname oracle '...appropriate string to connect here' the following works fine /*start code */ proc contents data=DBname.covtable; /*end*/ i would like to do something like the following /*start code */ data NewTempdataset infile dbname.covtable; if covcode='BI' then Desc='Bodily' else Desc='Coll'; proc print data=newtempdataset; run; /*end*/ Any ideas? Thanks, |
|
#2
|
||||
|
||||
|
data NewTempdataset
set dbname.covtable; if covcode='BI' then Desc='Bodily'; else Desc='Coll'; run; Not sure if you actually need the "set", i havent used infile since my class in school. But the If is two statements seperated by semi-colons. You need the run;.
__________________
def no_one(the_spanish_inquisition): **** Juan. |
|
#3
|
||||
|
||||
|
You definitely need the set and not the infile. Also need semicolon after the "data NewTempdataset" and before "set".
In this case, you do not need the run, since it is immediately followed by a proc, but having the run there is a little more standard than not.
__________________
Res ipsa loquitur, sed quid in infernos dicet?
|
|
#4
|
||||
|
||||
|
thanks got it....its beeen a long time since ive used sas....
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|