BookmarkSubscribeRSS Feed
MSK4
Obsidian | Level 7

Here i'm having a dataset in which i have variables called libref and path like below

libref             path

macro          'ahcb/ajbj/new

base             c:/apth/sai

advance       d:/sail/new

 

here i wont create macro, base and advance as  libraries.i have used call execute but i'm getting errors.

thanks a ton.

3 REPLIES 3
Kurt_Bremser
Super User

When yout get ERRORs (or WARNINGs or other messages) you do not understand, always (and I mean ALWAYS) post the whole log of that step (or macro definition and execution) by copy/pasting into a window opened with the </> button.

So please show us your log.

s_lassen
Meteorite | Level 14

As @Kurt_Bremser remarked, you can use the LIBNAME function, e.g.:

Data _null_;
  set librefs; /* or whatever your data set is named */
  if libname(libref,path) then do;
    msg=sysmsg();
    put msg;
    end;
  else
    put 'Libname ' libref 'was assigned to path ' path;
run;

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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
  • 3 replies
  • 1055 views
  • 0 likes
  • 3 in conversation