Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Interaction with Ellipse via Java Middleware API – working examples re

Status
Not open for further replies.

yamun

Programmer
Dec 11, 2009
3
RU
Hi,

I'm working for a client who is using Ellipse 6.2.1 on a AIX server with CICS.
I’m trying to interact with Ellipse via Java Middleware API version 1.09.004.
There’s a need to work with Ellipse object named PurchaseOrder - create a new order, retrieve orders data and modify these data.
It appears that it’s not clear what parameters and what types of these parameters have to be passed to execute operations mentioned above.
E.g. when trying to work with object PURCHASEORDER.CreatePO using the code below:

MIMSBlock myBlock = new MIMSBlock();
MIMSRequest myReq = null;
myReq = myBlock.getRequests().create();
myReq.getFields().create(MIMSBlock.SERVICE, "PURCHASEORDER.CreatePO");
myReq.getInstances().create().getFields().create("DstrctCode","330");
myReq.getInstances().create().getFields().create("PreqItemNo","000000000007");
myReq.getInstances().create().getFields().create("PreqNo","001");
myReq.getInstances().create().getFields().create("PurchaseOrdNo","?03400");
myReq.getInstances().create().getFields().create("PurchOrdItemNo","001");
myReq.getInstances().create().getFields().create("TranOrigType","000708610");
myReq.getFields().create(MIMSBlock.REPLYLIST, "PreqPOReturn");

I’m receiving an exception:

com.mincom.mims.tech.mware.common.ServerException: "INPUT REQUIRED "
at com.mincom.mims.tech.mware.common.MimsSession.checkForCBRServerException(MimsSession.java:709)
at com.mincom.mims.tech.mware.cics.CicsSession.request(CicsSession.java:521)
at ru.iteco.mincom.connect.MIMSBlockWork.createPO(MIMSBlockWork.java:197)
at ru.iteco.mincom.connect.MIMSBlockWork.main(MIMSBlockWork.java:30)

Could anyone provide please working examples of Java code that executes these operations using both MIMS blocks and MSO (Mincom Screen Objects)?
Any help on this will be highly appreciated.

Thanks in advance,
Artem
 
Hi Artem, from the error message, it seems you miss some required fields. If you can catch the error message, it might give you more information.
Wei.
 
Hi Wei,

Thanks for the answer.
You're right.
An exception raised because of the incorrect method used when working with collection: multiple collections have been created instead of populating the required fields for the actual collection created.
It's fixed now the way below:

myReq.getInstances().create().getFields().create("DstrctCode","330");
myReq.getInstances().item(0).getFields().create("PreqItemNo","001");
myReq.getInstances().item(0).getFields().create("PreqNo","001");
myReq.getInstances().item(0).getFields().create("PreqPOReturn","");
myReq.getInstances().item(0).getFields().create("PurchaseOrdNo","?03400");
myReq.getInstances().item(0).getFields().create("PurchOrdItemNo","001");

Could you please let me know any means to catch an error message besides of use mySession.setTracing()?

Artem
 
Hi Artem,
Good to hear you fixed it. Not sure how you catch the error? In one of my code, I use something like.
try {
..........
}catch (IOException e) {
System.out.println("IOException caught e=" + e.getMessage());

} catch (ServerException e) {
System.out.println("ServerException caught e=" + e.getMessage() + e.block +
e.block.makeCbrBuffer(3));

} catch (ScreenException e) {
System.out.println("ScreenException caught e=" + e.getMessage());

} catch (CBRException e) {
System.out.println("CBRException " + e.getMessage());

}
 
Another thing to look for is the 'ActiveField' - this is often the field which the error message is referencing... Drew
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top