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 (August 2005, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 1 Aug 2005 10:37:21 -0400
Reply-To:     Patrice.Bourdages@IAAH.CA
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Patrice Bourdages <Patrice.Bourdages@IAAH.CA>
Subject:      Silly problem with a Shell on Solaris 10
Content-Type: text/plain; charset="iso-8859-1"

Hello to you all ....

There is something wrong with the code below and I can't pinpoint the problem... The code seems to be looping correctly except that it "unzips" only the first file encounterred and not the rest....

I have a table called "finmois.jdract" which contains the following a list of tables stored within a ZIP file that looks like this :

NomFichier NoObs NomZip CLTMAS 10000 CLTMASZ CLMHDR 10434 CLMHDRZ Etc.

The following piece of code simply browse within this table and proceed to extract the ZIP name (NomZip) and launch a Unix Shell that is suppose to redirect to a specific directory and lunch the "unzip"....

rsubmit; data _null_; ** Let's see how many tables there is in the table "finmois.jdract" **; set finmois.jdract nobs = HowManyTables; ** From the first obs in "finmois.jdract" till the end, loop **; do i = 1 to HowManyTables; put i "/ " HowManyTables; set finmois.jdract point = i; ** Grad the "NomZip" variable and store into a macro variable called "QuelZip" **; call symput("QuelZip", NomZip); x "cd /data2/as400/download/ftpdev; unzip -j -o &QuelZip."; if i = HowManyTables then stop; end; run; endrsubmit;

I've been at this problem for a couple of days and I'm giving up...

I'm calling for the BUG-Busters of SAS-L to help me out ...

TIA, Patrice :-)


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