How can get konw the spool file are generated? - IBM AS400

This is a discussion on How can get konw the spool file are generated? - IBM AS400 ; when the spool file are generated,have any action? I want to simulate,but because the efficiency,I can not read every second.Trouble,help,thanks....

+ Reply to Thread
Results 1 to 6 of 6

Thread: How can get konw the spool file are generated?

  1. How can get konw the spool file are generated?

    when the spool file are generated,have any action?
    I want to simulate,but because the efficiency,I can not read every
    second.Trouble,help,thanks.


  2. Re: How can get konw the spool file are generated?


    "snowcastle" wrote in message
    news:1182006702.071184.232830@n15g2000prd.googlegr oups.com...
    > when the spool file are generated,have any action?
    > I want to simulate,but because the efficiency,I can not read every
    > second.Trouble,help,thanks.
    >


    I need this also!!

    Niko.



  3. Re: How can get konw the spool file are generated?

    There is an option to notify of all spool files in an output queue
    [OUTQ] that are made available, those that are in a ready status [RDY].
    That is accomplished via a data queue [DTAQ] which is /attached/ to
    that output queue. See the DTAQ() parameter help text on the CRTOUTQ
    command. A job+program /watches/ the data queue by waiting on a receive
    operation [API name QRCVDTAQ]. The program can then respond to new
    entries, [only] when entries arrive; i.e. without effective polling,
    which I infer "read every second" alludes to. Note: A receive data
    queue request coded to timeout on an interval [e.g. one minute], and at
    each timeout checking to see if a request was made to end the job, can
    enable an orderly shutdown. When no end was requested, the code
    iterates on the receive-data-queue.
    I recall past conversations whereby this type of support for spool
    files in 'held' status [HLD] was an issue for some. I believe other
    options were typically offered in that case; I do not recall for sure,
    but a google group search might find some.
    FWiW: I believe the USRDFNxxx features of the OUTQ and the printer
    file [PRTF] can be used to enhance the possibilities. And depending on
    what action is desired, the RMTSYS, CNNTYPE, and USRDTATFM might be of
    use.? I am not sure what a user-defined driver program USRDRVPGM does,
    but that may be of interest.? A Remote Output Queue [and a remote
    writer?] can automatically send the data to another system... if that is
    the requirement for /action/.
    FWiW the SPLTOOL sfw is often mentioned for such [as I infer you are
    asking of] requirements.

    Regards, Chuck
    -- All comments provided "as is" with no warranties of any kind
    whatsoever and may not represent positions, strategies, nor views of my
    employer

    snowcastle wrote:
    > when the spool file are generated,have any action?
    > I want to simulate,but because the efficiency,I can not read every
    > second.Trouble,help,thanks.


  4. Re: How can get konw the spool file are generated?

    There is a very strait forward and efficient answer to this.

    Check the create and change out queue commands. You can associate a *DTAQ to any *OUTQ so that whenever any spool file arrives in the out queue a record will be automatically generated by the OS in the data queue with information on the spool file attributes. Then all you need to do is have a job running with a program waiting to receive and act on each data queue entry.

    Mike Sicilian



    "snowcastle" wrote in message news:1182006702.071184.232830@n15g2000prd.googlegr oups.com...
    | when the spool file are generated,have any action?
    | I want to simulate,but because the efficiency,I can not read every
    | second.Trouble,help,thanks.
    |

  5. Re: How can get konw the spool file are generated?

    CRPence wrote:
    > There is an option to notify of all spool files in an output queue
    > [OUTQ] that are made available, those that are in a ready status [RDY].


    As Chuck mentions later, the *dtaq entry is sent when any spooled file
    on that *outq goes to RDY status. This has various implications.

    1. If a spooled file is _created_ in HELD status, no *dtaq entry is sent
    at that time.

    2. If a spooled file is in RDY status, is then held and later released
    to RDY status again, then a second *dtaq entry is sent for the same
    spooled file. A program monitoring the *dtaq may need to recognize that
    the same spooled file is being re-signaled.

    > That is accomplished via a data queue [DTAQ] which is /attached/ to
    > that output queue. See the DTAQ() parameter help text on the CRTOUTQ
    > command. A job+program /watches/ the data queue by waiting on a receive
    > operation [API name QRCVDTAQ]. The program can then respond to new
    > entries, [only] when entries arrive; i.e. without effective polling,
    > which I infer "read every second" alludes to. Note: A receive data
    > queue request coded to timeout on an interval [e.g. one minute], and at
    > each timeout checking to see if a request was made to end the job, can
    > enable an orderly shutdown. When no end was requested, the code
    > iterates on the receive-data-queue.


    Also note that other entries may be sent to the same *dtaq. Entries can
    be sent that carry commands that the monitoring program can interpret.
    This is one way to tell the monitoring program to end normally.

    However, the program should still regularly timeout so that it can test
    whether other shutdown requests have been made -- e.g., the subsystem
    might be shut down or the system might be going down for
    backups/maintenance.

    > I recall past conversations whereby this type of support for spool
    > files in 'held' status [HLD] was an issue for some. I believe other
    > options were typically offered in that case; I do not recall for sure,
    > but a google group search might find some.


    Spooled files created in HELD status can be a problem if timely notice
    is needed. I suppose I simply wouldn't create them on hold. To keep them
    from printing, I'd create them on an *outq that wasn't serviced by a
    writer. The spooled file would arrive RDY, the *dtaq entry would signal
    an action needed to be taken, and I'd move the spooled file on HOLD to
    the destination *outq.

    As long as the *dtaq gets notified on time, any desired action can follow.

    --
    Tom Liotta
    http://zap.to/tl400

  6. Re: How can get konw the spool file are generated?

    snowcastle wrote:
    > when the spool file are generated,have any action?
    > I want to simulate,but because the efficiency,I can not read every
    > second.Trouble,help,thanks.
    >


    If you don't know which outq the spooled file is going to, you can use
    the QIBM_NOTIFY_CRTSPLF environment variable and a data queue you create
    to track spooled files created by your job.

    Do a google search on QIBM_NOTIFY_CRTSPLF for more information.

    --
    Rodney A Johnson
    Technical Team Lead for i5/OS (AS/400) Spool
    Dept GJC
    IBM Rochester, Minnesota

    The contents of this message express only the sender's opinion.
    This message does not necessarily reflect the policy or views of
    my employer, IBM. All responsibility for the statements
    made in this Usenet posting resides solely and completely with the
    sender.

+ Reply to Thread