- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 05-19-2011 11:11 AM
(7682 views)
Hi ,
I want to put a Alpha symbol in dataset how to present , i tried using the Byte(224) , but i am not getting the alpha symbol.
How to store the alpha symbol in character variable?
Thanks
Sudhakar
I want to put a Alpha symbol in dataset how to present , i tried using the Byte(224) , but i am not getting the alpha symbol.
How to store the alpha symbol in character variable?
Thanks
Sudhakar
11 REPLIES 11
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hello Sudhakar_A,
What are you trying to accomplish? I used BYTE(224) and got the following result:
[pre]
data a;
x=BYTE(224);
y=BYTE(65);
put x= y=;
run;
[/pre]
In the LOG:
[pre]
x=à y=A
[/pre]
Is this what you need?
Sincerely,
SPR
What are you trying to accomplish? I used BYTE(224) and got the following result:
[pre]
data a;
x=BYTE(224);
y=BYTE(65);
put x= y=;
run;
[/pre]
In the LOG:
[pre]
x=à y=A
[/pre]
Is this what you need?
Sincerely,
SPR
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi SPR,
I want alpha symbol should be presented as it is in the dataset.
Thanks
Sudhakar
I want alpha symbol should be presented as it is in the dataset.
Thanks
Sudhakar
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
The following program outputs all available letters, digits ans symbols:
[pre]
data a;
do i=0 to 255;
s=BYTE(i);
output;
end;
run;
[/pre]
I ran it om my computer. the output does not contain the alpha character. Your result could be different because characters 127-255 depend on character set used.
SPR
[pre]
data a;
do i=0 to 255;
s=BYTE(i);
output;
end;
run;
[/pre]
I ran it om my computer. the output does not contain the alpha character. Your result could be different because characters 127-255 depend on character set used.
SPR
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi SPR,
Forgot about my way of approach, can please you tell me how to bring the alpha symbol in the dataset?
Thanks
Sudhakar
Forgot about my way of approach, can please you tell me how to bring the alpha symbol in the dataset?
Thanks
Sudhakar
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
How are you going to use a variable contaning greek letters? May be you need them only for titles, axis , etc? For example, for Title you can use the following code:
[pre]
ods escapechar="^";
title "Greek letter ^{unicode 03B1}";
data a;
a=1;
run;
proc print data=a;
run;
[/pre]
that prints greek alpha in the title;
SPR
[pre]
ods escapechar="^";
title "Greek letter ^{unicode 03B1}";
data a;
a=1;
run;
proc print data=a;
run;
[/pre]
that prints greek alpha in the title;
SPR
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I dont want to print but to store the symbol in the dataset.
Thanks
Sudhakar
I dont want to print but to store the symbol in the dataset.
Thanks
Sudhakar
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi Sudhakar,
Can you please provide us an example how your dataset needs to generate?
Thanks
Can you please provide us an example how your dataset needs to generate?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi Raveena,
Any way is ok, Datalines, infile, or import, anything is ok for me, but i want the alpha character in the dataset, and i want to submit the dataset with alpha symbol to client.
I want to create a text variable in the dataset with alpha character
Thanks
Sudhakar Message was edited by: Sudhakar_A
Any way is ok, Datalines, infile, or import, anything is ok for me, but i want the alpha character in the dataset, and i want to submit the dataset with alpha symbol to client.
I want to create a text variable in the dataset with alpha character
Thanks
Sudhakar Message was edited by: Sudhakar_A
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi Sudhakar,
I am not sure what exactly you are expecting in the dataset.If you need to create a
new variable with alpha characters then you can use the below code,
data test;
input name $ age ;
datalines;
abc 23
fgh 6
;
run;
data test1;
set test;
alpha ="A";
run;
The example above illustrates creating a new character variable named “alpha” which contains the letter “A” for all observations in the dataset. Note that the value must be enclosed either in single or double-quotes, because this is a character variable. (alpha ="A";)
Thanks
I am not sure what exactly you are expecting in the dataset.If you need to create a
new variable with alpha characters then you can use the below code,
data test;
input name $ age ;
datalines;
abc 23
fgh 6
;
run;
data test1;
set test;
alpha ="A";
run;
The example above illustrates creating a new character variable named “alpha” which contains the letter “A” for all observations in the dataset. Note that the value must be enclosed either in single or double-quotes, because this is a character variable. (alpha ="A";)
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi Raveena,
Thanks for that. I dont want a variable name as alpha in the dataset but, i want a variable which holds the greek alpha character symbol as a value in the observation.
Thanks
Sudhakar
Thanks for that. I dont want a variable name as alpha in the dataset but, i want a variable which holds the greek alpha character symbol as a value in the observation.
Thanks
Sudhakar
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
It is possible to use UTF-16 encoding and the hexadecimal code ( var='03b1'x; ) but there is no way to ensure that it will appear correctly for someone else. I would suggest contacting tech support to see if they have a solution.