Submitted by Mike Haston on Fri, 01/11/2013 - 00:00
Forums

Hi Niels -

I'm a fellow RPG programmer getting into ExtJS. I have a WRKSPLF application of my own that downloads the PDF spool files. I just watched your demo (a few times) and really like how you display your spool file via IFRAME right in your panel.

If you have the code lying around where it's accessible would you mind sharing that WRKSPLF.js or that piece of the code which is the IFRAME? I would appreciate it.

Thanks either way,

Mike Haston

 
The YouTube link I was referring to:  http://www.youtube.com/watch?v=AT2lTH0_mpQ

Niels Liisberg

Fri, 01/11/2013 - 00:00

Hi Michael;
 
To make this work out of the box:
 
1; Download/Install the IceBreak server on  your systemI
2; On a 5250 screen: GO ICEBREAK
3: Option 12 on the menu; work icebreak server
4; F6=Add server; call it TEST1 set port number to 60000, press enter
5: F5=Refressh to se it in the list
6: Start the TEST1 server with opt 12 in work with servers
 
This creates an IFS path on you SystemI called /www/test1
 
Now unzip the attached into:
//MYSYSTEMI/www/test1
 
(MYSYSTEMI is the name or TCP/IP address of your System I)
 
Open the powerpoint presentation from the same location to get an overview ( this was btw what you partly saw on YouTube)
 
- download JPLTOOL – I have it if you fail to find it;
 
Open you browser and refer to this url:
http://MYSYSTEMI:60000/wrksplf.html
 
The above will kick in the IceBreak JIT compiler and compile the RPG-code
 
Hope it works, otherwise don't hesitate to contact me; and let me help you
 
Have fun :)
 
Best regards,
Niels Liisberg

Niels -

Thank you very much! 

It's funny that I stumbled across your example and you work with IceBreak. Just last week a co-worker and I were checking out the website. I've been working with CGIDEV2 for years and the past few years have been getting into ExtJS (since v2.2). Recently that co-worker and I have been talking about solutions to take away the learning curve. I've looked at Valence, IceBreak, Profound Logic, PowerExt, etc.

This will give me a good look at your tool. Didn't you guys used to have a forum in the Code400.com site? Let me kick the tires a bit on this and again ... thank you very much for being so helpful.

Mike

Hi Michael;
 
It is correct – we have/had a forum on code400, this however does not have that much "traffic" since we opened the forum on the IceBreak home page. And even that has not much traffic. It seems that all our customers have this "bad habit" sending questions directly to support@system-method.com and we reply directly back. Afterwards we try to feed the good questions and answers back into the forum.
 
To get stated with Extjs – I will suggest you to try the ExtJs component wizard in IceBreak. Not that it produces the most beautiful code – but it will produce both the RESTService and the client code needed to a fully flying CRUD application:
 
Step 1:

  • Open the icebreak admin. 
  • Open Tools;
  • Open ExtJs Component wizard.
  • Now enter a file name – just start with the demo ICEBREAK/PRODUCT file.
  • Select the "monolithic grid program" 
  • Click display
  • Then select all and copy the code from the "create window":
  • Click in the window:

                     Press CRTL-A  (Select all)

                     Press CTRL-C (Copy all selected)
 
 
Similar to this see screen shot 1.

Step 2:

  • Now paste the code from your clip-board into any text editor – notepad will even do.
  • Save the notepad document:

                     Name it  "products.aspx" - use the double quests to set the file extension

                     Save it to //mySYSTEMi/www/test1 – the path of you IceBreak application server instance

See screen shot 2.

Step 3:

  • Now open you browser and enter the name in the url:

                     http://mySYSTEMi:60000/products.aspx
                     Where mySYSTEMi is the name or TCP/IP address of you System i / IBMi / i5 / AS/400
                     60000 is the port number you did configure
                     Products.aspx the source file you had saved to the IFS
 
The IceBreak Just-In-Time RPG compiler will kick in and compile the program for you and place it into library TEST1 with a name of PRODUCTS.  

