Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » EGL Development Tools » IBM i Program Call under 0.81 M3(Things changed.....)
IBM i Program Call under 0.81 M3 [message #894364] Sun, 08 July 2012 17:53 Go to next message
Dan Darnell is currently offline Dan DarnellFriend
Messages: 145
Registered: November 2011
Location: Arkansas
Senior Member
I am revisiting IBM i program calls and now that 0.81 M3 is out I see that some things have changed.

I really liked that we could invoke a program call from a Rich UI using a syntax that made it appear that we were calling the program from Rich UI client tier. (I know that there was actually a proxy layer in between but it was invisible to the programmer.) I can't seem to figure out how to make that type of call work now that M3 has dropped.

Taking the working example from my video (see http://www.youtube.com/watch?feature=player_embedded&v=6Kt90MVUdCM#!) I made what seemed to be the necessary modifications for 0.81 M3 (using the new @Resource and @StructXXXXX annotations). Here's the modified service code:

service CallRPGService
	
function hello(name string inout)
{
    @Resource{uri = "binding:MyConnection"},  
	
    @IBMiProgram {         
     	 programName = "MYRPG",
         libraryName = "/QSYS.LIB/*LIBL.LIB/",
         parameterAnnotations = [
            @StructText{length = 40}
         ]
    }
}	
end

end


In my Rich UI client I used to be able to do this:

   function varGoButton_onClick(event Event in)
    	call CallRPGService.hello(varNameField.text)
    		using new HttpProxy
    		returning to myCallbackFunction
    		onException myExceptionHandler;
    		
    end


This no longer compiles. The errors are:

IWN.VAL.5727.e 28/13 CallRPGClient - The type of the using expression must be
eglx.jtopen.IBMiConnection. At lint 28 in file \CallRPGProgram\EGLSource\com\dandarnell\client
\CallRPGClient.egl.

IWN.VAL.5729.e 29/7 CallRPGClient - A "returning to" or "onexception" expression is not allowed for a
call to a local function. At lint 29 in file \CallRPGProgram\EGLSource\com\dandarnell\client
\CallRPGClient.egl.

IWN.VAL.5729.e 30/7 CallRPGClient - A "returning to" or "onexception" expression is not allowed for a
call to a local function. At lint 30 in file \CallRPGProgram\EGLSource\com\dandarnell\client
\CallRPGClient.egl.


I don't find an example in the online or product help for invoking an IBM i service function directly from a Rich UI client but the documentation DOES still indicate that this is possible. Question is, how?

--Dan

[Updated on: Mon, 09 July 2012 17:08]

Report message to a moderator

Re: IBM i Program Call under .8 M3 [message #894561 is a reply to message #894364] Mon, 09 July 2012 15:26 Go to previous messageGo to next message
Joseph Vincens is currently offline Joseph VincensFriend
Messages: 31
Registered: December 2011
Location: Prospect CT
Member
Hi Dan,

I'd like to say this is a validation problem, but I need to do more investigation.
Until I determine whether this is a validation problem or limitation, add another service function that just does a call, ie

service CallRPGProgram

    function hello(name string inOut)
   
	    call this.helloRPG(name);
    end

    function helloRPG(name string(40) inOut){
    	@Resource{uri = "binding:MyConnection"},
        @IBMiProgram{
        	programName = "MYRPG", 
        	libraryName = "/QSYS.LIB/*LIBL.LIB/", 
        	isServiceProgram = false
        }
    }
    end

end



Based on your other post about the call defect I think you already figured this out and got stuck because of a generation error.

BTW we are now supporting so you will see that I modified your parameter to use string(40) instead of the StructText{length = 40} annotation.

regards,
Joe
Re: IBM i Program Call under .8 M3 [message #894569 is a reply to message #894561] Mon, 09 July 2012 15:50 Go to previous messageGo to next message
Dan Darnell is currently offline Dan DarnellFriend
Messages: 145
Registered: November 2011
Location: Arkansas
Senior Member
Thanks, Joe. I was actually finishing up an article for a magazine this past weekend (my deadline is today) and decided to pull in M3 to make sure everything still worked and to modify my examples for the changes in syntax .... that's when everything went sideways.

I would hate to lose the ability to go "directly" from a Rich UI client to an IBM i program call function -- not just because my article covers this but mainly because it is a capability not found in any of the tools and languages that compete with EDT. It is a fantastic way to simply access IBM i resources.

Long story short, I am hoping that you will be able to provide a near-term fix of some sort for this issue. I have already informed my editor that I won't be meeting my deadline today but I sure would like to be able to wrap up my article. I think EDT can use the exposure and I know the IBM i community will benefit from EDT if they can see how great the IBM i support is!

--Dan
Re: IBM i Program Call under .8 M3 [message #894643 is a reply to message #894569] Mon, 09 July 2012 23:52 Go to previous messageGo to next message
Joseph Vincens is currently offline Joseph VincensFriend
Messages: 31
Registered: December 2011
Location: Prospect CT
Member
Hi Dan,

This was a defect. I opened https://bugs.eclipse.org/bugs/show_bug.cgi?id=384668. I've committed a fix and you should be able to pick it up after the build runs @9.

thanks,
Joe
Re: IBM i Program Call under .81 M3 [message #894819 is a reply to message #894643] Tue, 10 July 2012 16:10 Go to previous messageGo to next message
Dan Darnell is currently offline Dan DarnellFriend
Messages: 145
Registered: November 2011
Location: Arkansas
Senior Member
Many thanks, Joe. This and the other fix should get me back on track. Do you think that both fixes will make it into the 0.81 final?

--Dan
Re: IBM i Program Call under .81 M3 [message #894993 is a reply to message #894819] Wed, 11 July 2012 11:09 Go to previous messageGo to next message
Joseph Vincens is currently offline Joseph VincensFriend
Messages: 31
Registered: December 2011
Location: Prospect CT
Member
Hi Dan,

Yes both fixes are already in, so they will be in 0.8.1 final.

regards,
Joe
Re: IBM i Program Call under .81 M3 [message #895149 is a reply to message #894993] Wed, 11 July 2012 19:54 Go to previous message
Dan Darnell is currently offline Dan DarnellFriend
Messages: 145
Registered: November 2011
Location: Arkansas
Senior Member
Excellent!
Previous Topic:Application Development Cover Story -- No EGL?!
Next Topic:Set compiler options in EGL New Package wizard
Goto Forum:
  


Current Time: Tue Apr 16 13:14:20 GMT 2024

Powered by FUDForum. Page generated in 2.03637 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top