BookmarkSubscribeRSS Feed
R_A_G_
Calcite | Level 5
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 ;
RUN;
%mend;
1 REPLY 1
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Your %DO statement must have a corresponding %END - note that the %MEND statement terminates the %MACRO definition.

Scott Barry
SBBWorks, Inc.

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 1 reply
  • 1077 views
  • 0 likes
  • 2 in conversation