LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (April 2001, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Sat, 28 Apr 2001 00:35:41 -0700
Reply-To:     lend@IWON.COM
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Len De La Cruz <lend@IWON.COM>
Subject:      Re: Capturing File Data in UNIX
Comments: To: RChilds@bostonbio.com
In-Reply-To:  <OFB533EF55.D967887B-ON85256A3B.004872BC@bostonbio.com>
Content-Type: text/plain; charset="ISO-8859-1"

Hi,

You are absolutely right! I got it working before I got your reply. I used Telnet instead of SAS Spawner.

Thank you so much for your help. Also, I would like to thank the following: Jonathan Goldberg, Karsten Self and others who responded to my query.

-- Original Message --

> >That could explain the problem. You have to "PUT" the macro variable over >to the remote host. To do this, you need to use %SYSLPUT. Have you used >%SYSLPUT to copy the macro variable from the local host to the remote host? > >%SYSLPUT(remote-mac-varname, value or resolved-local-mac-var); > >For example, > >%SYSLPUT(THEFILE,&thefile); creates a macro variable called thefile on >the >remote host with the resolved value of the macro variable called thefile >on >the local host. > >Randy > > > >

> > lend@iwon.com

> > To: RChilds@bostonbio.com

> > 04/26/2001 cc:

> > 11:14 PM Subject: Re: Capturing File >Data in UNIX >

> >

> > > > > >Hi, > >Yes, I invoked the method in WEBAF using SAS connect. > >-- Original Message -- > >> >>Len, >> I can't see any reason for this to not work. I wrote an AF SCL >>program with only the submit continue block and it worked just fine. >> >> When you say that you are invoking the method "remotely", do you mean >>that you are invoking the method using SAS/CONNECT? >> >>Randy >> >> >> >> > >> >> lend@iwon.com > >> >> To: RChilds@bostonbio.com > >> >> 04/26/2001 cc: "SAS-L " ><SAS-L@LISTSERV.UGA.EDU> >> >> 02:38 PM Subject: Re: Capturing File >>Data in UNIX >> > >> >> > >> >> >> >> >> >>Hi, >> >>I was able to make these codes work using interactive SAS. >>This is giving me what I wanted but when I invoked >>the method remotely, it does not work. Why? >> >>Here is the code: >> >> submit continue ; >> %let thefile=/xxx/sas/data/usrexport/&workid./&deptid..csv; >> filename ip PIPE "ls -al &thefile"; >> data two ; >> length filedat $12.; >> infile ip ; >> INPUT @42 filedat $12. ; >> put filedat ; >> run; >> endsubmit ; >> dsid2=open('two'); >> rc=fetch(dsid2); >> filedat=getvarc(dsid2,1); >> rc=insertc(ret,"filedat",-1,filedat); >> rc=close(dsid2); >> >>I could not see why it is not working. >> >> >>-- Original Message -- >> >>>Len, >>> There are a couple of ways to fix your filename statement. The >>>easiest solution is to simply not pipe the output of the ls command to >>a >>>file. Pass the output of the ls command to the cut command. >>> >>>filename test pipe 'ls -l /xxxx/sas/data/500080.csv | cut -c41-53'; >>> >>> Otherwise, if there is a reason that you need to store that >>>information in a file first, then use the following filename statement. >>>You can use a semi-colon to separate UNIX commands. >>> >>>filename test pipe 'ls -l /xxxx/sas/data/500080.csv > temp ; cut -c41-53 >>>temp'; >>> >>>Hope this helps. >>> >>>Randy Childs >>>Senior Statistical Programmer >>>Boston Biostatistics, Inc. >>> >>>------------------------------ >>>Date: Thu, 26 Apr 2001 05:14:56 -0700 >>>From: Len De La Cruz <lend@IWON.COM> >>>Subject: Capturing File Data in UNIX >>> >>>Hi all, >>> >>>I am trying to capture the file date creation using this syntax : >>> >>>filename test pipe 'ls -l /xxxx/sas/data/500080.csv >| temp' | 'cut >>-c41-53 >>>temp' ; >>> >>>What could be wrong? >>> >>>Thanks. >>> >>> >>> >>>Introducing iWon Cash Points...now everyone's a winner on iWon.com. >>>Visit http://www.iwon.com now and start earning iWon Cash Points today! >>> >>> >> >> >> >> >>Introducing iWon Cash Points...now everyone's a winner on iWon.com. >>Visit http://www.iwon.com now and start earning iWon Cash Points today! >> >> >> >> >> >> >> > > > > >Introducing iWon Cash Points...now everyone's a winner on iWon.com. >Visit http://www.iwon.com now and start earning iWon Cash Points today! > > > > > > >

Introducing iWon Cash Points...now everyone's a winner on iWon.com. Visit http://www.iwon.com now and start earning iWon Cash Points today!


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