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



Shreya,

You will probably have a prototype that accesses java.lang.String. I cant
see any reason why you cant pass a variable!

Eg

 * new java object                                          
Dnew_string       PR              O   EXTPROC(              
D                                       *JAVA:              
D                                       'java.lang.String': 
D                                       *CONSTRUCTOR)       
D                                     CLASS(                
D                                       *JAVA:              
D                                       'java.lang.String') 
D bytes                      65535A   const varying  

                                 
// Attachments                   
attachments(1) = new_string(' ');
exsr AddAtt;                     
args(8) = loadAtt(attachments);  
                                 
// Debug                         
args(9) = new_string('true');    
                                 
// Send Email                    
sndemail(args);                         


So the parameter passed to new_string can be a literal or a variable

Cheers
Colin.W


-----Original Message-----
From: Devani, Shreya [mailto:shreya.devani@xxxxxxxxxx] 
Sent: 04 November 2003 15:17
To: 'JAVA400-L@xxxxxxxxxxxx'
Subject: RPG calling Java with Parms


Hi

 

I am trying to call Java from RPG with Parms.

The examples I have found so far always hard code the parm eg; 

 

Free
    args(1) = string('Test Value');
    main(args);
/End-Free

 

 

But I want to pass in a string variable!

 

Can someone please help?

Many Thanks

Shreya



----------------------------------------------------------------------------
-----------------
Registered Office:
Siemens Financial Services Limited (Tel: 020-8422 7101)
160 Northolt Rd, Harrow, Middlesex (Fax: 020-8422 4402)
HA2 0PG 
Registered No: 646166, England Web:www.siemensfinancialservices.co.uk
----------------------------------------------------------------------------
-----------------

***************************************************
This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
If you have received this email in error please notify the system manager.
***************************************************

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

For the latest on Bertram Books products and services and for up-to-the-minute 
book news visit www.bertrams.com


This e-mail and any attachments may contain information that is confidential 
and privileged and is solely for the use of the intended recipient. If you are 
not the intended recipient please notify the sender and delete this e-mail and 
any attachments immediately







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.