× 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.



Hi
I use data queue, and CL to submit Java job in Batch
(used a different subsystem then QBATCH , since in oue
machine QBATCH will allow ro run only one job in
bacth)
I use CL command as below to submit the job in batch
is not already active
SBMJOB     CMD(QSH CMD(MyClass)) JOB(JobName) +
             JOBQ(MAPSSBSQ) OUTQ(MAPSSBSOUT)   

In MyClass I have the logic given below which listents
to a data queue and as soon it gets any data takes the
data and process the request(in my case create pdf
file on IFS file system of AS400)
hope this helps
 
--- "Anand, Rajesh" <Rajesh_Anand@xxxxxx> wrote:

>       Hi Ashish,
> 
>       Where and how does this pgm runs.
> 
>       Presumably, this runs in batch continuously pooling
> the data
> queue.
> 
>       What cmds did you use to run this in batch mode.
> 
>       Thanks for your help in advance.
> 
>       rgds,
> 
> Rajesh Anand
> Email:Rajesh_anand@xxxxxx
> 
> 
> -----Original Message-----
> From: java400-l-bounces@xxxxxxxxxxxx
> [mailto:java400-l-bounces@xxxxxxxxxxxx] On Behalf Of
> Ashish Kulkarni
> Sent: 21 January 2005 20:04
> To: Java Programming on and around the iSeries /
> AS400
> Subject: RE: Triggers?
> 
> 
> Hi
> this is a sample code of java program running on
> AS400
>  AS400 as400 = new AS400("localhost", "*CURRENT",
> "*CURRENT");
>  DataQueue dq = new DataQueue(as400,
> "/QSYS.LIB/%LIBL%.LIB/OUTDTAQ.DTAQ");
>  boolean cont = true;
>  DataQueueEntry dqData = dq.read( -1);
>   while (cont)
>       {
>          //logic to do when data receives in data
> queue
>       }
> 
> Ashish
> --- "cornelius, chad"
> <chad.cornelius@xxxxxxxxxxxxxxxxxxxx> wrote:
> 
> > Thanks all for the input...  Do any of you have a
> > sample program that
> > listens to queue?  I have never written a listener
> > before.  Any help is
> > greatly appreciated.
> > 
> > Thanks,
> > Chad
> > 
> > 
> > -----Original Message-----
> > From: Ashish Kulkarni
> > [mailto:kulkarni_ash1312@xxxxxxxxx] 
> > Sent: Friday, January 21, 2005 11:51 AM
> > To: Java Programming on and around the iSeries /
> > AS400
> > Subject: Re: Triggers?
> > 
> > Hi
> > we have been doing this kind of stuff also, we
> need
> > to
> > create Purchase Order PDF files and email them to
> > verndors, so RPG program write this info in a
> > message
> > queue, a java program is listening to this
> queue,(we
> > have a seperate subsystem for running this java
> > program)
> > as soon as it get message, this listening program
> > creates a thread which creates PDF file, emails it
> > and
> > then is killed.
> > Ashish
> > --- Joe Sam Shirah <jshirah@xxxxxxxxxxxxx> wrote:
> > 
> > > 
> > >     Hi Chad,
> > > 
> > >     Just to follow up on Chris' response:  Many
> > > programmers think triggers
> > > are a great idea until they do tons of work on
> > each
> > > DB change and things
> > > begin to bog down.  You want to do the least
> > amount
> > > of work necessary when
> > > you use a trigger, regerdless of language.
> > > 
> > >     For example, one of our clients sends a fax
> > when
> > > certain criteria is met
> > > for a database operation.  Rather than having
> the
> > (
> > > RPG ) trigger do the
> > > time comsuming work, it just sends notification
> > and
> > > the required info to a
> > > message queue, then returns.
> > > 
> > >     A Java program monitors the message queue
> and
> > > performs all necessary
> > > operations asynchronously, so the original
> > > application throughput is
> > > affected as little as possible.
> > > 
> > > 
> > >                                                 
>  
> >  
> > >     Joe Sam
> > > 
> > > Joe Sam Shirah -        http://www.conceptgo.com
> > > conceptGO         -       
> > > Consulting/Development/Outsourcing
> > > Java Filter Forum:      
> > > http://www.ibm.com/developerworks/java/
> > > Just the JDBC FAQs:
> http://www.jguru.com/faq/JDBC
> > > Going International?   
> > > http://www.jguru.com/faq/I18N
> > > Que Java400?            
> > > http://www.jguru.com/faq/Java400
> > > 
> > > 
> > > ----- Original Message -----
> > > From: <chris.delashmutt@xxxxxxxxxxxxx>
> > > To: "Java Programming on and around the iSeries
> /
> > > AS400"
> > > <java400-l@xxxxxxxxxxxx>
> > > Cc: <java400-l@xxxxxxxxxxxx>;
> > > <java400-l-bounces@xxxxxxxxxxxx>
> > > Sent: Friday, January 21, 2005 12:42 PM
> > > Subject: Re: Triggers?
> > > 
> > > 
> > > >
> > > > We do this now, but you have to write a little
> > > wrapper around the Java to
> > > > get it to be called from the trigger.
> > > >
> > > > We've actually accomplished this on V5R1 via
> > > creating a Java Stored
> > > > procedure, and then calling that stored
> > procedure
> > > via an SQL trigger.
> > > This
> > > > is nice because the DB is managing the
> lifecycle
> > > of the JVM, and I believe
> > > > the startup cost of the JVM only has to be
> paid
> > > once per job.
> > > >
> > > > We've also created a small externally defined
> > > trigger in a high level
> > > > language that actually calls/submits a call to
> > run
> > > a Java class.  This
> > > > works ok as well, except that the JVM has to
> be
> > > started for each call.
> > > > That may not be an issue if this is on a
> slowly
> > > changing file.
> > > >
> > > > I would just say that in either of these
> methods
> > > you want to make sure
> > > that
> > > > you realize exactly how often this trigger is
> > > going to be called.  It is
> > > > very easy to end up in a bad situation if you
> > > attach a trigger to a file
> > > > that has transactions performed on it often. 
> > > You'll either slow down your
> > > > operations tremendously using the first
> method,
> > or
> > > end up with too many
> > > > jobs submitted for the system to handle in a
> > > timely manner in the second.
> > > > Just be careful!
> > > >
> > > > Chris DeLashmutt
> > > > Senior R&D Analyst
> > > > LeasePlan USA
> > > > 1165 Sanctuary Pkwy., Alpharetta, GA 30004
> > > > Phone: 678-202-8695
> > > > Fax: 678-921-4895
> > > > ClearCase problems? Check out the LeasePlan
> > > ClearCase FAQ for answers!
> > > >
> > > >
> > > >
> > > >                       "cornelius, chad"
> > > >                      
> <chad.cornelius@xxxxxxxxxx
> >  
> > >      To:
> > > "'java400-l@xxxxxxxxxxxx'"
> > <java400-l@xxxxxxxxxxxx>
> > > >                       tate.co.us>             
>  
> >  
> > >      cc:
> > > >                       Sent by:                
>  
> >  
> > >      Subject:
> > > Triggers?
> > > >                      
> java400-l-bounces@midrange
> > > >                       .com
> > > >
> > > >
> > > >                       01/21/2005 12:13 PM
> > > >                       Please respond to Java
> > > >                       Programming on and
> around
> > > >                       the iSeries / AS400
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > Does anyone know if it is possible to create a
> > > trigger that can execute a
> > > > java class?
> > > >
> > > >
> > > >
> > > > Thanks,
> > > >
> > > > Chad
> > > >
> > > 
> > > 
> > > -- 
> > > This is the Java Programming on and around the
> > > iSeries / AS400 (JAVA400-L) mailing list
> > > To post a message email: JAVA400-L@xxxxxxxxxxxx
> > > To subscribe, unsubscribe, or change list
> options,
> > > visit:
> > >
> >
> http://lists.midrange.com/mailman/listinfo/java400-l
> > > or email: JAVA400-L-request@xxxxxxxxxxxx
> > > Before posting, please take a moment to review
> the
> > > archives
> > > at http://archive.midrange.com/java400-l.
> > > 
> > > 
> > 
> > 
> > 
> >             
> > __________________________________ 
> > Do you Yahoo!? 
> > Yahoo! Mail - 250MB free storage. Do more. Manage
> > less. 
> > http://info.mail.yahoo.com/mail_250
> > -- 
> > This is the Java Programming on and around the
> > iSeries / AS400 (JAVA400-L)
> > mailing list
> > To post a message email: JAVA400-L@xxxxxxxxxxxx
> > To subscribe, unsubscribe, or change list options,
> > visit:
> >
> http://lists.midrange.com/mailman/listinfo/java400-l
> > or email: JAVA400-L-request@xxxxxxxxxxxx
> > Before posting, please take a moment to review the
> > archives
> > at http://archive.midrange.com/java400-l.
> > -- 
> > This is the Java Programming on and around the
> > iSeries / AS400 (JAVA400-L) mailing list
> > To post a message email: JAVA400-L@xxxxxxxxxxxx
> > To subscribe, unsubscribe, or change list options,
> > visit:
> >
> http://lists.midrange.com/mailman/listinfo/java400-l
> > or email: JAVA400-L-request@xxxxxxxxxxxx
> > Before posting, please take a moment to review the
> > archives
> > at http://archive.midrange.com/java400-l.
> > 
> > 
> 
> 
> 
>               
> __________________________________ 
> Do you Yahoo!? 
> Yahoo! Mail - 250MB free storage. Do more. Manage
> less. 
> http://info.mail.yahoo.com/mail_250
> -- 
> This is the Java Programming on and around the
> iSeries / AS400
> (JAVA400-L) mailing list
> To post a message email: JAVA400-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit:
> http://lists.midrange.com/mailman/listinfo/java400-l
> or email: JAVA400-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the
> archives
> at http://archive.midrange.com/java400-l. 
>
--------------------------------------------------------
>  
> If you are not an intended recipient of this e-mail,
> please notify the sender, delete it and do not read,
> act upon, print, disclose, copy, retain or
> redistribute it. Click here for important additional
> terms relating to this e-mail.    
> http://www.ml.com/email_terms/ 
>
--------------------------------------------------------
>  
> 
> -- 
> This is the Java Programming on and around the
> iSeries / AS400 (JAVA400-L) mailing list
> To post a message email: JAVA400-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit:
> http://lists.midrange.com/mailman/listinfo/java400-l
> or email: JAVA400-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the
> archives
> at http://archive.midrange.com/java400-l.
> 
> 


=====
A$HI$H


                
__________________________________ 
Do you Yahoo!? 
Take Yahoo! Mail with you! Get it on your mobile phone. 
http://mobile.yahoo.com/maildemo 

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.