About this tutorial

Objectives

In this tutorial, you will learn about screen signatures, how to identify and name screens, and define names for fields.

Prerequisites

Getting Started tutorial

Before attempting this tutorial please complete all steps in the Getting Started tutorial.

Outline

Screen identification – screens created without DDS

Screen identification – screens created using DDS

About screen signatures

Screen identification – screens created without DDS

Use your desktop shortcut to open the aXes Projects Home Page.

Image

When requested, enter the aXes developer user profile and password.

image002

The shipped defaults are,

User Name: dev

Password: dev

You should change these default values.

On the Projects Home Page, click on your project in the projects list.

On the resulting screen, click on the Work as TS2 Developer option.

A 5250 Terminal Session sign on prompt should appear next:

Image

Sign on with an IBM i user profile and password that displays the Main Menu.

When identifying 5250 screens for subsequent use in an aXes-Cloud environment ensure you are executing them in the same way that your end users will.

Refer to the "If You Use aXes-eXtensions with aXes-Cloud" section in the Best Practices tutorial for an explanation of the reasons this is important.

The next screen should look something like this:

Image

On the left side is a tab titled Screens - this is used to identify 5250 screens and the fields on them.

On the right side is a 5250 session you can use just like any normal 5250 session.

Hint: 5250 sessions used when logged on as an aXes developer are much slower than normal aXes user 5250 sessions.

Warning: You should only ever use aXes developer 5250 sessions for aXes development work. For other development work, like writing RPG programs, use normal user aXes 5250 sessions. You should never assess the performance of your application using an aXes developer session.

You are now going to identify the Main Menu screen and assign a name to the field on the screen where commands are typed in.

First, click the Suggest button on the Screens tab - aXes will examine the screen and suggest a name and a description.

Next, lock the screen for design by using the image005 lock switch in the top right corner of the screen. Always lock the screen for design before customising it.

Then Click on the screen title on the 5250 screen to select it (e.g. IBM i Main Menu, System i Main Menu or i5/OS Main Menu). This should highlight the field in the Screens tab on the left.

Check the box beside the field.

Your Screens tab should now look like this:

image006

tutorial 01 - 03 (20140523).png

Change the screen Name to MAIN.

Naming Conventions

Choose names for screens and screen elements like you would name a variable in a programming language.

Use only letters of the English alphabet, the numbers 0 to 9 and _ (underscore).

Do not use imbedded blanks in names.

Names are case sensitive.

Change the screen Description to IBM i Main Menu.

Click the Save button to save the definition of the screen you have called MAIN.

To check that aXes now identifies the MAIN screen correctly, display a different 5250 screen by entering the IBM i command WRKJOB.

You should see the Possible Matches list on the Screens tab change to say <new definition> indicating that the Work Job screen currently has no name.

Return to the main menu and you should see the Possible Matches list change to indicate that this screen name is MAIN.

With the MAIN screen displayed, select the field where commands are entered by clicking on it. This should automatically select the field on the Screens tab and scroll down to it.

Type in the name CommandLine for the field.

Your Screens tab should now look like this:

image008

image009

Click the Save button again to (re)save the definition of the screen called MAIN.

Hint: Before starting a real project you should create a naming standard for screens and fields.

You have now completed these tasks:

1. Identified the Main Menu screen and assigned it the name MAIN.

2. Named the command input field as CommandLine.

The Output Field Dilemma

When a field is not really a field - it's just a bit of output text

Usually, output fields are correctly recognized as starting at the beginning of the field. This means that when named, they continue to be recognized, no matter what value they contain.

But in one special case, when the record format does not define the fields, (as in for example the "fields" on the WRKSYSSTS screen), aXes works out the field start position based on the field contents. For right-adjusted numeric fields, this means that when the screen is redisplayed with a value with more digits, the start position of the "field" changes, and since aXes identifies fields by their start position, it does not recognize the text as belonging to the same field.

You should be aware of this special case when naming fields:

Image

Screen identification - Screens created using DDS

Next you are going to identify two application screens created by normal DDS.

To do this start the shipped aXes demo system from a command line by entering the commands:

ADDLIBLE AXESDEMO

CALL XHRRPGTRN

The resulting 5250 screen should look something like this:

Image

On the Screens tab, click the Suggest Button.

Change the suggested screen name to XHRRPGTRN_Select

Remember to choose names for screens and screen elements like you would name a variable in a programming language.

Use only letters of the English alphabet, numbers 0 to 9 and _ (underscore).

Do not use imbedded blanks in names.

Names are case sensitive.

Click the Save button.

You have now assigned the name XHRRPGTRN_Select to this particular 5250 screen.

Next, enter an X beside an employee and press the Enter key to display the employee information.

The resulting 5250 screen should look something like this:

Image

Check that your Screens tab says this is a new (unnamed) 5250 screen.

On the Screens tab, click the Suggest button.

Change the suggested screen name to XHRRPGTRN_Maint

Click the Save button.

You have now assigned the name XHRRPGTRN_Maint to this particular 5250 screen.

Now, double check that aXes correctly identifies the named screens.

To do this, return to the IBM i main menu, then call program XHRRPGTRN again. Make sure the selection screen and the details screen are correctly identified on the aXes Screens tab as you navigate between the screens.

You have completed this tutorial and are ready to start the next tutorial.

Screen signatures and the concept of a 5250 Screen

Did you notice how you did not have to select screen elements to identify the preceding two screens? Since they were created from DDS they each have a unique "signature". Their unique signatures were enough to identify each screen as being different.

That is an easy rule to remember – a different screen signature means use a different screen name. Unfortunately, it's not quite that simple - sometimes screens with different signatures are given the same screen name.

This is usually done when different screen signatures represent subtle variations of what is considered to be the same 5250 screen. In these cases, the variant name may also be used to identify different variations of the same screen name.

The key question: What is a "5250 screen" exactly?

There is no answer to that question.

Imagine an RPG program, using display file DSP, to display records named HEAD, BODY and FOOT (say) onto a 5250 screen. The visual result of this is said to comprise a 5250 screen named "Screen1" (say).

However, what if under some circumstances, it displays records HEAD, BODY, BODY_EXT and FOOT.

Is the resulting 5250 screen a new screen, or just a variation of "Screen1"?

There is no correct answer to the preceding question, because the thing that is called "Screen1" is really just a concept.

Both possible answers are equally correct - so aXes eXtensions allow you to answer the question either way.

If you decide these are two variations of the same screen you simply say this …

Signature

Name

DSP+HEAD+BODY+FOOT

"Screen1"

DSP+HEAD+BODY+BODY_EXT+FOOT

"Screen1" with variant name "BODY_EXT"

Or, if you decide they are different screens, you say this ...

Signature

Name

DSP+HEAD+BODY+FOOT

"Screen1"

DSP+HEAD+BODY+BODY_EXT+FOOT

"Screen2"

So what exactly is a "5250 screen"?

It's whatever you want it to be.