Questions about subroutine
Moderators: chulett, rschirm, roy
Questions about subroutine
Hi,
I was trying to write a my own subroutine to be called in the job control. I was able to create the routine sucessfully. But when I tried to call the routine in the job control, it did not pass the compilation. It mistakes routine name as array name.
Here is the defintion of my routine:
Subroutine RunDW(InpurArg,ErrorCode)
Call DSLogInfo("The subroutine is called",InputArg)
ErrorCode = 0;
Return
And my code to call the routine is
error = RunDW("Test")
Can anybody shed some lights?
Thanks,
Carol
I was trying to write a my own subroutine to be called in the job control. I was able to create the routine sucessfully. But when I tried to call the routine in the job control, it did not pass the compilation. It mistakes routine name as array name.
Here is the defintion of my routine:
Subroutine RunDW(InpurArg,ErrorCode)
Call DSLogInfo("The subroutine is called",InputArg)
ErrorCode = 0;
Return
And my code to call the routine is
error = RunDW("Test")
Can anybody shed some lights?
Thanks,
Carol
Subroutines are called:
Code: Select all
CALL DSU.yourroutinename(InputArg, ErrorCode)
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
One more question
Hi
I was trying to write a subroutine, the subroutine is going to execute a job, the job name would be passed through InputArg. But I had difficulty compiling this subroutine, it keeps saying DSAttachJob never dimensioned etc.
I don't understand why? And any solutions to that problem?
thanks,
I was trying to write a subroutine, the subroutine is going to execute a job, the job name would be passed through InputArg. But I had difficulty compiling this subroutine, it keeps saying DSAttachJob never dimensioned etc.
I don't understand why? And any solutions to that problem?
thanks,
Put this at the top of your routine:
Code: Select all
$INCLUDE DSINCLUDE JOBCONTROL.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
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
One can get away without bullet-proofing routines, because JOBCONTROL.H is never (up to version 7.0 anyway) automatically defined/included in user-written Routines.chulett wrote:Hmmm... hmmm... hmmm... patiently waits for Ray to whack Ken with the same stick he whacked me with [taps foot]
I still put the check in anyway - you never know what "they" might do in a later version.
Code: Select all
* Include JOBCONTROL.H lines unless already included
$IFNDEF JOBCONTROL.H
$INCLUDE DSINCLUDE JOBCONTROL.H
$ENDIF
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.