CALL A JAVA MAIL APPLICATION FROM JBASE

498 views
Skip to first unread message

lopezo

unread,
Sep 26, 2006, 1:24:35 PM9/26/06
to jBASE
Hi friends,

I have 2 challenges.

1. Can anyone offer some advice on how I can call a mail application
written in java from a jbase subroutine?
I have some ADVICE generated in T24 that needs to be sent out via email.

Sharath

unread,
Sep 26, 2006, 11:14:18 PM9/26/06
to jB...@googlegroups.com
hi

You can use the CALLJ function in Jbase to call ur Java method.
Use DE.INTERFACE>OUT.IF.ROUTINE to pass the advice to java.


Best Regards
Sharath

Ian Perkins

unread,
Sep 27, 2006, 2:26:32 AM9/27/06
to jBASE
Or, think about writing a shell script from the JBC routine?

I have used the following in HP-UX to send a mail with no body text -
I'm sure someone else could tell you where the content should go...


mail youatsomehere.com << eom
Subject: somethinginteresting
.
eom

(note the full stop on line 3)

Then just execute it...

Malai

unread,
Sep 27, 2006, 4:57:54 AM9/27/06
to jBASE
You can use mailx also. I tried in AIX and it works fine.

$mailx -s yoursubject -n your...@yourdomain.com < mail.txt

Note: Write the content in mail.txt file.

--------
Malai

Jim Idle

unread,
Sep 28, 2006, 1:50:01 AM9/28/06
to jB...@googlegroups.com
echo "body"| mail ji...@mailinator.com

or

cat file | mail ji...@mailinator.com

(This is also an unsubtle plug for mailinator.com)

You might find mailx more useful in some cases, as well as man mail{x}

Jim

Then just execute it...


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.12.9/457 - Release Date: 9/26/2006

--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.12.9/457 - Release Date: 9/26/2006

alex

unread,
Nov 10, 2006, 7:50:51 AM11/10/06
to jBASE
I am writing you to ask your help for the folowing issue:
I want to use CALLJ to execute a java application and I receive the
error:

jsh T24G ~ -->testblk

java.lang.NoSuchMethodError: Verify

32768

6 ......this is from System(0)

Java returned: 32768

jsh T24G ~ -->

The test environment is on computer HP Compaq, Microsoft Windows XP
Professional 2002, Service Pack 2

GLOBUS Release R05.000

JBASE 4.1


JAVA application, ClassConnector.java which receives as parameter a
string then it tryes to connect to an SQL server, execute there a
procedure and return an integer. The ODBC setings are made between my
coputer and the SQLserver (I don't know If I have to set also jRFS )

I set my demo environment PATH to:

PATH=%PATH%;C:\Program Files\Microsoft Visual
Studio\VC98\bin;C:\jdk1.3.1_08\jre\bin\server

and the CLASSPATH to:

CLASSPATH=%JBCRELEASEDIR%\java\lib\javaobjex.jar;%JBCRELEASEDIR%\java\lib\jbase.jar;%JBCRELEASEDIR%\java\lib\BlackListConnectorDeployment.jar


The .b file is;

ret=45

param=""

param="1001,UA,RT,100245,AN"

CALLJ "BlackListConnector.ClassConnector", "Verify", param SETTING
ret ON

ERROR CRT ret

CRT SYSTEM(0)

CRT "Java returned: ":ret

After I save it, I run ->jcompile testblk.b

Do I have to do more settings?
Could you tell me why I am receiving this error?
Thank you.

Daniel Klein

unread,
Nov 10, 2006, 9:19:28 AM11/10/06
to jB...@googlegroups.com
This sounds like an environment problem. What is the complete environment on this system (jdiag -vL) ?
 
Can the 'Verify' method be called successfully from java ?
 
Have you tried placing 'testblk.exe' in the same directory as the java class ?
 
Dan

 
Reply all
Reply to author
Forward
0 new messages