Hi there.
I took the following code from one topic within this forum.
$INCLUDE DSINCLUDE JOBCONTROL.H
JobName = "MasterJob.p1111111111";
RunHandle = DSAttachJob(JobName, DSJ.ERRNONE)
JStat = DSGetJobInfo(RunHandle, DSJ.JOBSTATUS)
ContinueFlag = @true
begin case
case JStat = 0
JobStatus = "Running"
JStat = DSStopJob(RunHandle)
case JStat = 1
JobStatus = "Finished"
case JStat = 2 ; * Finished with warnings
JobStatus = "Finished (see log)"
case JStat = 3
ContinueFlag = @false
JobStatus = "Aborted"
case JStat = 11
JobStatus = "Validated OK"
case JStat = 12 ; * Validated with warnings
JobStatus = "Validated (see log)"
case JStat = 13
JobStatus = "Failed validation"
case JStat = 21
JobStatus = "Has been reset"
case JStat = 96
ContinueFlag = @false
JobStatus = "Aborted"
case JStat = 97
JobStatus = "Stopped"
case JStat = 98
JobStatus = "Finished"
case JStat = 99
JobStatus = "Compiled"
case @true
ContinueFlag = @false
JobStatus = "Not Compiled"
end case
call dsloginfo("Status of ":JobName:" is ":JobStatus,"MSG");
When I compile this job, I get the following error:
---------------------------------------------------------------------
INCLUDEd file is 'dsinclude/JOBCONTROL.H'
0008.01 * This is unpublished proprietary source code of Vmark Software Inc. ^
Unexpected end of input, $ENDIF missing
?****
1 Errors detected, No Object Code Produced.
(ValidaJob)
---------------------------------------------------------------------
Can anybody tell me what's wrong ? Do I need to install the SDK ?
Thanks in advance.
Guillermo P. Barsky
Buenos Aires - Argentina
Error in include JOBCONTROL.H
Moderators: chulett, rschirm, roy
Guillermo,
The only thing I can see is the call to DSLogInfo. If the call is truly like you have in the post then the name is wrong (should be proper case like DSLogInfo).
I ran this very segment of code as a server routine, BASIC program from UV etc... and it worked correctly.
Try changing the dsloginfo to DSLogInfo (it does matter)
Regards,
Michael Hester
Also, it is not necessary to surround the $INCLUDE by -
$IFNDEF JOBCONTROL.H
$INCLUDE DSINCLUDE JOBCONTROL.H
$ENDIF
The only thing I can see is the call to DSLogInfo. If the call is truly like you have in the post then the name is wrong (should be proper case like DSLogInfo).
I ran this very segment of code as a server routine, BASIC program from UV etc... and it worked correctly.
Try changing the dsloginfo to DSLogInfo (it does matter)
Regards,
Michael Hester
Also, it is not necessary to surround the $INCLUDE by -
$IFNDEF JOBCONTROL.H
$INCLUDE DSINCLUDE JOBCONTROL.H
$ENDIF
Guillermo
The compiler for a routine is wrapped around the Universe BASIC compiler and the error messages are not as informative as the original. That is why Michael jumped out and used the BASIC compiler. Old Universe programmers know these tricks and can debug faster because of it. It helps to know what DataStage is doing underneath the covers and Michael is an ex-Ascential consultant and is very knowledgable of Universe.
Kim.
Kim Duke
DsWebMon - Monitor over the web
www.Duke-Consulting.com
The compiler for a routine is wrapped around the Universe BASIC compiler and the error messages are not as informative as the original. That is why Michael jumped out and used the BASIC compiler. Old Universe programmers know these tricks and can debug faster because of it. It helps to know what DataStage is doing underneath the covers and Michael is an ex-Ascential consultant and is very knowledgable of Universe.
Kim.
Kim Duke
DsWebMon - Monitor over the web
www.Duke-Consulting.com
Guillermo
You can do this as a BASIC program and execute it as a TCL command. You can do it as a job and send the job name as a parameter. You can do it as a routine. Take your pick. You could also write it a Visual Basic routine which is a little more complicated. I would write it as a TCL command. I explained how to compile and catalog in another topic today. Let me know how it goes.
Kim.
Kim Duke
DsWebMon - Monitor over the web
www.Duke-Consulting.com
You can do this as a BASIC program and execute it as a TCL command. You can do it as a job and send the job name as a parameter. You can do it as a routine. Take your pick. You could also write it a Visual Basic routine which is a little more complicated. I would write it as a TCL command. I explained how to compile and catalog in another topic today. Let me know how it goes.
Kim.
Kim Duke
DsWebMon - Monitor over the web
www.Duke-Consulting.com