/**********************************************************************/ INIT: dsid=open('test.example'); return; MAIN: if modified(scrnum) and scrnum ne _blank_ then do; rc=where(dsid,'num='||put(scrnum,5.)); anyobs=attrn(dsid,'any'); if anyobs=0 then do; _msg_= 'No obs met the request. Select again.'; cursor scrnum; return; end; count=0; do while(fetch(dsid) ne -1); count+1; end; _msg_=put(count,5.)|| ' obs are in the subset.'; end; return; TERM: if (dsid > 0) then rc=close(dsid); return; /**********************************************************************/ rc=where(dsid,"name='"||scrname||"'"); /**********************************************************************/ INIT: return; MAIN: if modified(scrnum) and scrnum ne _blank_ then call fsedit('test.example(where=(num='|| put(scrnum,5.)||'))'); return; TERM: return; /**********************************************************************/ call fsedit("test.example(where=(name='"||scrname||"'))", 'test.example.myscrn'); /**********************************************************************/ call fsview("test.example(where=(name='"||scrname|| "' and dept='"||scrdept||"'))"); /**********************************************************************/ call fsview("test.example(where=(name='"||scrname|| "' and dept='"||scrdept||"') cntllev=member)", 'edit','test.example.my.formula'); /**********************************************************************/