/* ---------------------------------------- Code exported from SAS Enterprise Guide DATE: Thursday, November 13, 2014 TIME: 11:14:00 AM PROJECT: ExampleProjectTMdata PROJECT PATH: C:\Ddrive\projects\various\DDI\NSFDearColleague\MineMinutes\ExampleProjectTMdata.egp ---------------------------------------- */ /* Unable to determine code to assign library CITE on Local */ /* ---------------------------------- */ /* MACRO: enterpriseguide */ /* PURPOSE: define a macro variable */ /* that contains the file system */ /* path of the WORK library on the */ /* server. Note that different */ /* logic is needed depending on the */ /* server type. */ /* ---------------------------------- */ %macro enterpriseguide; %global sasworklocation; %local tempdsn unique_dsn path; %if &sysscp=OS %then %do; /* MVS Server */ %if %sysfunc(getoption(filesystem))=MVS %then %do; /* By default, physical file name will be considered a classic MVS data set. */ /* Construct dsn that will be unique for each concurrent session under a particular account: */ filename egtemp '&egtemp' disp=(new,delete); /* create a temporary data set */ %let tempdsn=%sysfunc(pathname(egtemp)); /* get dsn */ filename egtemp clear; /* get rid of data set - we only wanted its name */ %let unique_dsn=".EGTEMP.%substr(&tempdsn, 1, 16).PDSE"; filename egtmpdir &unique_dsn disp=(new,delete,delete) space=(cyl,(5,5,50)) dsorg=po dsntype=library recfm=vb lrecl=8000 blksize=8004 ; options fileext=ignore ; %end; %else %do; /* By default, physical file name will be considered an HFS (hierarchical file system) file. */ %if "%sysfunc(getoption(filetempdir))"="" %then %do; filename egtmpdir '/tmp'; %end; %else %do; filename egtmpdir "%sysfunc(getoption(filetempdir))"; %end; %end; %let path=%sysfunc(pathname(egtmpdir)); %let sasworklocation=%sysfunc(quote(&path)); %end; /* MVS Server */ %else %do; %let sasworklocation = "%sysfunc(getoption(work))/"; %end; %if &sysscp=VMS_AXP %then %do; /* Alpha VMS server */ %let sasworklocation = "%sysfunc(getoption(work))"; %end; %if &sysscp=CMS %then %do; %let path = %sysfunc(getoption(work)); %let sasworklocation = "%substr(&path, %index(&path,%str( )))"; %end; %mend enterpriseguide; %enterpriseguide /* Conditionally delete set of tables or views, if they exists */ /* If the member does not exist, then no action is performed */ %macro _eg_conditional_dropds /parmbuff; %local num; %local stepneeded; %local stepstarted; %local dsname; %local name; %let num=1; /* flags to determine whether a PROC SQL step is needed */ /* or even started yet */ %let stepneeded=0; %let stepstarted=0; %let dsname= %qscan(&syspbuff,&num,',()'); %do %while(&dsname ne); %let name = %sysfunc(left(&dsname)); %if %qsysfunc(exist(&name)) %then %do; %let stepneeded=1; %if (&stepstarted eq 0) %then %do; proc sql; %let stepstarted=1; %end; drop table &name; %end; %if %sysfunc(exist(&name,view)) %then %do; %let stepneeded=1; %if (&stepstarted eq 0) %then %do; proc sql; %let stepstarted=1; %end; drop view &name; %end; %let num=%eval(&num+1); %let dsname=%qscan(&syspbuff,&num,',()'); %end; %if &stepstarted %then %do; quit; %end; %mend _eg_conditional_dropds; /* save the current settings of XPIXELS and YPIXELS */ /* so that they can be restored later */ %macro _sas_pushchartsize(new_xsize, new_ysize); %global _savedxpixels _savedypixels; options nonotes; proc sql noprint; select setting into :_savedxpixels from sashelp.vgopt where optname eq "XPIXELS"; select setting into :_savedypixels from sashelp.vgopt where optname eq "YPIXELS"; quit; options notes; GOPTIONS XPIXELS=&new_xsize YPIXELS=&new_ysize; %mend; /* restore the previous values for XPIXELS and YPIXELS */ %macro _sas_popchartsize; %if %symexist(_savedxpixels) %then %do; GOPTIONS XPIXELS=&_savedxpixels YPIXELS=&_savedypixels; %symdel _savedxpixels / nowarn; %symdel _savedypixels / nowarn; %end; %mend; ODS PROCTITLE; OPTIONS DEV=ACTIVEX; GOPTIONS XPIXELS=0 YPIXELS=0; FILENAME EGSRX TEMP; ODS tagsets.sasreport13(ID=EGSRX) FILE=EGSRX STYLE=HtmlBlue STYLESHEET=(URL="file:///C:/Program%20Files/SASHome2/SASEnterpriseGuide/6.1/Styles/HtmlBlue.css") NOGTITLE NOGFOOTNOTE GPATH=&sasworklocation ENCODING=UTF8 options(rolap="on") ; /* START OF NODE: ReadRawMinutes */ %LET _CLIENTTASKLABEL='ReadRawMinutes'; %LET _CLIENTPROJECTPATH='C:\Ddrive\projects\various\DDI\NSFDearColleague\MineMinutes\ExampleProjectTMdata.egp'; %LET _CLIENTPROJECTNAME='ExampleProjectTMdata.egp'; %LET _SASPROGRAMFILE=; GOPTIONS ACCESSIBLE; filename mins "C:\DDRIVE\projects\various\DDI\NSFDearColleague\MineMinutes\Oct20_22Minutes.txt"; libname minlib "C:\DDRIVE\projects\various\DDI\NSFDearColleague\MineMinutes"; data minlib.minutes; infile mins lrecl=520 pad; input para $520.; run; GOPTIONS NOACCESSIBLE; %LET _CLIENTTASKLABEL=; %LET _CLIENTPROJECTPATH=; %LET _CLIENTPROJECTNAME=; %LET _SASPROGRAMFILE=; /* START OF NODE: libname */ %LET _CLIENTTASKLABEL='libname'; %LET _CLIENTPROJECTPATH='C:\Ddrive\projects\various\DDI\NSFDearColleague\MineMinutes\ExampleProjectTMdata.egp'; %LET _CLIENTPROJECTNAME='ExampleProjectTMdata.egp'; %LET _SASPROGRAMFILE=; GOPTIONS ACCESSIBLE; libname Cite "C:\DDRIVE\projects\various\DDI\NSFDearColleague\MineMinutes"; GOPTIONS NOACCESSIBLE; %LET _CLIENTTASKLABEL=; %LET _CLIENTPROJECTPATH=; %LET _CLIENTPROJECTNAME=; %LET _SASPROGRAMFILE=; /* START OF NODE: add TopicDescription and metadata */ %LET _CLIENTTASKLABEL='add TopicDescription and metadata'; %LET _CLIENTPROJECTPATH='C:\Ddrive\projects\various\DDI\NSFDearColleague\MineMinutes\ExampleProjectTMdata.egp'; %LET _CLIENTPROJECTNAME='ExampleProjectTMdata.egp'; %LET _SASPROGRAMFILE=; GOPTIONS ACCESSIBLE; data CITE.TOPICS2(label='A SAS Dataset generated from minutes from NSF1448107 group at Dagstuhl event 14432'); set CITE.TOPICS; Length TopicDescription $ 1000; TopicDescription = catx(" ","Topic ",_topicID," has ",_numDocs," documents and",_name," as Terms:"); run; title 'Contents of the Revised Dataset';proc datasets lib=CITE nolist ; modify TOPICS2 ; xattr options seglen = 4000; XATTR SET DS Abstract='This dataset was created from the October 20-22 minutes of the NSF1448107 sponsored group attending Dagstuhl event 14432. Topics were generated using default settings of SAS Text Miner on the concatenated raw minutes files, one record per paragraph, for the first three days of the meeting.' ; XATTR SET DS AccessRights='Freely available, with attribution' ; XATTR SET DS Contributor='Mary Vardigan(conceptualization, equal), Sam Hume(conceptualization, equal), Sanda Ionescu(conceptualization, equal), Jay Greenfield(conceptualization, equal), Jeremy Iverson(conceptualization, equal), John Kunze(conceptualization, equal), Barry Radler(conceptualization, equal), Stuart Weibel(conceptualization, equal), Michael C. Witt(conceptualization, equal)' ; XATTR SET DS Creator='Larry Hoyle' ; XATTR SET DS Description='This dataset is intended as an example for attaching source information to a dataset and a variable.' ; XATTR SET DS FundingInformation='This dataset was created during Dagstuhl event 14432 by a group funded from NSF grant number1448107.' ; XATTR SET DS Language='en-US'; XATTR SET DS License='Freely available, with attribution' ; XATTR SET DS ParentDatasets='Cite.Minutes, Cite.Topics' ; XATTR SET DS Permanence='Permanent: Unchanging Content' ; XATTR SET DS PublicationDate='2014-11-17' ; XATTR SET DS Publisher='University of Kansas' ; XATTR SET DS RelatedResourceAuthor='Jay Greenfield, Larry Hoyle, Sam Hume, Sanda Ionescu, Jeremy Iverson, John Kunze, Barry Radler, Mary Vardigan, Stuart Weibel, Michael C. Witt' ; XATTR SET DS RelatedResourcePublicationDate='2014-11-17' ; XATTR SET DS RelatedResourcePublisher='University of Kansas' ; XATTR SET DS RelatedResourceRelationship='isDerivedFrom' ; XATTR SET DS RelatedResourceTitle='Minutes for Oct 20-22 2014 from NSF1448107 group at Dagstuhl event 14432' ; XATTR SET DS ResourceType='dataset' ; XATTR SET DS SpatialCoverage='Schloss Dagstuhl, Wadern, Germany' ; XATTR SET DS Study_AnalysisUnit='paragraphs from raw minutes files' ; XATTR SET DS Study_CollectionMethodology='Minutes were generated as Google Docs, one for each day at the Dagstuhl workshop. All participants could simultaneously edit the daily minutes file. Minutes for 2014-10-20, 2014-10-21, and 2014-10-22were copied from downloaded Microsoft Word files and concatenated into a single text file. This file was read into SAS and then used as input for SAS Text Miner with all default options chosen. The Topics results table was exported as this SAS dataset' ; XATTR SET DS Study_FundingInformation='Participant travel and accomodations funded by NSF grant 1448107' ; XATTR SET DS Study_KindOfData='SAS Text Miner Topics results table. Derived topics descriptions, dataset includes metadata in SAS extended attributes' ; XATTR SET DS Study_ProcessingDescription='/* data read from concatenated minutes */ filename mins "C:\DDRIVE\projects\various\DDI\NSFDearColleague\MineMinutes\Oct20_22Minutes.txt"; libname minlib "C:\DDRIVE\projects\various\DDI\NSFDearColleague\MineMinutes"; data minlib.minutes; infile mins lrecl=520 pad; input para $520.; run; /* Dataset CITE.Topics generated from SAS Text Miner from minlib.minutes, CIte.Topics2 then generated by */ data CITE.TOPICS2; set CITE.TOPICS; Length TopicDescription $ 1000; TopicDescription = catx(" ","Topic ",_topicID," has ",_numDocs," documents and",_name," as Terms:"); run;' ; XATTR SET DS Study_Purpose='a sample dataset for enhanced data citation' ; XATTR SET DS TemporalCoverage='2014-10-20 to 2014-10-22' ; XATTR SET DS Title='Topics generated from minutes from NSF1448107 group at Dagstuhl event 14432' ; XATTR SET DS TopicalCoverage='Enhanced citation' ; XATTR SET DS Version='1.0' ; XATTR SET DS VersionDate='2014-11-17' ; XATTR SET DS VersionResponsibility='Larry Hoyle' ; XATTR SET VAR TopicDescription (AccessRights='Freely available, with attribution') ; XATTR SET VAR TopicDescription (AnalysisUnit='paragraphs') ; XATTR SET VAR TopicDescription (Concept='A label for a topic generated by SAS Text Miner combining the topic number, the number of documents relating to teh topic and the key descriptive terms for the document.') ; XATTR SET VAR TopicDescription (Contributor='Mary Vardigan(writing – review & editing, lead)') ; XATTR SET VAR TopicDescription (Creator='Larry Hoyle') ; XATTR SET VAR TopicDescription (Description='A variable to be used with a Topics results dataset produced by SAS Enterprise Miner Test Miner. One string includes topic number, number of related Documents, and key terms.') ; XATTR SET VAR TopicDescription (GenerationInstruction='TopicDescription = catx(" ","Topic ",_n_," has ",_numDocs," documents and",_name," as Terms:");') ; XATTR SET VAR TopicDescription (LevelOfMeasurement='Nominal') ; XATTR SET VAR TopicDescription (Language='en-US') ; XATTR SET VAR TopicDescription (Permanence='Permanent: Unchanging Content') ; XATTR SET VAR TopicDescription (ProcessingDescription='computed with the following SAS assignment statment: TopicDescription = catx(" ","Topic ",_topicID," has ",_numDocs," documents and",_name," as Terms:"); _topicID, _numDocs, and _name are standard variable names from an unsorted Topics dataset saved from Enterprise Miner.') ; XATTR SET VAR TopicDescription (PublicationDate='2014-11-14') ; XATTR SET VAR TopicDescription (Publisher='University of Kansas') ; XATTR SET VAR TopicDescription (ResourceType='Variable') ; XATTR SET VAR TopicDescription (Role='Potentially useful for topic labeling') ; XATTR SET VAR TopicDescription (Title='Topic Descriptor Combining Sequence Number, Number of Related Documents, and Terms List From A SAS Text Miner Text Topics Node Result Table'); XATTR SET VAR TopicDescription (VariableIdentifier='TopicDescription') ; XATTR SET VAR TopicDescription (Version='1.0') ; XATTR SET VAR TopicDescription (VersionDate='2014_10_23') ; XATTR SET VAR TopicDescription (VersionResponsibility='Larry Hoyle') ; contents data = TOPICS2 ;run; quit; GOPTIONS NOACCESSIBLE; %LET _CLIENTTASKLABEL=; %LET _CLIENTPROJECTPATH=; %LET _CLIENTPROJECTNAME=; %LET _SASPROGRAMFILE=; ;*';*";*/;quit;run; ODS _ALL_ CLOSE;