PDA

View Full Version : API für interaktiven oder batch Job



stoerfang
15-01-09, 10:09
Hallo zusammen,

ich suche ein API, mit dem ich feststellen kann, ob ein Programm im Batch oder im interaktiven Modus ist.

Kann mir da jemand helfen ?

Vielen Dank und Gruss

Fuerchau
15-01-09, 10:11
Dafür reicht RTVJOBA JOBSTS(...).

stoerfang
15-01-09, 10:14
danke, für die schnelle Antwort.

Gruss und noch einen schönen Tag.

angelone
16-01-09, 08:25
Für die Akten:
API QUSRJOBI mit DS Format JOBI0100 gibt dir den Jobtyp.



d RcvVarLen s 10i 0

d dsJobi0100 ds
d dsJobBytesRtn 10I 0
d dsJobBytesAvl 10I 0
d dsJobName 10A
d dsJobUser 10A
d dsJobNumber 6A
d dsJobIntern 16A
d dsJobStatus 10A
d dsJobType 1A
d dsJobSubtype 1A
d dsJobReserv1 2A
d dsJobRunPty 10I 0
d dsJobTimeSlc 10I 0
d dsJobDftWait 10I 0
d dsJobPurge 10A

d jobinfo pr extpgm('QUSRJOBI')
d DsJob like(dsJobi0100)
d Length 10i 0 const
d APIFormat 8 const
d ApiJob 26 const
d InternJob 16 const

c eval RcvVarLen=%Size(dsJobi0100)
c callp jobinfo(dsJobi0100:
c rcvvarlen :
c 'JOBI0100':
c '*':
c ' ')


dsjobtype ist jetzt 'I' bei nem interaktiven job

Fuerchau
16-01-09, 08:33
Der Aufwand lohnt aber nur, wenn man fremde Job's abfragen will.
Ansonsten reicht eben der RTVJOBA.