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



Yes, I saw that page, but when I work with ProgramCallDocument, I've to
know the CL parameters (I think so). I am working with ProgramCall to call
it directly.

This is the code that I'm using to get data from MAPICS programs.





ProgramCall pgm = new ProgramCall(sys);//sys à objeto AS400

pgm.setProgram(QSYSObjectPathName.toPath("AMALIB", "AMVDIM0C", "PGM"));
//AMVDIM0C, has 2 parameters



ProgramParameter pp[]=new ProgramParameter[2];

AS400Bin8 p1=new AS400Bin8();

AS400Bin4 p2=new AS400Bin4();



byte[] as=p1.toBytes(21780985);// 21780985 Item code. Should be a numeric
value, because string value throws an exception.

byte[] as2=p2.toBytes(5); //I guess that this second parameter is a
transaction type.( 5-->Query)



pp[0]=new ProgramParameter(as);

pp[1]=new ProgramParameter(as2);



pgm.setParameterList(pp);



if (pgm.run() != true)

{

System.out.println("Error");

//show errors

}

else

{

System.out.println("Success");

//manage data

}



This code needs the MAPICS program parameters, I am sending two parameters
in a aleatory order, and I can`t get something. So, I guess that the
parameter's order is wrong.

Maybe the second parameter is OK, but is not 5 to queries. ¿Do somebody
knows the parameter's order of this MAPICS PROGRAM (AMVDIM0C)?





____________________________________________________________________________________________________________________________________________

- *Subject*: Re: Running a Mapics rpg program from IBM Toolbox for
java
- *From*: "Josh Diggs" <JDiggs@xxxxxxxxxxxx>
- *Date*: Mon, 30 Jul 2007 14:32:38 -0700



I can give you a hint as to one part of the equation. You can use a pcml xml
document and a ProgramCallDocument java
object<http://archive.midrange.com/mapics-l/200707/msg00192.html> in
order to call a native program from java. You'll need to set your library
list, so you probably want to call a CL that sets the lib list and then
calls the Mapics program.

I don't know anything about that Mapics program or the parameters it
expects. Sorry.

http://www.itjungle.com/mpo/mpo011702-story04.html

-----Original Message-----
From: mapics-l-bounces@xxxxxxxxxxxx
[mailto:mapics-l-bounces@xxxxxxxxxxxx]On Behalf Of Braulio Blanco
Sent: Monday, July 23, 2007 7:10 PM
To: mapics-l@xxxxxxxxxxxx
Subject: [MAPICS-L] Running a Mapics rpg program from
IBM<http://archive.midrange.com/mapics-l/200707/msg00192.html>Toolbox
for
java


Hi Everyone,

I need some help to run or call a Mapics rpg program from IBM toolbox for
java??
I 'm trying with AMVDIM0C.PGM, but it is not working.

The program needs two parameters, but I dont know what are these parameters.

I think that the first parameter should be the Purchase Order Code.

Can I call it directly or I need to call it using a CL program ??
What is the second parameter? It`s OK that parameters' order???



Thanks,



Braulio

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.