[NEWSboard IBMi Forum]

Thema: API QUSRJOBI

Hybrid View

  1. #1
    Registriert seit
    Apr 2001
    Beiträge
    267

    Question API QUSRJOBI

    Hallo,

    kann mir jemand ein Beispiel für den Aufruf des API's QUSRJOBI geben bzw. einen entsprechenden Link nennen?

    Besten Dank im voraus.

    Gruß
    Bodo

  2. #2
    Registriert seit
    Feb 2001
    Beiträge
    20.696
    http://publib.boulder.ibm.com/iserie...s/qusrjobi.htm

    Hier findest du die API-Beschreibung mit allen Parametern.

    In QSYSINC/QRPGLESRC (QUSRJOBI) findest du die Definitionen der Strukturen, die du mit COPY einbinden kannst.
    Dienstleistungen? Die gibt es hier: http://www.fuerchau.de
    Das Excel-AddIn: https://www.ftsolutions.de/index.php/downloads
    BI? Da war doch noch was: http://www.ftsolutions.de

  3. #3
    Registriert seit
    May 2002
    Beiträge
    2.643

    Beispiel

    Hallo Bodo,
    ich hoffe dies hilft:

    QUSRJOBI - Retrieve Job Information
    This API can be called to retrieve information about a specific job. The Qualified Job Name (Job/User/Number) can be passed to the API, or the job Internal Identifier that can be retrieved via the QUSLJOB (List Job) API, or "*" to retrieve the current job details.
    Using the Internal ID allows the API to locate the job more quickly. To use this specify *INT as the qualified job parameter.
    The API has one Required Parameter Group and one Optional Parameter Group, the format of which is as follows:



    +------------------------------------------------------------------------+
    |_
    | Required Parameter Group:_
    | |
    | +----+------------------------------------------+--------+-----------+ |
    | | 1_ | Receiver Variable_______ _______________ | Output | Char(*) _ | |
    | +----+------------------------------------------+--------+-----------+ |
    | | 2_ | Length or receiver _____________________ | Input_ | Binary(4) | |
    | +----+------------------------------------------+--------+-----------+ |
    | | 3_ | Format Name__ __________________________ | Input_ | Char(10)_ | |
    | +----+------------------------------------------+--------+-----------+ |
    | | 4_ | Qualified Job Name (or * or *INT) ______ | Input_ | Char(26)_ | |
    | +----+------------------------------------------+--------+-----------+ |
    | | 5_ + Internal Job ID_________________________ + Input_ + Char(16)_ + |
    _Optional Parameter:_
    | |
    | +----+------------------------------------------+--------+-----------+ |
    | | 5_ | Error code______________________________ | I/O___ | Char(*)__ | |
    | +----+------------------------------------------+--------+-----------+ |
    | |
    | Threadsafe: Conditional_
    | |
    +------------------------------------------------------------------------+

    Note: Ten Formats are available to retrieve job information, These are:



    JOBI0100
    This format returns basic performance information about a job. It is faster than the JOBI0150 format and the JOBI0200 format (which also contain performance information). The reason that this format is faster is that it does not touch as many objects, causing less paging when retrieving information about the job._
    JOBI0150
    This format returns additional performance information, and is slower than the JOBI0100 format. It is similar to the JOBI0200 format, but is faster than that format because there is less paging involved in retrieving the information._
    JOBI0200_
    This format returns information equivalent to that found on the Work with Active Jobs (WRKACTJOB) command._
    JOBI0300
    _This format returns job queue and output queue information for a job, as well as information about the submitter's job if the job is a submitted batch job._
    JOBI0400
    This format primarily returns job attribute types of information, but has other types of information as well._
    JOBI0500
    This format returns message logging information._
    JOBI0600
    This format returns information about active jobs only. It is intended to supplement the JOBI0400 format. It retrieves information from several additional objects associated with the job, and therefore, it causes additional paging._
    JOBI0700
    This format returns library list information for an active job._
    JOBI0800_
    This format returns signal information for an active job._
    JOBI0900
    This format returns SQL open cursor information for an active job._

    _
    By Example
    In the following example, the API is executed to retrieve the data similar to that used by WRKACTJOB by using format JOBI0200._
    QUSRJOBI Example
    See Also:
    QUSLJOB_
    IBM Book - OS/400 Work Management_ APIs_
    D Inf_Len S 4B 0

    * The following data structure is then returned to the
    * calling program:
    D Job_Inf DS 256
    d JobName 9 18
    d JobUser 19 28
    d JobNumber 29 34
    d InternalId 35 50
    d Status 51 60
    D JobType 61 61
    D JobSubType 62 62
    D Subsystem 63 72
    D JobRunPty 73 76b 0
    D SystemPool 77 80b 0
    D ProcessUnit 81 84b 0
    D AuxRequests 85 88b 0
    D InteractTrans 89 92b 0
    D TotRespTime 93 96b 0
    d FunctionType 97 97
    D FunctionName 98 107
    D ActJobStatus 108 111
    D Reserved 112 112
    D DBLockWait 113 116b 0
    D NDBLockWait 117 120b 0
    D MchLockWait 121 124b 0
    D TimeDBLckW 125 127
    D TimeNDBLckW 128 130
    D TimeMchLckW 131 133

    * For this program, an the parms are used:
    c *entry plist
    c parm CTJob 10
    c parm CTUser 10
    c parm CTJobN 6
    c parm Job_Inf 256
    * or you could use the Internal Job ID (*char 16) which
    * can be gathered from the QUSLJOB (list job) API.

    * Qualify the Job Name:
    C eval Job_Qual = CTJOB + CTUSER + CTJOBN
    c z-add 256 Inf_Len

    * Call the API to retrieve the WRKACTJOB info for this job:
    C call 'QUSRJOBI'
    C parm Job_Inf
    C parm INF_Len
    C parm 'JOBI0200' Api_Format 8
    C parm Job_Qual 26
    C parm *BLANKS Job_Int 16

    c eval *inlr = *on
    c return
    

    Gruss TARASIK

  4. #4
    Registriert seit
    Apr 2001
    Beiträge
    267
    Danke für die Info's.

    Gruß
    Bodo

Similar Threads

  1. Probleme API QUSLJOB aufzurufen
    By TMusolf in forum NEWSboard Programmierung
    Antworten: 4
    Letzter Beitrag: 25-01-07, 12:42
  2. API QLGSORT/QLGSRTIO
    By muadeep in forum NEWSboard Programmierung
    Antworten: 8
    Letzter Beitrag: 03-01-07, 17:53
  3. javamail api
    By jogisarge in forum NEWSboard Programmierung
    Antworten: 4
    Letzter Beitrag: 22-11-06, 16:02
  4. Eingabe sperren bei Fehlermeldung über API
    By ExAzubi in forum IBM i Hauptforum
    Antworten: 5
    Letzter Beitrag: 17-10-06, 16:48
  5. API für die Ermittlung aktiver Jobs
    By lyrics in forum IBM i Hauptforum
    Antworten: 4
    Letzter Beitrag: 29-08-06, 09:03

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • You may not post attachments
  • You may not edit your posts
  •