See screen shot 3.

IceBreak ships with version 2.3 of extJs since we have a distribution license to do so. You will find it in the system supplied directory /system/components/ext-2. The /system btw is by default available in all server instances.

I will however suggest that you download the newest version of extJS and place it in the /system/plugins which is also available in all server instances but not overwritten when you upgrade icebreak.

This is a snippet from the "programmers guide" you might find helpful – this is for "sencha touch" but the same goes for ext-js:

Prerequsits

Before you start you need to download a version of the Senche Touch frame work. The application generator is designed to work with Sencha touch version 2. This however will change over time. For copyrights reasons the IceBreak server is not distributed with the Sencha touch frame work, the installation on the other hand is quite easy:

  1. Download Sencha touch fromhttp://www.sencha.com/products/touch/download/
  2. Unpack the zip file
  3. Place the Sencha Touch directory under the /System/Plugins directory of your IceBreak application server.
  4. The "/System/Plugins" directory:

Please note that the /System/Plugins directory is a symbolic link and is therefore available in all server instances via the system hive. Also/System/Plugins are left unchanged when you update IceBreak to the next version. The /System/Plugins directory are not changed, deleted or updated by IceBreak, you, however, must have in mind that any changes you apply to/System/Plugins will be propagated to all server instances of IceBreak server on your system. Therefore: Do not delete it!!
 
Also the /System/Plugins directory is perfect for shared resources between IceBreak servers – just to name a few that might interest you:

  • jQuery
  • ExtJs
  • Sencha Touch
  • jQuery Touch
  • DoJo
  • Capuchino

Create My First App
 
Now lets fire up the code generator and build out first application:

  • Open the IceBreak Adminstration
  • Open the "tool" menu
  • Click on the "Sencha Touch generor"
  • Now you will se the generator wizard:

Now lets fill in the wizard form:

  1. First the fille in the library and file: Lets use the simple PRODUCT database table which is default available in *LIBL of you IceBreak installation.
  2. Select the component type: Now just select the List and edit for application.
  3. Select the server where it will be installed and run from: The server need to be in development mode before the wizard successfully can compile the RPGLE-REST service it will create.
  4. Enter the name of the "app" this will also be the name of the directory created for you app, so don't enter a name so overwriting existing stuff will occur. Also avoid spaces and hyphens.
  5. Enter a a description of the app: This will be the name you see on the iPhone/iPad/Androide desktop menu when you attaché the app tou you home screen – So give it at proper description but not to long – the phone desktop has limited space.

Now you are good to go!! Press the "generate" and let the magic begin - it might run for a while.

Run my first App
 
Open your iPhone/iPad/androide and open the browser: Enter the url of the application you just made: http://myIBMI:1234/myapp/index.html
 
myIBMI            is the ip address or name of you IBM
1234               denotes the port number you already have configured for you IceBreakserver
Myapp             is the exact name of you app you entered in the above opt 4
Index.html     is The default document – just use that name for now
 
Now you will see an application similar to this:
 
It has the following features:

  • It only loads 25 rows from the sever at the time to reduce net workload – this can of cause be changed. But when you page through it loads the 25 etc.
  • It makes a generic search on all columns in the basing table – this can be modified later
  • When you click on a row, it brings up a form where you can change the row contents, and update the contents.
  • You can create new rows in the table
  • When you swipe down on the first page it will reload the list contents.

The application will in all cases be based on the access to a DB/2 database file. So the application generator will build the following components for you:

  • The Ajax based client code
  • The REST service – which btw also contains a full-blown web 2.0 CRUD web-desktop application
  • And IFS folder as a subfolder in you application server root that contains the source to the above.

Always feel free to mail me.
 
Best regards,
Niels Liisberg

I am in the process of trying to rewrite some cgi i/series code into using the extjs controls.

This example is a good example. Can i get the source for your spool file example, and any form examples you also may of written, i have a couple of road blocks i think. but this would help me i believe.

Thank You

Monty