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.

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
  • 2 replies
  • 961 views
  • 0 likes
  • 2 in conversation