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



Hello
I have part of java code which is listening to message
queue, and CL progam which submits it in java pasted
below
[code]
public class ReadFromDataQueue
{
public ReadFromDataQueue()
    {
        AS400 as400 = null;

        try
         {
    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)
             {
// read data from data queue and do the processing
here
//processing logic
//  keep reading the data queue for next entry
dqData = dq.read(-1);
            }

            as400.disconnectAllServices();
        }
        catch (Exception exc)
         {
            as400.disconnectAllServices();
            exc.printStackTrace();
            logger.debug(exc.getMessage());
        }
}
[/code]
CL command to submit the job in batch
DCL        VAR(&JAVACMD) TYPE(*CHAR) LEN(30) +        
       
             VALUE('java -Djava.version=1.4 -cp ') 
DCL        VAR(&CLASSPATH) TYPE(*CHAR) LEN(500)
           
DCL        VAR(&CLASSNAME) TYPE(*CHAR) LEN(40) +      
       
             VALUE('
com.pfizer.maps.data.ReadFromDataQueue') 
CHGVAR     VAR(&CLASS) VALUE(&JAVACMD *cat  
&CLASSPATH *cat   + 
             &CLASSNAME)                              
          


SBMJOB     CMD(QSH CMD(&CLASS)) JOB(MYJOB) +
             JOBQ(MAPSSBSQ) OUTQ(MAPSSBSOUT)   


--- "Anand, Rajesh" <Rajesh_Anand@xxxxxx> wrote:

> Ashish,
> 
>       Would it possible for you to include your java
> source code??
> 
>       Thanks,
> 
> Rajesh Anand
> Tel: + (44) (0) 207 996 1152
> Mob: + (44) (0) 7947273151
> Email:Rajesh_anand@xxxxxx
> 
> 
> -----Original Message-----
> From: java400-l-bounces@xxxxxxxxxxxx
> [mailto:java400-l-bounces@xxxxxxxxxxxx] On Behalf Of
> Ashish Kulkarni
> Sent: 13 June 2005 15:28
> To: Java Programming on and around the iSeries /
> AS400
> Subject: Re: Insert from DB2 to oracle using Java
> 
> 
> Hi
> I have defined a subsystem, in this subsystem i have
> submitted a java program which is listening to
> Messqe
> Queue, from RPG program i insert values in this
> message queue, this java program then reads these
> values and then creates a PDF file on AS400 IFS file
> system( you can insert them in oracle)
> 
> Ashish
> 
> --- ANDRES COLODRERO LEHMANN <andres@xxxxxxxxxx>
> wrote:
> 
> > I have two applications. First, its a iSeries
> > applications with RPG and 
> > second its a external Oracle aplications. From 
> > I need connect both applications on-line. DB2
> always
> > insert, update or 
> > deleted in Oracle. RPG have the control.
> > 
> >  I think to use RPG to CALL java program with
> > parameters for insert in 
> > oracle database. Java could be batch programs.
> ¿it´s
> > a good idea?
> > 
> > But, what it´s the best to way to comunicate both
> > databases? other 
> > posibility?
> > 
> > Thanks
> > --
> > 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!? 
> Make Yahoo! your home page 
> http://www.yahoo.com/r/hs
> -- 
> 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.
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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.