Help using Base SAS procedures

changing values in a data set

Reply
Contributor
Posts: 22

changing values in a data set

hi hve a simple swap process i need to carry out. IF LMA=12 and STATENAME='Alabama' then LMANAME="Troy-Eufaula

and if LMA=12 and STATENAME = 'Alabama' then LMANAME='Tombigbee'

so i wrote the code this way but it was generating errors

LIBNAME PERM 'P:\SASData\Datasets';
DATA A;;
Set PERM.LMA;// LMA is the name of the dataset
if ((StateName='Alabama')& (LandMarketAreaId = 12))
then LandMarketAreaName='Troy-Eufaula';

what could possibily be wrong with this?
Contributor
Posts: 22

Re: changing values in a data set

Posted in reply to saslackey
thanks but i figured it out. just some simple syntax mistakes, semicolan errors. i am a new learner but felt good to out Smiley Happy
Ask a Question
Discussion stats
  • 1 reply
  • 94 views
  • 0 likes
  • 1 in conversation