Solved

Trigger IBM Personal Communication Macro from a Java Application

Posted on 2006-12-01
5
893 Views
Last Modified: 2012-06-21
Hey,

Background:
At the moment we have a java application that uses Host-on-Demand (HOD) to access Host via XML Macros. Due to certain conditions (don't ask), we have to use IBM Personal Communication (PCOMM) now to access HOST/MainFrame.

Question:
I can always re-write the HOD XML macros into VB/PCOMM Macros but I need a way to trigger them from Java Application. That is, the application will send information to PCOMM and trigger the macro. I also would like to know if there is a way to change code to use PCOMM instead of HOD and still run the existing macros (would they work?) which are in XML (HASCRIPT) which would be a easier solution to implement.

Things i have tried/looked at:
- Runtime Exec
- Host Access Class Library (There is a STARTMACRO function for C++, VB, Lotus Notes but not for Java)
- Host Access Beans Library (looking into at the moment - used in HOD)

Thanks in advance.

Ali

0
Comment
Question by:alisadaqain
  • 2
5 Comments
 
LVL 41

Expert Comment

by:HonorGod
Comment Utility
PCOMM and HOD are two separate and distinct products.
The good news is that each has a documented Application Programming Interface (API),
so it is possible that you might be able to change from one to another.  However, I don't
think that it would be easy.

I haven't dealt with HOD, but I have done some PCOMM programming.  However, the PCOMM
programming that I did was using REXX, and not Java.  So, I don't know how easy, or difficult
it might be to do what you are trying to do.

When you say that you need to use Java, is that only Java, or are you allowed to develop Java
Native Interface (JNI) routines?  If this is allowed, it is more likely to be possible.

Since HOD and PCOMM are different products, each with its own API, and macro language,
it MIGHT be possible to convert from one to the other, but I believe that it would be a non-trivial
task.  It all depends on how intricate the macros are that need to be converted.
0
 

Author Comment

by:alisadaqain
Comment Utility
@ HonorGod

No, only Java. JNI as been ruled out for the time being.

I was thinking, maybe i could output the data in a file. The user would switch to PCOMM, run the macro (PCOMM script / VB) which would open and read the file and use the information in the file for host screens.

Is there a better way to do this? What do you think?
0
 

Author Comment

by:alisadaqain
Comment Utility
I solved it.

Re-did the macro's in vbscript - PCOMM and read from a file which the java application writes to once data is entered.

Thanks,

Ali
0
 

Accepted Solution

by:
PashaMod earned 0 total points
Comment Utility
Closed, 250 points refunded.
PashaMod
Community Support Moderator
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
firstChar challenge 13 82
delphi parse string to params 3 79
Path of Workbook 3 44
control image tags in a string ? 12 58
Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
A short article about problems I had with the new location API and permissions in Marshmallow
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now