Functions for NLS |
Category: | Variable Information |
Syntax | |
Arguments | |
Details | |
Examples | |
See Also |
Syntax |
VARTRANSCODE(data-set-id, var-num) |
specifies the data set identifier that the OPEN function returns.
specifies the position of the variable in the SAS data set.
Tip: | The VARNUM function returns this value. |
Details |
Transcoding is the process of converting data from one encoding to another. The VARTRANSCODE function returns 0 if the var-num variable does not transcode its value, or 1 if the var-num variable transcodes its value.
For more information about transcoding variables, see Transcoding in SAS National Language Support (NLS): Reference Guide. For information about encoding values and transcoding data, see SBCS, DBCS, and Unicode Encoding Values When Transcoding SAS Data in SAS National Language Support (NLS): Reference Guide.
Examples |
The following example shows how to determine whether a character variable is transcoded:
data a; attrib x length=$3. transcode=no; attrib y length=$3. transcode=yes; x='abc'; y='xyz'; run; data _null_; dsid=open('work.a','i'); nobs=attrn(dsid,"nobs"); nvars=attrn(dsid,"nvars"); do i=1 to nobs; xrc=fetch(dsid,1); do j=1 to nvars; transcode = vartranscode(dsid,j); put transcode=; end; end; run;
SAS writes the following output to the log:
transcode=0 transcode=1
See Also |
Functions:
|
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.