Submitted by Anonymous (not verified) on Thu, 03/14/2013 - 00:00
Forums

Hi Niels,

We have an IceCap version of our system we are evaluating.

My question is how these IceCap pages are generated?
Is there a src code for the webforms/pages we can modify with IceBreak?

Best Regards,

Niklas

Niels Liisberg

Thu, 03/14/2013 - 00:00

Hi Niklas;

You can modify and manipulate everything that IceCap is rendering – and it is not static. The basic concept is that IceCap is a REST full service, so when you press the enter (or any function key) you send a web service request to the Icecap REST service.

Now in that communication flow back and forth you have several options: Let's start with the response you get back to the browser – Here you can hook up either client side or server side. The most powerful is server side.

We have a concept here called a "break out" program. The break out program is an ILE program (RPGLE) that runs server side and receives the request before the data hits the 5250 input fields and again before the 5250 output data is sent back to the client. You have full access to the physical screen buffer 80x24 or 132x25, so you can let you code act upon a combination or characteristics on a certain 5250 page by using the IceCap API which makes the work very easy.

So you manipulation of data is super dynamic as a program logic can be.

In the transition of data from server we send a JSON object to the client – This contains all output data and input fields. Here you can add (or remove) fields as you like, or even navigate to certain pages – like a robot would: fill in input fields, press enter or functions keys.

Adding new components is done with the emlAddMetaField() API which can add anything from charts, calendars, date pickers, drop down boxes, panels, web links etc. to let you enhance a certain page. The emlLoadArea2Grid() convert a subfile to a grid, emlArea2Panel() convert an area to a form or a panel. Look at all the prototypes in source file QASPHDR in library ICEBREAK and the low-level API to interact with the Virtual Terminal under the hood is found in the source member ICEBREAK/QASPHDR/ICECAP.

We are using a framework called ExtJS to build up the screen, so a knowledge of that particular JavaScript framework will be a great help to you.

To give you more inspiration I suggest that you take a look in the source file QSAMPLE in library ICECAP. All samples from EX01 to EX99 add new behaviors and even totally rearrange the 5250 display and even let you piggy bag a new web application along with the original 5250 logic.

If you compile any of them as programs object ICECAP/USEREMUL then this program will be you break out program and be active next time you press enter or a function key ( like F5=refresh) in the IceCap session.

You should know that the 5250 session and the IceCap session share the same IceBreak session. So you an transfer data from the green 5250 to the break out by sessSetVar and sessGetVar IceBreak API.

Best regards,

Niels Liisberg