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

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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