Hi All
Can you please point me out the mistake in the following Subroutine
DEFFUN DSGetJobInfo(JobName,Info) Calling "DSJ.DSGetJobInfo"
Ans=DSGetJobInfo(JobName,Info)
It is compiling fine but when i give proper values in JobName and info it is giving me error
The values i m passing as Arg are JobName->DSJ.BasicTrial(Succesful Job)
Info->DSJ.JOBNAME
Thanks in advance
Pavan
SubRoutine returning error values
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 133
- Joined: Tue Nov 23, 2004 11:24 pm
- Location: India
Do not do a "DEFFUN" statement. Simply put this:
into the top of any function that needs access to job control APIs.
Code: Select all
$INCLUDE DSINCLUDE JOBCONTROL.H
$INCLUDE DSINCLUDE DSR_UVCONST.H
$INCLUDE DSINCLUDE DSR_COMCONST.H
Kenneth Bland
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Probably cleaner to just include the appropriate header file than to use a DEFFUN like that:
Check the online help for the DSGetJobInfo routine and you'll see that it doesn't need the job name but the job handle. You'll need to use DSAttachJob first to establish a handle to your job in question and then use the new handle to get the job information.
When you are done, make sure you 'detach' the handle.
Oh, and hopefully where you put 'Info' in the call you posted, you are actually using one of the legitimate InfoTypes, yes?
Code: Select all
$IFNDEF JOBCONTROL.H
$INCLUDE DSINCLUDE JOBCONTROL.H
$ENDIF
When you are done, make sure you 'detach' the handle.
Oh, and hopefully where you put 'Info' in the call you posted, you are actually using one of the legitimate InfoTypes, yes?
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The DSGetJobInfo function is not Cataloged with a "DSJ." prefix.
In fact, it is Cataloged with no prefix.
So either lose the CALLING clause from your DEFFUN statement, or lose the "DSJ." prefix from within the CALLING clause.
Or, as the others have suggested, include JOBCONTROL.H, in which the correct DEFFUN declarations are already coded for you!
In fact, it is Cataloged with no prefix.
So either lose the CALLING clause from your DEFFUN statement, or lose the "DSJ." prefix from within the CALLING clause.
Code: Select all
DEFFUN DSGetJobInfo(JobName,Info)
DEFFUN DSGetJobInfo(JobName,Info) Calling "DSGetJobInfo"
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Premium Member
- Posts: 133
- Joined: Tue Nov 23, 2004 11:24 pm
- Location: India