View Full Version : API für interaktiven oder batch Job
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
Dafür reicht RTVJOBA JOBSTS(...).
danke, für die schnelle Antwort.
Gruss und noch einen schönen Tag.
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
Der Aufwand lohnt aber nur, wenn man fremde Job's abfragen will.
Ansonsten reicht eben der RTVJOBA.