DATA Step, Macro, Functions and more

numeric to character format in sas grc

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 76
Accepted Solution

numeric to character format in sas grc


I am working in SAS GRC system .When i convert a numeric colomn into a character it show character value with the reference key.I want the content of the column .for example

Have dataset is

name    country
JOHN    US

RAM     INDIA

HERRY UK

name and country both are numeric .I want both column in character value with


name    country
JOHN    US

RAM     INDIA

HERRY UK

but when use put function it convert to character function but it shows reference key like


name    country name1
JOHN    US       1

RAM     INDIA    2

HERRY UK         3

Kindly help me how to connvert it character value like below dataset

name    country
JOHN    US

RAM     INDIA

HERRY UK

Regards,
Ashwini



Accepted Solutions
Solution
‎05-11-2012 03:25 AM
Super User
Posts: 10,023

Re: numeric to character format in sas grc

Maybe there is a format attached with your name variable.

You can use proc content to check what format the name variable has.

Then use

put(name, myformat. )

Ksharp

View solution in original post


All Replies
Solution
‎05-11-2012 03:25 AM
Super User
Posts: 10,023

Re: numeric to character format in sas grc

Maybe there is a format attached with your name variable.

You can use proc content to check what format the name variable has.

Then use

put(name, myformat. )

Ksharp

Frequent Contributor
Posts: 76

Re: numeric to character format in sas grc

Dear Kshap,

I unable to find the format in sas grc system .Could you please explain me how i decode the format.

Regards,

Ashwini

Occasional Contributor
Posts: 9

Re: numeric to character format in sas grc

Hello Ashwini,

               I am also working on SAS EGRC system.....Can you please provide information that on which page of EGRC you are doing the same??

Regards,

Rakshit

Occasional Contributor
Posts: 9

Re: numeric to character format in sas grc

Hello Ashwini,

          If you have SAS Enterprise guide or Base SAS, then you can findout the table on which you are working by navigating to the library i.e. sasoprisk or opdetail. Using PROC CONTENTS you can easily find out which format is associated with the variable you are using.

Regards,

Ashwini

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 4 replies
  • 195 views
  • 0 likes
  • 3 in conversation