Archive for Web Option

10 Easy Steps to Webify Your CA 2E Application


Got a great CA 2E screen you’d like to use for the web?  Though there are many tools that can turn your CA 2E screen into a web page, each has plusses and minuses.  One stands out – get the best integration with CA 2E with Web Option, allowing you to do more while working less.  Life doesn’t have to be that hard.

If you know how to generate ‘green screens’ with CA 2E, you can make a web page just as easily.  Don’t worry about CSS, JavaScript or HTML – you don’t have to know any of this to be a web superstar.

Follow the 10 steps after installing the Web Option on your IBM i and see what you can do!


10 Easy Steps to Web Magic


1. Create the Web Option Server.

The Web Option server provides the link between the generated web skeletons and the actual web pages displayed on the browser.

2. Create the HTTP server

The HTTP server displays your screens a HTML web pages.

3. Configure the Web Option server

The web option server has quite a few items you can customize based on your specific needs.

4. Customizing Web Server Configuration Easily

Simply point to the proper environment and IFS directories.

5. Creating the Web Environment

The web environment is the location on your IBM i where you will build and configure your web application.  It contains the files, data areas and server configuration for your specific web application.

6. Customizing Pages Globally

You can customize individual pages by modifying generated HTML or you can customize global values that will allow pages to generate with the same HTML, Javascript and CSS customizations.  The latter is the most effective  way to globally customize the skeleton creation.

7. Generate Skeletons for 2E pages

Once you have determined the customizations then skeletons must be generated for each page.  Each page that is generated will need a screen identifier.  You can customize your current header footer to include the screen id or use the provided header footer with the screen id.

When the skeletons are generated they use the global skeleton customizations to provide the look and feel you have defined.  In most cases, you will not have to do any more customization.

This is the step the most 2E developers will use. You simply place an H on the function and generate the HTML.

8. Run the generated screens

Once the skeletons are generated, they can be run in the web server.  Go to the appropriate url for your environment and run the web page. At this point, you have a fully functional web application.

9. Element Level Customization

In some cases you may want to provide element level customizations.  This could as simple as setting all date fields to display as calendars and telling all Yes/No fields to display as selectors.

10.Customize navigation

Finally, if you want to make your application navigate optimally for a web page, Web Option Scripting lets you modify navigation.  For example, you may want to skip a couple of screen but you want to keep the parms on the last screen.  The script can remember the parms you pass so the last screen you open has all the necessary parameters.

You can even provide users with the ability to create and run their own macros.  This can be a time saver for users and possibly a great way to add short cuts to your application.


That is all there is to creating a web application from your green screen.  If you need more a more detailed understanding about this process, we do offer beginner and advanced level training on Web Option. Contact us for more information.


Take a New Look At Web Option

Seeking to move your CA 2E business applications from the green screen to the web? Web Option can make that much easier with its seamless integration with CA 2E. This integration provides the framework on which to develop a highly usable and good looking web application using primarily your CA 2E skills. Even better, you can accomplish the move in phases. You will find the development workflow almost identical to the way you work with CA 2E now.

Modernize in Phases

The first phase of the conversion process is ‘just in time’ screen conversion; once the Web Option server is running, the application can be converted automatically. Web Option provides rules that allow you to have control over the look and feel of the pages.

The second phase creates HTML skeletons from each of the screens in the application. This conversion can be completed screen by screen or as a batch job on a group of screens. You input the rules that define the company brand and get screens with the look and feel that matches your brand. The screens are generated with a uniform look and interface, but you always have the opportunity to customize individual screen elements. During this process, you can also integrate Javascript to provide additional interactive capability to elements, such as providing date pickers or rich text editors. You can even integrate with Dojo, JQuery or other Javascript libraries to extend the capabilities further.

The third phase is optional. You might already have the great looking application you desire from phase two. In the third phase, you can start refactoring the screen navigation so that the screens flow as true web applications as a user engages with them. The scripting language that comes with Web Option remembers parameters and flow-through screens without having to display every screen in the flow.

Simple Maintenance

One of the great strengths of Web Option is that its close integration with 2E removes the issues with double maintenance that other web-facing products suffer from. It follows much the same flow that you are used to from working with CA 2E. You can readily make changes to the action diagram or screen. For example, if you want to add a new field to a screen, all you need to do is regenerate the screen, just as you would do to generate new RPG or COBOL code. Instead of using a ‘J’ to generate it, you’ll use an ‘H’ to generate the HTML. All your formatting and customization is preserved. That’s it!

New Web Option Training

CM First has developed a Web Option class to provide developers with a solid foundation on how to develop applications. The class demonstrates the set-up, configuration and the ‘just in time’ pages then shows you how to customize the page skeletons and integrate Javascript and CSS. By the time a developer completes this course, he or she will have a great understanding of the basics of web development with Web Option.

Add User Macro Capability to Web Option Screens

Web Option allows you to set up screens so users can record their own macros. This is a great way to give users more control over what they do on their screens on the Web.

In order to add this capability to a specific screen follow these simple steps.

1.   Add a one character field on to a screen. This allows you to place the macro drop down any place on the screen you want.  The field will not contain any data. It is used only as a place holder. womacro01

2. Next you need to add and element customization to the screen.  Web Option allows you to customize any element on the screen in this case we only need to customize the new field you just added.  The customization will change how the field displays in the web.



3. Now you need to look for file YSCRIPT in your Web Option environment.  By default it has one member in it. You will need to add a new member to the file for each user that will have the ability to create macros.  The member you add for each user must be the same as their login id. So if your user’s log in id is BILLB the member needs to be called BILLB in YSCRIPT.  You will also need to set the authority in the member to *ALL.



4. Regenerate the Function and the HTML for the function.

5. Now it works best to end the Web Option server and the Web server and then start them back up again.  Any time a new member is added to Y2SCRIPT the Web Option server needs to be restarted.

6. Go to the screen that contains the macro drop down from your Web Option URL. You will see the field that has the macro capability added to it.


Web Option Updates for 2E 8.6


There are some nice enhancements to Web Option.

  • The YWRKW2EVAL command has been enhanced to make it easier to know what library the control values were used by the Web Option runtime.
  • HTML can now be generated from the DSPMDLUSG and DSPMDLREF screens. This ability can become helpful when developing a new application and searching for the screens that need HTML generation. This workflow also follows the 2E way of allowing developers to do the same task from multiple locations so developers can work in a way that is most effective for them.
  • Finally, the installation process of Web Option has been updated to make the process even easier.

This shows the continued commitment of CA in supporting the CA 2E community.

The Web Option Flow

Sometimes it helps to see a diagram of a process.  I have created a basic flow of how Web Option processes the 2E screen as an HTML page.  This will help in understanding how the different parts of Web Option fit together in the Web Option web application.

WebOption Macros and Scripting

Support for user defined macros was added in version 8.5 of WebOption.  The use of macros  scripting will allow the developer to record and plan keystrokes within the generated screen.  By using macros and scripting you can simulate flowing through a series of screens, actually skipping the screens visually and simply moving on the web from one screen to the next.  So in effect, you can reorganize some of the actual flow of your application and make it more web friendly.



© 2013 CM First Group - All rights reserved