From: Mark Sussman on 15 Mar 2010 11:38 Hell again, I'm still working on the same DDE project, but now am trying to implement a macro in order to create all the different excel spreadsheets I need. I'm having a little trouble with the double quotes associated with DDE syntax. Below is my code, but instead of the name of the spreadsheet being saved as the filename, %var. is. I can't seem to figure out the correct combination of code to fix this problem, please help. options noxsync noxwait xmin; %macro ID(var); data plaintiff(drop=sheet_name); set idde; if sheet_name="&var."; run; filename sas2xl dde 'excel|system'; data _null_; length fid rc start stop time 8; fid=fopen('sas2xl','s'); if (fid le 0) then do; rc=system('start excel'); start=datetime(); stop=start+10; do while (fid le 0); fid=fopen('sas2xl','s'); time=datetime(); if (time ge stop) then fid=1; end; end; rc=fclose(fid); run; /*Save opened Excel Workbook*/ data _null_; file sas2xl; put '[app.activate("microsoft excel - book1")]'; put '[error(false)]'; put '[save.as("Z:\6204 Abbey\SAS Export\Individual DDE 3yr \&var.")]'; run; %MEND; %id(%str(Allberry, Loretta Ann - 5025));
From: xlr82sas on 15 Mar 2010 12:45 On Mar 15, 8:38 am, Mark Sussman <msuss...(a)gmail.com> wrote: > Hell again, > > I'm still working on the same DDE project, but now am trying to > implement a macro in order to create all the different excel > spreadsheets I need. I'm having a little trouble with the double > quotes associated with DDE syntax. Below is my code, but instead of > the name of the spreadsheet being saved as the filename, %var. is. I > can't seem to figure out the correct combination of code to fix this > problem, please help. > > options noxsync noxwait xmin; > %macro ID(var); > > data plaintiff(drop=sheet_name); > set idde; > if sheet_name="&var."; > run; > > filename sas2xl dde 'excel|system'; > data _null_; > length fid rc start stop time 8; > fid=fopen('sas2xl','s'); > if (fid le 0) then do; > rc=system('start excel'); > start=datetime(); > stop=start+10; > do while (fid le 0); > fid=fopen('sas2xl','s'); > time=datetime(); > if (time ge stop) then fid=1; > end; > end; > rc=fclose(fid); > run; > > /*Save opened Excel Workbook*/ > data _null_; > file sas2xl; > put '[app.activate("microsoft excel - book1")]'; > put '[error(false)]'; > put '[save.as("Z:\6204 Abbey\SAS Export\Individual DDE 3yr > \&var.")]'; > run; > > %MEND; > > %id(%str(Allberry, Loretta Ann - 5025)); Just some thoughts perl and R have some much more powerful integration technologies with excel and you do not have to have excel up and running or even have excel on the desktop. You can use an open office 'excel' to open the spreadsheets. Also I think microsoft has a spreadsheet viewer or SAS can view the sheets? R and perl can even create the binary sheet, SAS tagsets do not create a binary excel file, the tagset creates XML. Personally I think the XML is a better alternative but may need a year or two more to equal the tools avalailble with binary excel, ie ODBC, libname, SAS-Acccess... R and perl. What we need is better SAS integration with perl and R.
From: montura on 15 Mar 2010 12:54 PERL and R? You must drunk. Who the hell needs that?
From: xlr82sas on 15 Mar 2010 16:06 On Mar 15, 9:54 am, montura <montura...(a)gmail.com> wrote: > PERL and R? > You must drunk. Who the hell needs that? Hi, I am not sure where Microsoft is going with DDE(see below), but this may interest some readers. What happened to DDE Share? Applies to all editions of Windows Vista If you used previous versions of Windows, you might know DDE Share as a tool for managing the way programs communicate and share data over a network. DDE Share is not available in this version of Windows because it has been replaced by other methods for communicating and sharing data among computers. My concern: ========= In the past there was no way to copy a networked shared excel spreadsheet while multiple users were updating the file, this is why I needed DDE. Vista has something called hobocopy? to copy 'exclusive open' files? I am investigating. ======================================================================================================= Also the list of R users now has some very heavey weight 'past' SAS power users? Note Micheal Freindly, not to mention Frank Harrel and others. They can't all be wrong. The list below is only about 1/5th of the 'new/updated' packages in R last week. UScensus2000blkgrp (0.03) Zack W. Almquist http://crantastic.org/packages/UScensus2000blkgrp US Census 2000 Block Group shapefiles and additional demographic data from the SF1 100 percent files. This data set contains polygon files in lat/lon coordinates and the corresponding demographic data for a number of different variables. Michael Friendly http://crantastic.org/packages/vcdExtra Provides additional data sets, methods and documentation to complement the vcd package for Visualizing Categorical Data. Rsolnp (1.0-2) Alexios Ghalanos http://crantastic.org/packages/Rsolnp General Non-linear Optimization Using Augmented Lagrange Multiplier Method * saws (0.9-3.1) M.P. Fay http://crantastic.org/packages/saws Tests coefficients with sandwich estimator of variance and with small samples. Regression types supported are gee, cox regression, and conditional logistic regression. RcppExamples (0.1.0) Dirk Eddelbuettel and Romain Francois http://crantastic.org/packages/RcppExamples Examples for Seamless R and C++ integration The Rcpp package contains a C++ library that facilitates the integration of R and C++ in various ways. This package provides examples. RcmdrPlugin.MAd (0.2) AC Del Re http://crantastic.org/packages/RcmdrPlugin-MAd This is an R-Commander plug-in for the MAd package (Meta-Analysis with Mean Differences). This package enables the user to conduct a meta-analysis in a menu-driven, graphical user interface environment (e.g., SPSS), while having the full statistical capabilities of R and the MAd package. The MAd package itself contains a variety of useful functions for conducting a research synthesis with mean differences data. One of the unique features of the MAd package is in its integration of user-friendly functions to complete many of the statistical steps involved in a meta-analysis with mean differences. It uses recommended procedures as described in The Handbook of Research Synthesis and Meta-Analysis (Cooper, Hedges, & Valentine, 2009). ordinal (2010.03-04) Rune Haubo B Christensen http://crantastic.org/packages/ordinal This package implements likelihood based models for ordinal (ordered categorical) data based on cumulative probabilities in the framework of cumulative link models. This includes the important proportional odds model but also allows for general regression structures for location as well as scale of the latent distribution, i.e. additive as well as multiplicative structures, structured thresholds (cut-points), nominal effects and flexible link functions. Further, a range of estimation procedures and a range of auxiliary functions are implemented. mtsc (0.0.1) Charlotte Maia http://crantastic.org/packages/mtsc Place-holder package (roughly speaking an empty package) for finding clusters in multivariate timeseries. Full implementation pending. MplusAutomation (0.2-3) Michael Hallquist http://crantastic.org/packages/MplusAutomation The MplusAutomation package leverages the flexibility of the R language to automate latent variable model estimation and interpretation using Mplus, a powerful latent variable modeling program developed by Muthen and Muthen (www.statmodel.com). Specifically, MplusAutomation provides routines for creating related groups of models, running batches of models, and extracting and tabulating model parameters and fit statistics.
From: xlr82sas on 16 Mar 2010 14:35 On Mar 15, 1:06 pm, xlr82sas <xlr82...(a)aol.com> wrote: > On Mar 15, 9:54 am, montura <montura...(a)gmail.com> wrote: > > > PERL and R? > > You must drunk. Who the hell needs that? > > Hi, > > I am not sure where Microsoft is going with DDE(see below), but this > may interest some readers. > > What happened to DDE Share? > > Applies to all editions of Windows Vista > > If you used previous versions of Windows, you might know DDE Share as > a tool for managing the way programs communicate and share data over a > network. DDE Share is not available in this version of Windows because > it has been replaced by other methods for communicating and sharing > data among computers. > > My concern: > ========= > In the past there was no way to copy a networked shared excel > spreadsheet while multiple users were updating the file, this is why I > needed DDE. > Vista has something called hobocopy? to copy 'exclusive open' files? I > am investigating. > > ======================================================================================================= > Also the list of R users now has some very heavey weight 'past' SAS > power users? Note Micheal Freindly, not to mention Frank Harrel and > others. > They can't all be wrong. > > The list below is only about 1/5th of the 'new/updated' packages in R > last week. > > UScensus2000blkgrp (0.03) > Zack W. Almquist > http://crantastic.org/packages/UScensus2000blkgrp > > US Census 2000 Block Group shapefiles and additional demographic > data > from the SF1 100 percent files. This data set contains polygon files > in lat/lon coordinates and the corresponding demographic data for a > number of different variables. > > Michael Friendly > http://crantastic.org/packages/vcdExtra > > Provides additional data sets, methods and documentation to > complement > the vcd package for Visualizing Categorical Data. > > Rsolnp (1.0-2) > Alexios Ghalanos > http://crantastic.org/packages/Rsolnp > > General Non-linear Optimization Using Augmented Lagrange Multiplier > Method > > * saws (0.9-3.1) > M.P. Fay > http://crantastic.org/packages/saws > > Tests coefficients with sandwich estimator of variance and with > small > samples. Regression types supported are gee, cox regression, and > conditional logistic regression. > > RcppExamples (0.1.0) > Dirk Eddelbuettel and Romain Francois > http://crantastic.org/packages/RcppExamples > > Examples for Seamless R and C++ integration The Rcpp package > contains > a C++ library that facilitates the integration of R and C++ in > various ways. This package provides examples. > > RcmdrPlugin.MAd (0.2) > AC Del Re > http://crantastic.org/packages/RcmdrPlugin-MAd > > This is an R-Commander plug-in for the MAd package (Meta-Analysis > with > Mean Differences). This package enables the user to conduct a > meta-analysis in a menu-driven, graphical user interface environment > (e.g., SPSS), while having the full statistical capabilities of R > and the MAd package. The MAd package itself contains a variety of > useful functions for conducting a research synthesis with mean > differences data. One of the unique features of the MAd package is > in its integration of user-friendly functions to complete many of > the statistical steps involved in a meta-analysis with mean > differences. It uses recommended procedures as described in The > Handbook of Research Synthesis and Meta-Analysis (Cooper, Hedges, & > Valentine, 2009). > > ordinal (2010.03-04) > Rune Haubo B Christensen > http://crantastic.org/packages/ordinal > > This package implements likelihood based models for ordinal (ordered > categorical) data based on cumulative probabilities in the framework > of cumulative link models. This includes the important proportional > odds model but also allows for general regression structures for > location as well as scale of the latent distribution, i.e. additive > as well as multiplicative structures, structured thresholds > (cut-points), nominal effects and flexible link functions. Further, > a range of estimation procedures and a range of auxiliary functions > are implemented. > > mtsc (0.0.1) > Charlotte Maia > http://crantastic.org/packages/mtsc > > Place-holder package (roughly speaking an empty package) for finding > clusters in multivariate timeseries. Full implementation pending. > > MplusAutomation (0.2-3) > Michael Hallquist > http://crantastic.org/packages/MplusAutomation > > The MplusAutomation package leverages the flexibility of the R > language to automate latent variable model estimation and > interpretation using Mplus, a powerful latent variable modeling > program developed by Muthen and Muthen (www.statmodel.com). > Specifically, MplusAutomation provides routines for creating related > groups of models, running batches of models, and extracting and > tabulating model parameters and fit statistics. Hi SAS-Lers, I have a had a few questions about hobocopy. I have not used it and I don't think it is part of vista. Here is the link for hobocopy. http://tiny.cc/BYuQl
|
Pages: 1 Prev: data manipulation Next: how to produce color output for "ods graphics"? |