Hi Bob!   ASAIK, the error variable always returns an integer.   I've never 
seen it return a word.  Maybe you're using the variable vError somewhere 
else in your system and it's a text, and not being cleared?   Try 
initializing:  set var vError INT = NULL before you set your error variable....

Karen

 
> I must not be understanding the error variable function, so hopefully 
> someone can help out.
> 
>   
> 
>  In an app, I am copying files to a different folder.  I have the 
> following setup to check for errors.
> 
>  Set Error Variable ON
> 
>  SET ERROR VAR vError
> 
>  ....
> 
>  (many lines of code)
> 
>  .....
> 
>  SET VAR vedifile = 'G:\RBTI\Edi_V8\*.850'
>   SET VAR vcopyto = 'G:\RBTI\Edi_V8\Archive\*.850'
>   COPY .vedifile .vcopyto
> 
>    IF verror <>0 THEN
>     CLS
>     PAUSE 1 USING 'Error Archiving File!  Contact IT Department' +
>     CAPTION 'House of Fara EDI System' ICON stop
> 
>    ELSE
>     PROPERTY MessageText caption 'File(s) archived!'
>     ERASE .vedifile
>   ENDIF
> .....more code
> 
> 
> The HELP files state :
> 
>  "R:BASE resets the error variable to zero as each command is successfully 
> run"
> 
>   
> 
>  The issue seems to be that vError does not always return the same value
> 
>  if the operation succeeds.   I have traced the app and also displayed the 
> value for
> 
>  vError while running the app and sometimes it returns the word "OK" and 
> 
> other times it returns the number  "0"  (ZERO) if the file copy succeeds.  
>  
> 
> Therefore my  "IF vError <>0 Then"   does not always work.
> 
>   
> 
>  Is the  ERROR Variable function not be applicable to the file COPY 
> command?
> 
>   
> 
>  What other methods are being used to verify a copy command has succeeded?
> 
>   
> 
>  Thanks in advance for any education on the error variable function.
> 
>   
> 
>  (version v8)
> 
>   
> 
>  -Bob
> 
>   
> 
>  
> 
> 
> 
> 

Reply via email to