Bob,

Try this. It does exactly the same as your while loop but without using while 
which can be troublesome at times.

set var x integer = 1
Label Loop1
--INDENT
   If x <> 1 then
      Goto End1
   Endif
   LOAD tempasn FROM .vfilename ;FILL ;NOCHECK
   set var x = 0
--OUTDENT
Goto Loop1
LABEL End1
Return

The -INDENT and -OUTDENT comments will be obeyed by RSTYLE so you can have a 
loop that looks like a while loop but uses gotos instead.
Put this in a separate code file and it will run fast.

Dennis McGrath



________________________________________
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
Sent: Tuesday, August 19, 2008 3:33 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Load command

It has been one of those frustrating days....

LOAD tempasn FROM .vfilename ;FILL ;NOCHECK
works fine from the R:> or from a CMD file.

However this simple CMD file with a WHILE loop will not work, using the
exact same Load statement.

set var x integer = 1
While x = 1 then
LOAD tempasn FROM .vfilename ;FILL ;NOCHECK
set var x = 0
Endwhile

The LOAD statement returns "Incorrect number of values for this table".
Nothing loads, whereas the exact command at R:> or in a non-while loop file 
works fine.

Tried with WhileOpt on and off.

I am needing to load a list of files into a table.  The files are comma 
delimited, but not all
the rows in  any one file are the same length or have the same number of commas.

This app works fine as long as I choose just one file, but I need to load 
multiple ones, so I
implemented a While Loop, however the LOAD ;FILL;NOCHECK does not seem to
work in the WHILE LOOP.

Any thoughts?

Thanks as always.

-Bob

--
Thompson Technology Consultants
LaPorte, IN 46350
219-363-7441


Reply via email to