DATA Step, Macro, Functions and more

what does "&schema." mean?

Reply
User
Posts: 1

what does "&schema." mean?

Hi, I am a new beginner on SAS. Get a script from a programmer.

 

Anyone would be able to explain what does '&schema.' mean? what is the relationship between lib and db shown as below? Thanks.

 

%conn;
%conxn(P_AU_EDW1_FC_V,fc,lib);


proc sql;
%conxn(&schema., PAT, db);

...

quit;

Super User
Posts: 10,284

Re: what does "&schema." mean?

We'd need the macro code for detailed answers, but I guess you should look at https://en.wikipedia.org/wiki/Database_schema

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
Super User
Posts: 13,584

Re: what does "&schema." mean?


@shawnyap wrote:

Hi, I am a new beginner on SAS. Get a script from a programmer.

 

Anyone would be able to explain what does '&schema.' mean? what is the relationship between lib and db shown as below? Thanks.

 

%conn;
%conxn(P_AU_EDW1_FC_V,fc,lib);


proc sql;
%conxn(&schema., PAT, db);

...

quit;


This "means" that your programmer needs to learn how to document code shared or used by others.

 

&schema refers to a macro variable which would resolve to some text. Where the value is set depends on previous code or environment perhaps. Your shown use implies that at least one use of the macro variable is to pass the first parameter to another macro code block (the %conxn() bit). The documentation for the macro should tell someone what is expected for that first positional parameter.

Ask a Question
Discussion stats
  • 2 replies
  • 105 views
  • 0 likes
  • 3 in conversation