A Command Handler Tab with Many 5250 Destinations

RAMP-NL

A Command Handler Tab with Many 5250 Destinations


You can associate many 5250 destination screens with a single command handler tab. There are many uses for this capability and it may be used to overcome some common application design issues.

For example, imagine that you have five different 5250 destination forms that each request report production criteria and then submit the report to batch. Let's call these five different 5250 screens uReport1, uReport2 …. uReport5.

In prototyping this application you might approach handling these five different reports in a number of ways:     

Too Many Business Objects

Each report is defined as a unique business object named "Report 1" through "Report 5". In this case the application navigation tree might be structured like this …

When the user clicks on one of the reports the entire right hand side of the form would display the reports associated 5250 form.

Too Many Command Tabs

You define a single business object called "Reports" which has five associated commands or actions called Report 1  …. Report 5. In this case the application navigation and command handler tabs might be structured like this …

When the user clicks on a report tab the associated 5250 form would appear on the tab. One of the tabs would probably be a default.

There are a number of issues with these approaches:

·         The first approach consumes too many business objects

·         The second approach consumes too many commands (or actions)

What do you do if there are 50 or 500 different types of reports?

Solution: Dynamic Command Tab

The answer may be to use a single business object named, for example Reports with a single dynamic command handler tab named Submit Report Request.  

For example, here is the Reports business object set up to show two tabs. The first is "Submit Report Request" and the second is "View Spool Files" which might be used to display the output of report batch jobs in a variety of different ways. 

In this example we are only interested in the "Submit Report Request" command handler tab because we need, at execution time, to dynamically vary which 5250 destination screen actually appears on it.

So how can you vary which 5250 screen appears on this single tab? There are two main ways this is done:

·         A User Controlled Command Tab with Many Destinations

·         A Program Controlled Command Tab with Many Destinations

 

Limitations 

·         Using the Framework SWITCH facility to switch to a command handler with many 5250 destinations is not supported.

·         Any command handler using this option must be in the main Framework window, not in a separate pop-up window.