Submitted by Colin Harris on Fri, 12/23/2011 - 10:19
Forums

Can anybody supply, or point me to examples or documantation, on the use of x-types in IceCap breakout programs. The examples in USEREMUL do not cover them all or provide sufficient documentation on how to use them.

Two immediate questions:

Can mult-column lists be created using DDSQL or DDSEARCH. And if so , how.

The is the format of the code to use 'BUTTON'

Also can I customise subfile columns in a breakout program to provide similar functionality to that shown in the supplied 'advanced' and 'icaped' examples.

Claus Rytter Larsen

Mon, 01/02/2012 - 14:04

Hi Colin,

You will find all the x-types, we have written in the ifs folder: /www/icecap/scripts/xtypes.js. You can find some documentation/comments for the x-types, that all we have at the monent.

As you properly already known, we are using the javascript framework called ExtJs (version 2.3).

If you for example take the x-type: DDSQL, it is extended from the ExtJs class called 'Ext.form.ComboBox', you wil find all the config options for this class here: http://dev.sencha.com/deploy/ext-2.3.0/docs/?class=Ext.form.ComboBox, and you can use them all in the IceCap breakout program.

The documentation for 'button' you will find here: http://dev.sencha.com/deploy/ext-2.3.0/docs/?class=Ext.Button

Regarding 'advanced' and 'icecaped', it something you specify in your url, ex. /menu/icecap.aspx?config=icecaped&func=wrksplf. The 'config' parameter tells IceCap to use the 'icecaped' part of the icecap_config.xml file:

<icecaped>
...
  <emulator
     ...
    method="icecaped"
    useHints="yes"
    hintsXMLhive="menu"
    hintsXMLpath="icecaped.xml"

-and in the icecaped part, the value in the method tag, tells IceCap to handle subfile, as 'icecaped'. The 'icecaped' method try to recognize the subfile, and save the recognizing in the xml file, specified in the tag: 'hintsXMLpath'.

Thanks for the information but we cannot understand the documentation you directed me too.

Is it possible to provide some example breakout program code to do the following (if it is possible to do it)

Pick up a number from a fixed position on a 5250 screen. Create a button in this position with text equal to the number. When the button is clicked execute an AS400 command, in icecap, with a parameter containing the number from the screen.

 

  

Claus Rytter Larsen

Mon, 05/07/2012 - 10:05

Hi Colin

Question 1 (Mult-column lists):

The values for the list is generated by SQL, both for xtype DDSQL and DDSEARCH, and with SQL you can concat several values from the DB file creating mult-columns.

ex. 

sqlCmd = ('
        + select 
        + id as key, 
        + desc1 concat desc2 as value 
        + from myfile
        + ')

Question 2 (BUTTON):

I do not quit understand the question !

Question 3 (Customise subfile colums):

Yes, you can use the emlArea2grid emulator function. You will find the documentation under 'administration' and 'IceCap emulator API documentation'.

Question 2

 

We have a subfile, 2 records per line, which looks like this

 

                Enquiries                 1076 GHD Order processing         
 1114 Item Master Enquiry                              Other Options        
  820 Vendors                             1167 Direct IERep Sales Dwnld -4494
  831 Store Enquiry                       1306 Direct IERep Sales Dwnld -7955
 1507 Item description search             1161 UK Direct Rep Sales Download 
                  Orders                  1121 Locations                    
  839 Manual Order Entry - Branch          808 Switch Default Warehouse     
  861 Transfer/Branch Order Enquiry                         SOP             
  862 Transfer Maintenance                1546 SOP Sales Order Entry        
 1033 Enter Store GHD orders              1548 SOP RMA Entry: Order Selection
  844 Work with Provisional Orders        1549 SOP RMA Authorisation        
           View Pending orders            1552 SOP Order Selection          
 1170 Store Pending Orders Blackburn      1554 SOP RMA Selection            
 1171 Pending Store Orders (T/Bank)       1555 SOP miscellaneous credit entry
  970 Store/Sale number enquiry           1556 SOP misc. invoice entry        

I would like to turn the numbers (e.g. 1170) into a button and execute an AS400 command with the number 1170 as a parameter

e.g. XICE PARM('1170')

Claus

 

Both. In 5250 we can double click  (use the cursor position) or enter the number at the bottom of the screen.

We can use the method you supplied to use the cursor position method in Icecap but clicking, or double clicking, does not work very well for our Users for a number of reasons, including it is too easy to 'select' the text on the screen. Our Users find it quite difficult to select by simply clicking or double clicking in the Icecap window. It can take several attempts to get it right.

Buttons would be much easier to use for our Users plus any technique used to achieve buttons on the above screen would be extremely useful elsewhere.