|
Hi, just a comment on sending a .pdf file via rpg and MQ. It is possible and quite straight forward: c* Get stream file size c exsr GetStmfSiz c* Create a user space c exsr CrtUsrSpc c* Copy the stream file to User Space c exsr CopyToSpc c* Put the file (user space) to MQ c Eval Bufptr = p_data c Eval Buflen = st_size c exsr Rspond Thanks to Scott Klement's IFS_ebook, I was able to put a streamfile (.pdf) to a user space and send the user space via mq. http://www.scottklement.com/rpg/ifs.html Regards, Magne
-----Original Message----- From: McCully, Keith (RBS Insurance) [mailto:Keith.McCully@xxxxxxxxx] Sent: Monday, August 14, 2006 04:13 PM To: ''Java Programming on and around the iSeries / AS400'' Subject: RE: Differences between calling Java from Qshell and RPG? Paul Nicolay wrote on 11/08/2006 @ 15:54 : **************************************************************************** **************** Your reason to use Java for connecting to MQ was apparently inspired by not having MQ on the source system itself (it's a shame there's no native client). While I had the same issue in the past, I solved this by using a remote dataqueue so that the "copy" job could run on the system where MQ was available. (and no Java was needed) The problem is that both yours and my solution destroy the advantage of using MQ since a network failure will finally cause the dataqueue to overflow and probably crash the initial program or at least loose messages. **************************************************************************** **************** Hi Paul, I'm sorry if I've misinterpreted your first paragraph but isn't this only going to work if both local and remote systems are iSeries? The 'copy' is fine for relatively small messages but our requirement is to allow for messages upto 800kB whereas the DTAQ goes upto 65kB. I seem to remember that MQ can go upto 100 Mb per message! My application is on the backend server which is an iSeries and where the database and MQ reside. The client system that puts/gets from the MQ is written in Java but the platform is still to be decided. However, it will not be an iSeries. The reason I decided in favour of Java over RPG was that the client system team had already developed the MQ message/attachment classes and I was able to 'borrow' these. In a previous email I mentioned that it might not be possible to send .pdf attachments in RPG/MQ whereas it was quite straightforward in Java. On reflection, that probably isn't strictly true as I could convert the .pdf to a binary stream. However, going with Java certainly reduced the development effort on the client side though it gave me an interesting learning curve! Regarding performance, I'm getting a request off the DTAQ and onto the MQ in around 0.05 second. This includes a 0.5 Mb .pdf attachment and, for now, I'm running on optimization level 10. Regarding network failure, in our case, the DTAQ wouldn't overflow because the client would be unable to send requests inwards. Kind regards, Keith The Royal Bank of Scotland plc, Registered in Scotland No. 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB Authorised and regulated by the Financial Services Authority. This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer. Internet e-mails are not necessarily secure. The Royal Bank of Scotland plc does not accept responsibility for changes made to this message after it was sent. Whilst all reasonable care has been taken to avoid the transmission of viruses, it is the responsibility of the recipient to ensure that the onward transmission, opening or use of this message and any attachments will not adversely affect its systems or data. No responsibility is accepted by The Royal Bank of Scotland plc in this regard and the recipient should carry out such virus and other checks as it considers appropriate. -- 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.
As an Amazon Associate we earn from qualifying purchases.
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.