Page 1 of 1

Posted: Mon Apr 22, 2002 2:30 pm
by WoMaWil
Put the Label, where you want to jump to in your code or if you don't need it leave it away.

Wolfgang
I wrote the following code:

ReadSeq FileLine From CdrFileVar
On Error
Call DSLogWarn (" Error from " : " dwh/apps/ArdentFiles/cdr_sample.txt" : ", status : " :Status() , " Trial" )
GoTo ErrorExit
End

And I had the following error:

Label 'ErrorExit' not defined

So, my question is:
How can I use the GoTo statement, where can I define the labels and how can I make use of it?



Nancy Bebawy

Edited by - nancy_luca on 04/22/2002 08:50:32

Posted: Mon Apr 22, 2002 6:40 pm
by vmcburney
Here is an example using a GoSub and a label called GetInfo:

ErrCode = DSRunJob(hJob3, DSJ.RUNNORMAL)
ErrCode = DSWaitForJob(hJob3)
Handle = hJob3
gosub GetInfo
...

*************************************************
* Function that returns information about the job
*************************************************

GetInfo:
Status = DSGetJobInfo(Handle, DSJ.JOBSTATUS)

begin case
case Status = DSJS.RUNNING

case Status = DSJS.RUNFAILED
* Fatal Error - No Return
call DSLogWarn("Job Failed: ":Jname, Bname)
end case

return