BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
sathya66
Barite | Level 11

Hi All,

what is the equivalent code  in data step.

 

PROC SQL;
create table test as SELECT * FROM DICTIONARY.Columns WHERE UPCASE(LIBNAME)=”WORK”; QUIT;

if I write below code in data step, it is giving library dictionary has more than 8 character length  ERROR.

data test;
set dictionary.columns;
where UPCASE(LIBNAME_="work";
run;

thanks,

SS

1 ACCEPTED SOLUTION

Accepted Solutions
PeterClemmensen
Tourmaline | Level 20

Dictionary tables are available from PROC SQL only. 

 

The data step equivalent is

 

data test;
   set sashelp.vcolumn;
   where upcase(libname)='WORK';
run;

View solution in original post

2 REPLIES 2
PeterClemmensen
Tourmaline | Level 20

Dictionary tables are available from PROC SQL only. 

 

The data step equivalent is

 

data test;
   set sashelp.vcolumn;
   where upcase(libname)='WORK';
run;
ed_sas_member
Meteorite | Level 14

Hi @sathya66 

 

You can access the Dictionary tables in a data step through their corresponding SASHELP views:

Examples:

Dictionary.tables <=> Sashelp.Vtable

Dictionary.columns <=> Sashelp.Vcolumn

Dictionary.titles <=> Sashelp.Vtitle

...

 

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1048 views
  • 0 likes
  • 3 in conversation