How to interpret DOS commands from an old macro

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
adrostan
Posts: 2
Joined: 16 Mar 2021 10:14

How to interpret DOS commands from an old macro

#1 Post by adrostan » 16 Mar 2021 10:20

Hello,

I am trying to interpret the DOS commands in an old macro. We are trying to validate this process and want to be able to replicate the actions taken. I would greatly appreciate your help or if you could forward me to another site, it would be greatly appreciated. See Below. Thanks so very much!!!


%MACRO MMODEL2;
DATA STABLNEW TEMP2 (KEEP=BNO BATCH); SET STABLNEW; BY BATCH;
RETAIN BNO 0;
IF FIRST.BATCH THEN DO; BNO=BNO+1; OUTPUT TEMP2; END;

%DO I = 1 %TO %EVAL(&NBATCH-1);
IF BNO = &I THEN DUMMY&I=1;
ELSE DUMMY&I=0;
%END;
OUTPUT STABLNEW;

PROC REG DATA=STABLNEW OUTEST=FITTED NOPRINT;
MODEL LEVEL = %DO I=1 %TO %EVAL(&NBATCH-1);
DUMMY&I
%END; TIME;
OUTPUT OUT=LIB.MODELXP1 P=PREDICT STDP=STD_ERR;

DATA FITTED; SET FITTED(RENAME=(INTERCEP=TEMP));
KEEP INTERCEP TIME BNO;
%DO I=1 %TO %EVAL(&NBATCH-1);
BNO=&i;
INTERCEP=TEMP+DUMMY&I;
OUTPUT;
%END;
INTERCEP=TEMP;
BNO=&NBATCH;
OUTPUT;

DATA FITTED; MERGE FITTED TEMP2; BY BNO;
%MODELX
%MEND MMODEL2;

Squashman
Expert
Posts: 4486
Joined: 23 Dec 2011 13:59

Re: How to interpret DOS commands from an old macro

#2 Post by Squashman » 16 Mar 2021 10:52

Your code is SAS. This is not a SAS forum. The SAS Institute has a wonderful community forum. I highly recommend you use it.

This forum is used for questions on Windows Scripting Languages. .BAT, Powershell, Vbscript and JScript.

adrostan
Posts: 2
Joined: 16 Mar 2021 10:14

Re: How to interpret DOS commands from an old macro

#3 Post by adrostan » 17 Mar 2021 08:36

Thank you so very much!!! Best Regards, Angela

Post Reply