BookmarkSubscribeRSS Feed
deleted_user
Not applicable
%macro readvmf(dataread);

data abc&&cff&&veon;
infile &dataread missover lrecl=&reclen firstobs=2;
input @1 comp $char13.
@14 polno $char10.
@24 rectyp $char2.
@26 lob $char1.

%mend;

%macro outvmf(dataout);
data &&outdata (compress=yes);
set &dataout;
label comp ='Company ';
label company ='Code';
label polno ='Number';
label rectyp ='Type';

%mend;

%macro loadvmf;
%if &load = 1 %then %do;
%readvmf(indata1);
%outvmf(abc&&cff&&veon);
%end;

%mend;

%loadvmf;

I don’t understand where dataread and dataout (see text in bold,italic,underlined) are being created. There is nowhere that these parameters are being given a value. Can you please explain me this?
2 REPLIES 2
Flip
Fluorite | Level 6
%macro readvmf(dataread);
------------

They are the parameters you are feeding the macro.
%readvmf(indata1);
%outvmf(abc&&cff&&veon);

So they are "indata1" and whatever the abc thing resolves to. You will need to look at the source of the components of CFF and VEON.

And by the way, most of the double "&" are not needed in this context.
deleted_user
Not applicable
Thanks a lot. Got it.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 621 views
  • 0 likes
  • 2 in conversation