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



I looked at the DQ code and don't see an obvious reason the key would be
blank.  Try running a test while Toolbox conversion trace is on.  Maybe it
will show something.

David Wall
AS/400 Toolbox for Java




                      Kristofor
                      Jacobson                 To:       java400-l@midrange.com
                      <cuda70_383@yahoo        cc:
                      .com>                    Subject:  Keyed Data Queue 
problem
                      Sent by:
                      java400-l-admin@m
                      idrange.com


                      12/28/2001 03:41
                      AM
                      Please respond to
                      java400-l





Hello all,
   I'm having a problem writing to a keyed data queue
from my Java class.
   My class first takes a non-keyed queue entry and
separates it into two parts:  a six character key and
a query string for execution on a remote database.
After executing the query string, I gather the
responses from the remote system and push it to a
keyed dataqueue using the afore-mentioned key.
   When dumping to System.out, I see the string value
of the key just fine.  When I write to the data queue
using the KeyedDataQueue.write(String, String) method,
it writes the data entry but the key value is put in
the data queue as all blanks instead of the
6-character string I need it to be.  Here is the code:

  Key = QueueData.substring(0,6);
  QueueData =
QueueData.substring(6,(QueueData.length()-5));
  System.out.println("Key    : " + Key);
  System.out.println("QData  : " + QueueData.trim());
  RemoteStmt.execute(QueueData.trim());
  RespText="";
  while(RemoteStmt.getMoreResults())
  {
             RemoteRS = RemoteStmt.getResultSet();
             while(RemoteRS.next())
        {
             InputStream IS=RemoteRS.getAsciiStream(1);
             RespText=RespText + RemoteRS.getString(1);
             }
  }
  RespBytes = RespText.getBytes();
  System.out.println("Length : " + RespText.length());
  if(RespText.length()>0)
  {
    RespQueue.write((QueueData.substring(0,6)),
    RespText.trim());
  }
  }          catch (Exception e)
  {
             System.out.println("Couldn't finish statement: " + e);
  }




Any help on this would be greatly appreciated.


__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com
_______________________________________________
This is the Java Programming on and around the iSeries / AS400 (JAVA400-L)
mailing list
To post a message email: JAVA400-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/java400-l
or email: JAVA400-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.





As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.