Help using Base SAS procedures

Format Variable

Reply
Contributor
Posts: 74

Format Variable

Hi,

I am trying to APPEND two datasets,say A(this is Base) and B
In dataset A i have a variable empid length 5 and format 12
In dataset B i have a variable empid length 5 and format 20

When i tried to append the B to A,i got a warning that the Format of ID in base and DATA dataset is different,how can i change th format of empid in datset B,so that i can append without any warnings.

You help will be appreciated.

Thanks,
Ren
Super Contributor
Super Contributor
Posts: 3,174

Re: Format Variable

You can use a FORMAT statement in a DATA step, for one approach.

Scott Barry
SBBWorks, Inc.

Suggested Google advanced search argument:

change output format sas variable site:sas.com
Contributor
Posts: 74

Re: Format Variable

Thanks
Respected Advisor
Posts: 3,799

Re: Format Variable

Why not just use a format statement with PROC APPEND.
[pre]
format _all_;
[/pre]
to cover all bases so to speak.
Ask a Question
Discussion stats
  • 3 replies
  • 117 views
  • 0 likes
  • 3 in conversation