What I want to do :
I am building(concatenating) a xml (string) in a plex function (rpg) , this xml can be huge and I/we ran into trouble when we ran into size limit constraint of a variable. What I want to do is define a pointer and then when I am appending to my xml(pointer in memory) . Then when calling a sub function (another rpg function) reference this pointer to get the xml file in memory. Is this posible? How do you define the pointer address in Plex rpg function and then how would you reference it again in a sub funtion call(another rpg function called from the main function).
Hope this makes sense. We are still using Plex 6.1.
I have used pointers in stellatools Consume & Publish Webservices from IBMi - Solved
Thanks I also wanted to use pointers but struggled to get it working.. could you please post a link to the download page of StellaTools1.5_Beta.mdl I did follow your link and registered on the website and also downloaded StellaToolsV2.04.zip Theres a local model but not sure if this is the correct model, if it is where would I get the example of using a pointer? What I basically am trying to do is build my request in Program A and send it via a pointer to Program B In program B Call the Webservice. Do you have anny example of using a pointer in Plex
2.04 comes after 1.5
I presently am on an enforced sabbatical from Plex so don't have access to the plex ide on my pc.
I used pointers in my source as S.Klement does on his http solution. You should try an build the examples and dig into the action diagrams to see how I used RPG source with action diagrams.
Wow... firstly awesome implementation or in integration with HTTPAPI and plex. I also see how to use pure rpg coding source code in plex and I tried Implementing a pointer solution. Could you please check the following and tell me if I am on the correct track?
I went through the examples using httpApi in stella tools and did the following.
This is in "Program A" : this program is responsible for building the request, in this plex function(RPGIV) I created a new field in WorkL called "MyXMLString" in the source code I modified it to be based on a pointer.
Now in "Program A" I am setting or appending the XML in to "MyXMLString"
Where MyXMLString.Test1 is a valid xml request just for testing purpose.
I then call a function RPGWebserviceCallInMemory that I created in Websphere Development studio the input I defined the following way.
I defined the iServiceReq as a pointer.
Then I also defined the following.
I define a string or field in memory that will be send into http_url_post
Next I move the the input in to my working variables.
In my free format I set myString pointers address to the input address vServiceReq.
I then consume the webservice using myString address as my post data.
When I run Program A and view my spoolfile to check the print statements I get the following.
So I am guessing its sort of working except its cutting off the start of my xml string.
Am I on the correct path in using a pointer will I be able to store a large string ie. 300 000 characters in my Input variable.
Thanks for your input I appreciate it.
About the cutting off my xmlString What I am seeing is that when I put spaces infront of the literal it works or rather it does not cut it off.
Wow... firstly awesome implementation or in integration with HTTPAPI and plex.
Yep the culmination of 17 years working with Plex non stop..thought the initiative would generate work or a job but actually the next thing that happened was having to leave plex...some reward...sorry cant help you any further.
Also if you trying to consume a webservice just use the patterns stop reinventing the wheel..Scott Klement is better than you!
Thanks I understand.