Help using Base SAS procedures

unfinished Do loop

Regular Contributor
Posts: 161

unfinished Do loop

Can some one help me figure out why I am getting this error:

ERROR: There were 1 unclosed %DO statements. The macro CREATEMPLUSINPUT will not be compiled.

Thank you

This is my code:

%MACRO CreateMplusInput(filesave, filename, saslibname, Qname, dataname, IDname, itemstem, itemlist, numitem, ordervar, maxitemorder, attstem, attcat, numatt,
numclass, structon, structorder, loosen, processors);

options mprint mlogic symbolgen;
%let num_reps=1;
%do seed=1 %to &num_reps;
%let num_skills=5;
%let datafile=dat&seed.;
%let numitem=%eval(2**&num_skills-1);
%let numclass=%eval(2**&num_skills);
%let num_students=100;
%let IDname=num_student;

* CHANGED Import original data into work library, save as .dat file for Mplus;

data _NULL_;
set sas_cdm.student&seed;
file "C:\CDM\&datafile..dat";
put student_num Combinations question1-question&num_item ;
Super Contributor
Super Contributor
Posts: 3,176

Re: unfinished Do loop

Your %DO statement must have a corresponding %END - note that the %MEND statement terminates the %MACRO definition.

Scott Barry
SBBWorks, Inc.
Ask a Question
Discussion stats
  • 1 reply
  • 2 in conversation