LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (October 2004, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 13 Oct 2004 14:25:43 -0400
Reply-To:     Howard Schreier <Howard_Schreier@ITA.DOC.GOV>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Howard Schreier <Howard_Schreier@ITA.DOC.GOV>
Subject:      Re: trouble with dde.

SASHELP.VCOLUMN is exactly what I meant by "metadata".

In this case however you could skip all of that and just use

put (_all_)(+0) '09';

On Tue, 12 Oct 2004 20:00:46 GMT, jeff harris <jeff.harris@LPOOL.COM> wrote:

>I managed to solve this problem in the end using the below: > > >proc sql noprint; >select name into: colnames separated by ' ' >from sashelp.vcolumn >where libname='WORK' and memname='TRANSPOSE'; >quit; > >%put &colnames; > >options noxwait noxsync; >x'"S:\vintage.xls"' > >filename excel DDE >"Excel|S:\[vintage.xls]Sheet1!R2C1:R38C37" lrecl=1000 ; >data _null_; >set transpose; >file excel ; >put &colnames '09'x >; >run; >x exit; > > >"jeff harris" <jeff.harris@lpool.com> wrote in message >news:VwKad.10$y04.1@newsfe5-win.ntli.net... >> Thanks Howard. >> >> I agree with you, the problem is caused by embedding data, but i can't >think >> of another way to >> solve my problem (I am trying to create a dynamic vintage report). >> >> I hope that put_: does the job as I have never heard of metadata. >> >> Does anybody know of any good links on the web that may be able to help me >> out with this concept please? >> >> Thanks again for your help. >> >> Jeff >> >> "Howard Schreier" <howard_schreier@ITA.DOC.GOV> wrote in message >> news:200410120147.i9C1lFCI019842@listserv.cc.uga.edu... >> > The problem is not with DDE. The problem comes from embedding data >within >> > variable names. You just happened to first encounter the messy >> > consequences when trying to use DDE. >> > >> > The fix may be as simple as writing >> > >> > put _ : ; >> > >> > to avoid having to explicitly code your variable names. If not, you >might >> > have to use the metadata to get your variable names. >> > >> > If you post the step which does the DDE output, somebody may be able to >> > provide more specifics. >> > >> > On Mon, 11 Oct 2004 19:51:46 GMT, jeff harris <jeff.harris@LPOOL.COM> >> > wrote: >> > >> > >I have created a dataset by using proc transpose, which I wish to >export >> > to >> > >excel via dde. >> > > >> > >as below >> > > >> > >proc transpose test out = transpose; >> > >by age; >> > >id start_period; >> > >var balance; >> > >run; >> > > >> > >this creates id variables _10N2001, _11N2001 etc. >> > > >> > >the issue I have is that I intend to run this code monthly and the >names >> > of >> > >the id variables (start_period) will change. >> > >consequently this would mean the dde code, whereby I declare the >> variables >> > >to be exported would need to be manually updated. >> > > >> > >I am new to SAS programming and realise I may be going about this >problem >> > in >> > >an inefficient way. >> > > >> > >I hope this makes sense and would be grateful for any suggestions that >> may >> > >help. >> > > >> > >Thanks >> > > >> > >Jeff >> >>


Back to: Top of message | Previous page | Main SAS-L page