Plex 2E

  • 1.  Job Log Viewer

    Posted Jun 22, 2010 05:01 AM
    Hi

    Has anyone got details on how to implement a function to view the IBMi job log given the job number?


  • 2.  RE: Job Log Viewer

    Posted Jun 22, 2010 07:01 AM
    Gavin,

    Take a look at the OBAS400 class library. You'll find entities in there to help with calling the System i APIs with user space and direct formats. There are several examples entities. Probably time for a Pattern equivalent :-)

    The QMHLJOBL API will give you the info you are after I think.

    Regards,
    Jeremy Hutchinson
    Desynit Limited
    :: Plex Wiki :: 2E Wiki ::
    :: Plex/2E Feed Aggregator ::
    :: Edge Forum Archive ::


  • 3.  RE: Job Log Viewer

    Posted Jun 22, 2010 09:55 AM
    Does anyone have a working version of this using OBAS400?


  • 4.  RE: Job Log Viewer

    Posted Jun 24, 2010 03:05 AM
    had a quick play OBAS400/Get job information.All attributes.Get one instance since its a while since I used it Old EDge Link which might be of interest

    and some of the field lengths must have changed on the API so you will may get the chance to create your own API or maybe even use the new replace field triple

    must get back to work as a colleague just noticed these new objects 'Get job information.All attributes.Get one instance' in dev and guessed George must be playing.. cant get anything past these Swedes, dam you Joacim.


    Edited: http://publib.boulder.ibm.com/infocenter/iseries/v5r3/index.jsp?topic=/apis/qusrjobi.htm

    Default Record Format JOBI0400

    CA need to increase OBAS400\Device recovery action from len10 in the model to API expected len13

    [s]* OBAS400\Coded character set ID len9 in the model but expecting len4
    * OBAS400\Message queue maximum size len9 in the model but expecting len4
    * OBAS400\Default coded character set ID len9 in the model but expecting len4

    * - not sure as they inherit from Binary-4 but field has length of 9, and written in help as this so it makes it unlikely it is a typo..[s]


  • 5.  RE: Job Log Viewer

    Posted Jun 28, 2010 02:45 AM
    sorry dont have access to my old model but as jez describes its all there if I remember correctly. With Get spooled files.List attributes.Get sequential being the most similar to List Job Log Messages (QMHLJOBL) API
    and therefore where you could start creating your own api.

    http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=/apis/QMHLJOBL.htm

    is similar to the already plex exposed api:

    http://publib.boulder.ibm.com/iseries/v5r2/ic2924/index.htm?info/apis/QUSLSPL.htm

    so wasn't too hard to get the API working in plex


  • 6.  RE: Job Log Viewer

    Posted Jul 31, 2013 03:30 PM
    Hello Gavin,

    I am revisiting this task and in theory as outline it seemed perfectly possible but god is it a head ache to get it working.

    Dd you succeed?

    I don't have access to a previous local that had this working (i think) so have attempted to redefine the API in plex but wasting so much time trying I am hopping others have succeeded.

    I liked this article http://permalink.gmane.org/gmane.comp.hardware.ibm.midrange/171833

    1. Wrappering RCVMSG in CL program and it worked but only returns 'some' messages that can be seen on the job log. Type *EXT the rest I need to see but a simple loop with RCVMSG does not return ALL

    2. Tried QMHLJOBL api using the OBAS400 as example. What a pain that is and even if I get it to work the output does not include the MESSAGE but the replacement data so it looks like I would need to call Another API

    3. Tried QGYOLJBL but simply lost the will to live

    4. If I fail to get the API working due to my limitations then I will look at dspjoblog command outputting to physical files in qtemp if possible, and use SQL to access the data..wiki blockfetchsql pattern


    I think the simplest method would be native source code wrappering these ridicously complicated API interfaces.

    Any luck your end?


  • 7.  RE: Job Log Viewer

    Posted Jul 31, 2013 04:01 PM
    Maybe API the API using apis-example-job-log-message-apis


  • 8.  RE: Job Log Viewer

    Posted Aug 05, 2013 03:23 AM
    A PATTERNS version attached, including a blockfetch and single fetch and viewer.

    Attachment(s)

    xml
    Export.xml   284 KB 1 version


  • 9.  RE: Job Log Viewer

    Posted Aug 07, 2013 03:34 AM
      |   view attached
    Replaced
        C                   Eval      &13:)=FdDta
    with
         C                   Eval      &(13:)=%SUBST(FdDta:1:FdDtaLen)

    Attachment(s)

    xml
    Export.xml   284 KB 1 version


  • 10.  Re: RE: Job Log Viewer

    Posted Jun 09, 2015 04:20 AM

    throw away your patterns!

     

    RPGPGM.COM - From AS400 to IBM i: Using SQL to get information from Job Logs

     

    It works great and the possibilities are endless!