× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



here is a little snippet of api code i use.

LISTSPOOL copybook:
http://code.midrange.com/index.php?id=52b3367238

program snippets (this has a little more than what you are looking for but 
should give you something to go on:
http://code.midrange.com/index.php?id=2cb290daf0

Thanks,
Tommy Holden




"Richard ECUYER" <recuyer@xxxxxxx> 
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
03/21/2007 12:43 PM
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>


To
"RPG programming on the AS400 / iSeries" <rpg400-l@xxxxxxxxxxxx>
cc

Subject
Re: Sample Code for OUTQ Processing? / API Confusion






Another probleme with using Dataqueue :

    If the spool is not in SAVE mode, sometimes, you will not be able to 
get
the spool and work with it because it is still printed.
    It depends really on what you want to do.

----- Original Message ----- 
From: <daparnin@xxxxxxxxxxxxxx>
To: "RPG programming on the AS400 / iSeries" <rpg400-l@xxxxxxxxxxxx>
Sent: Wednesday, March 21, 2007 6:26 PM
Subject: Re: Sample Code for OUTQ Processing? / API Confusion


   Rory

   Using data queues  was one of my original thoughts when I started
checking
   into this.  It would give me access to the information that I need 
but
I
   couldn't necessarily guarantee that spool files would show up in RDY
   status.  If they didn't then there wouldn't be a data queue entry and
they
   would get missed.  It's a good idea but won't work in this case.

   Dave Parnin
   --
   Nishikawa Standard Company
   Topeka, IN  46571
   daparnin@xxxxxxxxxxxxxx

    "Rory Hewitt" <roryhewitt@xxxxxxxxx>
    Sent by: rpg400-l-bounces@xxxxxxxxxxxx         To:        "RPG
                                           programming on the AS400 /
    03/21/2007 12:08 PM                    iSeries"
<rpg400-l@xxxxxxxxxxxx>
    Please respond to RPG programming on           cc:
    the AS400 / iSeries                            Subject:        Re:
Sample
                                           Code for OUTQ Processing? / 
API
                                           Confusion

   Dave,
   Another option you might consider is changing the output queue (or
   multiple
   output queues if necessary) to use a data queue - when a spooled file
on
   that OUTQ goes to ready (RDY) status, an entry is added to the data
queue
   containing details of the spooled file. Then you creat a
   never-ending-program (aka a NEP) which waits for entries to appear on
the
   data queue and processes them.
   The benefit of this is that you don't need to use any list API's 
(just
the
   data queue API's which are easy). Also, you won't get problems with
   entries
   being added to the OUTQ just after you've done your API read and 
being
   missed.
   I wrote a program a while back (as have many others!) which uses a 
data
   file
   to determine commands to process on spooled files - that way you can
set
   up
   'rules' to govern how your spooled files should be
   routed/processed/deleted
   etc.
   I can send you some sample code also.
   Rory
   --
   This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
list
   To post a message email: RPG400-L@xxxxxxxxxxxx
   To subscribe, unsubscribe, or change list options,
   visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
   or email: RPG400-L-request@xxxxxxxxxxxx
   Before posting, please take a moment to review the archives
   at http://archive.midrange.com/rpg400-l.
-- 
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing 
list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.