$offlisting $if not errorfree $exit $if not settype %1 $abort '$libinclude select error: %1 is not a set'; $if not settype %2 $abort '$libinclude select error: %2 is not a set'; $if not defined %1 $abort '$libinclude select error: %1 is not defined'; $if not dimension 1 %1 $abort '$libinclude select error: %1 is not one dimensional'; $if not dimension 1 %2 $abort '$libinclude select error: %2 is not one dimensional'; $if not exist "%gams.ldir%select.vbs" $abort 'Error -- do not find %gams.ldir%select.vbs'; %2(%2)$(sum(%1$sameas(%1,%2),1)=0) = no; if (card(%2)>1, display "$libinclude select warning: set %2 is not a singleton. Will use default choice.";); %2(%2)$(card(%2)>1) = no; loop(%1$(card(%2)=0), %2(%1)=yes;); $set vbsfile %gams.ldir%select.vbs $if exist select.vbs $set vbsfile select.vbs $if not defined kwsf file kwsf /'%gams.scrdir%select.wsf'/; kwsf.lw=0; put kwsf, ''/ ''/ ''/''/''/;putclose; execute 'wscript "%gams.scrdir%select.wsf"'; execute_load '%gams.scrdir%select.gdx',%2; execute 'rm -f %gams.scrdir%select.*';