- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 08-05-2009 09:26 AM
(1130 views)
%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?
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
%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.
------------
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thanks a lot. Got it.