Professional Documents
Culture Documents
IBML
SG24-4887-00
Take Note!
Before using this information and the product it supports, be sure to read the general information in
Appendix A, Special Notices on page 59.
Contents
Figures
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Preface
. . . . . . . . . . . . . .
How This Redbook Is Organized
The Author of This Redbook . .
. . . . . .
Comments Welcome
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
vii
vii
viii
viii
Chapter 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.1 Description of a Typical GUI MF COBOL Application . . . . . . . . . . . . .
. . . . . . . . . . . .
1.2 Description of a Typical IBM COBOL PM Application
1.3 The Migration Approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.3.1 Changing from DS to VDE . . . . . . . . . . . . . . . . . . . . . . . . . .
1.3.2 Translating from the Dialog System Code to the IBM COBOL Structure
. . . . . . . . . . . . . . . . .
1.3.3 Moving from MF COBOL to IBM COBOL
1.3.4 Data Migration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Chapter 2. Sample Application Description
. . . . . . . . . . . . .
2.1 Before You Start
2.2 Our Approach . . . . . . . . . . . . . . .
2.3 The Application . . . . . . . . . . . . . .
Chapter 3. Migration Utility Overview
. . . . . . . . . . . .
3.1 Background
3.2 Utility Description . . . . . . . . .
3.3 How to Use the Migration Utility
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
. . . . . . . .
. . . . . . . . .
1
1
3
5
6
6
7
8
11
11
11
11
17
17
17
21
25
25
25
26
27
29
30
31
31
31
32
32
32
32
32
33
35
35
39
42
iii
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
45
45
48
51
51
52
52
53
54
55
55
. . . . . . . . . . . . . . . . . . . . . .
57
57
57
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
59
. . . . . . . . . .
. . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
61
61
61
61
. . . . . . . . . . . . . . . . . . . .
63
63
64
65
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
67
List of Abbreviations
iv
. . . . . . .
. . . . . . . . . . . . . . . . . . . . .
Index
. . . . . . .
. . . . . . . . . . . . . . . . . . . . . .
Glossary
. . . . . . .
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
87
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
89
Figures
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
MF DS COBOL Representation . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
IBM VDE Representation
. . . . . . . . . . . . . . . . . . . .
MF COBOL versus IBM COBOL
Migration Cycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
MF COBOL versus IBM COBOL
. . . . . . . . .
Conversion Requirements for Data File Migration
. . . . . . . . . . . . . . . . . . . . . . . .
Proposed Migration Tool
Main Window of the Celdial Order Entry Application . . . . . . . .
Customer List Window . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
Customer Information Window
. . . . . . . . . . . . . . . . . . . . . .
Select Part Number Window
. . . . . . . . . . . . . . . . . . . . . . . . . .
Select Model Window
Ship ID Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . .
The Celdial Order Entry
Micro Focus DS to IBM VDE Migration Utility Window . . . . . . .
Sample Micro Focus Dialog System Window . . . . . . . . . . . . .
Micro Focus DS to IBM VDE Migration Utility Window . . . . . . .
. . . . . . . . . . . .
MF2VDE - Message Window Migration Utility
Parts Catalog Window of the Migration Utility . . . . . . . . . . . .
. . . . . . . . .
Window Properties Window for MF Dialog System
. . . . . . . . . . . . .
Window Part Settings Window for IBM VDE
Pull Down Choice Details Window for the MF Dialog System . . .
Menu Item Part Settings Window for IBM VDE . . . . . . . . . . . .
. . . . . . .
Entry Field Properties Window for MF Dialog System
Entry Field Part Settings Window for IBM VDE . . . . . . . . . . . .
. . . . . .
Push Button Properties Window for MF Dialog System
Push Button Part Settings Window for IBM VDE . . . . . . . . . . .
List Box Properties Window for MF Dialog System . . . . . . . . .
. . . . . . . . . . . . .
List Box Part Settings Window for IBM VDE
Message Box Properties Window for MF Dialog System . . . . . .
COBOL GUI Designer - Define Message Window for IBM VDE . .
Migration Utility Window . . . . . . . . . . . . . . . . . . . . . . . . .
Migrated Ship - ID Window Showing Wrong-Sized Push Buttons.
VDE Define Message Window Showing Migration Fixes. . . . . . .
IBM COBOL Compiler Options Window . . . . . . . . . . . . . . . .
IBM COBOL Compiler Options Window . . . . . . . . . . . . . . . .
IBM COBOL Compiler Options Window . . . . . . . . . . . . . . . .
IBM COBOL Compiler Options Window . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . .
IBM VDE Code Assistant Window
COBOL GUI Designer - Celdial Window . . . . . . . . . . . . . . . .
MF2VDE - Settings Window Showing the Migration Utility Settings
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . .
3
4
5
6
7
8
9
12
13
14
14
15
15
16
18
18
21
22
23
26
26
27
27
29
29
30
30
31
31
33
34
35
36
38
39
40
41
42
47
49
58
vi
Preface
This redbook describes the process to migrate a Micro Focus Dialog System
application on OS/2 to IBM VisualAge for COBOL for OS/2 Version 1.2. The
relationship to VisualAge for COBOL for OS/2 Version 2 is that there is a
migration capability provided in Version 2 to migrate Version 1.2 Visual
Development Environment GUI parts to the Version 2 Visual Builder. The steps
for migration and use of a Dialog System migration tool in relationship to
Version 1.2 are covered.
This redbook was written for application developers interested in the
requirements for migrating Micro Focus Dialog System applications to IBM
VisualAge for COBOL for OS/2.
A practical example is used as illustration of the migration process and the
Dialog System migration tool is provided.
Knowledge of Micro Focus Dialog System, IBM VisualAge for COBOL for OS/2,
the COBOL language, and visual building techniques is required.
Chapter 1, Introduction
Introduces the steps required to migrate a Micro Focus Dialog System
application to VisualAge for COBOL.
vii
Comments Welcome
Your comments are important to us!
We want our redbooks to be as helpful as possible. Please send us your
comments about this or other redbooks in one of the following ways:
Use the electronic evaluation form found on the Redbooks Home Pages at
the following URLs:
For Internet users
For IBM Intranet users
redbook@vnet.ibm.com
viii
http://www.redbooks.ibm.com
http://w3.itso.ibm.com/redbooks
Chapter 1. Introduction
Often when we discuss migrations, we mean moving from one version of a
product to a later version. Typical examples are migrations from OS/VS COBOL
to VS COBOL II or from VS COBOL II to COBOL/370.
In this type of migration we most often stay with the same product, merely
changing syntactical structures or introducing new functions.
Another type of migration, less frequent perhaps because it is more complex,
requires a change of product (moving from one tool to another). In this type of
migration many factors must be addressed, such as:
These four points make the migration from the Micro Focus (MF) Dialog System
(DS) application development environment to the IBM VisualAge for COBOL for
OS/2 more complex than the standard language-to-language migration.
Before starting on the technical details that characterize this type of migration,
we briefly describe how both tools are characterized and how best to approach
the migration.
Hereafter, IBM VisualAge for COBOL for OS/2 can be referred to as VisualAge
COBOL, VA COBOL, Visual Development Environment (VDE), or Graphical User
Interface (GUI) Designer.
A Graphical System (the .GS file you create using the MF Dialog System tool)
A .CPB file that contains all the declarations you need for the variables you
defined in the Dialog System. It is a sort of bridge between the DS and
COBOL.
....
working-storage section.
copy ds-cntrl.mf .
copy celdial.cpb .
copy sqlenv .
copy . . . . . . .
01 xxxx ......
procedure division.
main-process section.
perform program-initialize.
perform program-body until exit-pgm-true.
perform program-terminate.
program-initialize section.
.......
program-body section.
evaluate true
when custlist-botton-true
perform show-customer-list
when ................-true
perform ........
end-evaluate
perform call-dialog-system.
program-terminate section.
........
stop run.
load-screenset section.
move ds-new-set to ds-control
move c:\dsg\celdial\celdial.gs
perform call-dialog-system.
to ds-set-name
call-dialog-system section.
call dialog-system using ds-control-block,
data-block.
if not ds-no-error
move ds-error-code to display-error-no
display DS ERROR NO: display-error-no
perform program-terminate
end-if.
.........
In the MF environment, the business logic is inside the program, while the logic
needed to manage the GUI is in the .DS file. To implement the logic inside the
.DS file, MF unfortunately uses another language (not COBOL) which needs a
translation and conversion to IBMs Visual Development Environment (VDE)
which is used in IBM VisualAge for COBOL for OS/2. This is one of the
differences we will meet during our migration and it will also be one of our major
problems.
A graphical representation of how components talk to one another in the MF
environment is shown in Figure 1.
When you execute an event, you execute a piece of code written in the DS
language which, at a certain moment, passes the control to a COBOL program.
The COBOL program passes the control back to the Dialog System, which in turn
executes a portion of its code and then passes the control back to the
Presentation Manager (PM), which is waiting for another event.
Values and variables used in the COBOL program can be used to update entry
fields, list boxes, or other dialog objects. In order to automatically update
COBOL variables after refreshing the window which they belong to, MF links a
dialog system object with one or more COBOL variables.
Chapter 1. Introduction
Because the MF Dialog System uses two different languages, in the starting
environment you must define variables related to some object (entry fields, list
boxes, multiline edit, and the like) in order to pass and get back values to the
COBOL program which is processing the logic. Therefore, between the COBOL
logic and the Dialog System logic, there exists a bridge based on these variables
which works like an interface service (Figure 3).
How behavior differs between the Micro Focus Dialog System and I B M
Chapter 1. Introduction
1.3.2 Translating from the Dialog System Code to the IBM COBOL Structure
This step must be performed manually. The differences between the two tools
greatly affect this particular part of the migration. We had to use two machines
simultaneously and more than one open editor for each machine in order to
determine the flow of the MF environment and translate in into the IBM COBOL
code.
Chapter 1. Introduction
We have designed for a tool to automate the migration and that tool will be
covered in another book which focuses on data migration only. Figure 7 shows
how that tool behaves.
Flow for the routine that would have migrated VSAM and sequential files
Chapter 1. Introduction
10
DB2/2
MF 3.2 supports DB2/2 V.1.x, but does not support DB2/2 V.2.x, which is a
prerequisite for IBM VisualAge for COBOL for OS/2. Therefore, you have to
have both versions of DB2/2 and be able to switch from one to the other
easily.
SET LANG=EN_US
This is done to inform MF that the LANG variable is used by another
application and its value has been moved to that variable.
Installation sequence
Depending on which tool you installed first, VisualAge COBOL or DB2/2, you
should pay attention to the value of the threads variable in your CONFIG.SYS
file. The value should always be greater than 1024.
11
The main window is complex and populated; however, within it you will find
several types of objects, such as:
Entry fields
Static texts
Push buttons
Group boxes
List boxes
Radio buttons
Bitmaps
For many objects properties have been changed. This is a good testing
environment for a migration because different kinds of objects and properties
have been set and they must be retained in the migrated application. In the main
window there are some hidden entry fields, such as the entry field at the right of
Customer or the entry field below Desc and Total . During the UI migration, we
should be careful that these properties are kept.
12
We start with a quick description of what the application does and then we look
at its windows. The application has been created to help the Celdial clerk handle
the product orders. The Celdial database contains business tables, such as:
Table of customers
Table of products
The entire application is based on this database. The order entry part is
composed of six windows:
Main
Customer list
Customer information
Parts list
Models list
Ship ID list
From the main window, press the Customer List push button to reach the
Customer List window (Figure 9).
After choosing a customer from the list, ask for associated information by
clicking on Customer Details. The Customer Information Window appears
(Figure 10).
13
Once a customer is selected, you can prepare an order for that customer by
choosing an available part from the Select Part window To do so, position the
cursor on the part entry field in the main window and press the PF9 key. The
Select Part Number window appears (Figure 11).
After selecting an item, return to the main window (Figure 8). Position the cursor
in the model entry field and press the PF9 key to select a model for the part
(Figure 12).
14
The lower left corner of the main window in Figure 8 now has a bitmap of the
product whose number and model you have selected.
Finally, select the Ship ID for your order (Figure 13).
You are ready to add the order to the main list box. Click on OK and place the
order by clicking on Place Order.
In summary, there is one main window which has five children at level one, That
is, each child has the main window as its parent (Figure 14).
15
16
3.1 Background
The Migration Utility program is designed to help you migrate the GUI section of
the MF Dialog System. The objective is to avoid the long and tedious task of
recreating, one by one, all of the dialog components that have already been
created for the Dialog System.
The utility translates all of the GUI components individually, and where possible,
tries to maintain their properties. Certain properties are impossible to convert
initially because they are not directly supported, but often these properties can
be translated by adding a few statements to the program.
At this point you have all of the needed input. You need only to invoke the utility
by double-clicking on the MF2VDE icon. The Micro Focus DS to IBM VDE
Migration Utility window appears (Figure 15).
17
The migration process has two steps. The first step parses the Micro Focus .TXT
file (Figure 15) and produces an intermediate file with .ODG. The second step
reads the .ODG file and produces an .ODF file, and also adds to the VDE catalog
the entire application dialog being migrated, as a single part, with the name you
specified in the Part name for the VDE entry field.
In the VDE, parts (objects in the Dialog System vocabulary) are stored in files
with extension .ODF. Even if each project in the VDE has its own .ODF file,
application layout information need not be written. The .ODF file will contain this
information after you create the application, drag the iconized part into the
application workframe, and save the application.
18
Here is the .TXT file obtained from MF, related to the window in Figure 16:
Screenset Details
First-Window WIN1
Decimal-Char .
Comma-Char ,
Currency-Sign $
Error-File dserror.err
Icon-File . \\ds.icn
Style FLAG-88 ANSI EMU-PORTABLE
End Details
Font-Record Stylename {FONT-001}
Typeface Helv Italic
Pointsize 8
Attributes BITMAPPED MONOSPACED BOLD ITALIC UNDERLINE
End-Record
Font-Record Stylename {FONT-002}
Typeface Times New Roman Bold Italic
Pointsize 10
Attributes VECTOR PROPORTIONAL
End-Record
Font-Record Stylename {FONT-003}
Typeface Tms Rmn Italic
Pointsize 10
Attributes VECTOR PROPORTIONAL
End-Record
Object WIN1
Type WINDOW
Parent DESKTOP
Start (440,6)
Size (1272,733)
Display Window Title
Style SIZE-BORDER TITLEBAR SYSTEM-MENU MINIMIZE MAXIMIZE CLIPPED
End Object #WIN1
Menu
Parent WIN1
Item {NoName}
Level 0
Display File
End Item
Item {NoName}
Level 1
Display Exit
Key F3
End Item
End Menu
Object LB1
Type LIST-BOX
Parent WIN1
Start (672,96)
Size (480,512)
Style DISABLE-HORIZONTAL
End Object #LB1
19
Object PB1
Type PUSH-BUTTON
Parent WIN1
Stylename {FONT-002}
Start (64,224)
Size (544,288)
Display Big Push Button
Style DEFAULT
End Object #PB1
Object EF1
Type ENTRY-FIELD
Parent WIN1
Start (96,512)
Size (472,64)
Style AUTOSCROLL BORDER CENTERED UPPER AUTOSKIP
Picture x(10)
Display In basso a destra
End Object #EF1
Global Dialog
Event ESC
RETC ;
End Event # ESC
Event CLOSED-WINDOW
RETC ;
End Event # CLOSED-WINDOW
End Dialog
A portion of the information contained in the above file will be ignored by the
Migration Utility, because the program is not currently in a position to translate
an equivalent in the VDE. Therefore, you must do some of the work for those
statements manually. This is true for statements relating to the event logic: in
the above example, the statements between Global Dialog and End Dialog are
ignored. A log file is produced containing information regarding what the process
has been unable to migrate.
The following is an example of how that file should look:
20
X
X
W
P
P
P
X
X
E
FVDESCanvas D D D D D D V 1 V 1 D V 1 D D D D D D D D D D
FVDESListBox V 120 V 170 V 168 V 42 D D D D V LB1 D D D D D D D D D D D D D D D
FVDESPushButton V 136 V 96 V 16 V 121 V 00000400 D D D V PB1 D D D D D D D V Big@Push@Button V Times@New@Roman@Bold@Italic V 0 V 10 D
FVDESEntryField V 118 V 21 V 24 V 73 V 0000001D D D D V EF1 D D D D D D D V In@basso@a@destra D D D D D D D D D D D D D D D D D D D D
This is the only format which can be used to import a new part into the VDE as a
user-defined part. A minimum of two steps are needed for such an import.
Any new part that is imported with this approach must be a collection of existing
parts; that is, you can create a new part as an entry field and a static text and
set certain properties to make them more user friendly. You cannot, however,
add a new part (for example, Draw a Pie) that is not a composition of existing
parts.
During the process, if the input file has rows longer then 79 characters, the
procedure will display a message similar to:
21
and you must click on OK. This means that the procedure is taking additional
time to rewrite the input file in order to make it more readable.
After each step completes, you receive the message shown in Figure 18.
When the first step is completed, you will find two files in the task list, a .LOG
and an .ODG file.
The .ODG file is an informational file; you may want to check whether all the
objects are included.
The .LOG file is important because it contains a list of the processed objects and
the properties for each object which cannot be transferred automatically. You
should look at this file carefully, object by object, and note the properties that
have been left out. This process must be done after the part is imported into the
new object.
To begin Step 2, do the following (Figure 17):
Ensure that the IBM VDE is not open. You cannot add a new part to the
catalog if the VDE is active.
Deselect the first check box and select the second one.
22
Before executing the build command, you should test to ensure that what you
have created is correct. Do this by using the steps that clean up the VDE
environment:
From the project you have just opened, delete the window automatically
added by VDE. Its name is usually FRA0000B and it is entitled Window with
canvas
Take a look at the .LOG file and look for the string:
>>>>>>>>>
If you find it, the string should continue with the part name. In this case
the string is:
>>>>>>>>>
Go into the VDE and find the push button in the first FrameWindow.
Change its part name to a length less than 23 characters.
Repeat the above cycle to find any other too-long part names.
When finished, open the source code, save it, close its window, and save the
project.
If the build completes successfully, you can begin changing and adding the
properties that the utility has not migrated.
23
24
4.2 Windows
Fortunately, there are no complex differences between MF Dialog System
windows and VDE windows.
Most of the properties in the MF window (Figure 20) can be found in the VDE
object window (Figure 21). In the VDE object window you can also specify which
behavior your window needs when you hide or minimize it.
The only window property not supported by VDE is clipped , which is a parameter
that allows you to choose whether or not the secondary window is clipped within
the primary window. A window is clipped if the window information is truncated
at the border of the parent window.
The following is a list of the properties you must add to the VDE project
manually:
System-Position
This property has a corresponding property in VDE, DEFINED by SYSTEM ,
which can be obtained from the window notebook settings in the startup
page.
Relative-Position
This property has a corresponding property in VDE, DEFINED By
APPLICATION , which can be obtained from the window notebook settings in
the startup page.
The menu bar object for the VDE window is not in the settings notebook of the
window properties, but in the Parts Palette window. The menu bar object is not a
window property but a different object.
25
Hide-Accelerator
This property allows hiding the accelerator description from the text of the
menu item. For example, if you associate F3 with the exit menu item, turning
this flag ON shows the string Exit F3; otherwise, you receive the string Exit
This can be fixed in the VDE environment by changing the menu item label
manually.
Context-Only
This property causes the menu item to work in context usage only.
In the MF DS, the shortcut key for the menu item object is a part of the
properties of the object (Figure 22). This is also true in the VDE (Figure 23), but
here it is not possible to specify it manually.
26
Figure 22. Pull Down Choice Details Window for the MF Dialog System
Null Disallowed
Nulls are spaces in alphabetic or alphanumeric fields and zeros in numeric
fields. If the content of the field contains a null value, this property forces you
to change the value. To make this available in an VisualAge COBOL
environment, you must add code to the CHANGE or LOSTFOCUS events
related to that particular entry field.
27
Date validation
This checks whether the date field contains a valid date. You must add code
to the LOSTFOCUS event in order to check whether the date is valid.
Range-tables
This property permits the definition of validation tables. The MF Dialog
System allows you to define more than one range or value. The VDE allows
you to define one validation range and an alternative to the validation value.
If you want to accept values such as zero or those between 100 and 200, you
cannot use the validation property only, you must add code to the
LOSTFOCUS event. For the MF Dialog System you can define more than one
range-table or value in the OR field.
BLANK-WHEN-ZEROS
This validation is for numeric items only. It inserts spaces rather than zeros
in the entry field. For an equivalent property in the VDE, code must be
written.
REQUIRED
This forces you to partially fill the entry field; it will not allow the entry field
to be empty.
FULL
This forces you to fill the entry field completely.
UPPER
This automatically translates the content of the entry field into upper case.
LOWER
This automatically translates the content of the entry field into lower case.
AUTOSWIPE
This selects all of the data associated with a field you tab to that field. Any
data you type in replaces the selected data.
FIT-PICTURE
This property allows the Dialog System to automatically define an entry field
length based on the length of the string defined in the MasterField
parameter. Because VisualAge COBOL does not use any predefined variable
related to the entry field, this property cannot be migrated.
The following are MF properties and their corresponding names in the VDE:
28
No echo
--> Masked
AutoSkip
--> AutoTab
Border
--> Margins
In the IBM VDE, you can associate a shortcut key with a push button.
In the MF Dialog System, one push button object has the ability to be a
graphic or text push button, while the VDE has two different objects, a push
button and a graphic push button.
29
30
31
4.12 Bitmaps
The MF DS bitmap object contains a subset of the IBM VDE bitmap object
properties.
The bitmap object in the MF DS export file contains no information about the size
of the bitmap it displays because, unlike IBM VDE, the MF DS does not allow
scaling of pictures. As a result, after migration the utility places the bitmap in the
correct starting position, as defined in MF DS. However, its size could cover
another object in the window. To remedy this, use manual scaling.
4.13 Notebooks
The migration utility does not yet support notebooks.
You must migrate notebooks manually.
32
In the log file produced by the migration utility, find the message box you
wish to migrate, if any. You should find information similar to:
------------------------- OBJECT :
+++++++++++++++ the above object:
property MOVABLE
property BUTTONS(OK)
property DEFAULT-BUTTON(1)
property NOTIFICATION
MBOX1
(MessageBox)
MBOX1 must be migrated manually
cannot be implemented automatically.
cannot be implemented automatically.
cannot be implemented automatically.
cannot be implemented automatically.
Next, use other information from the exported MF DS .TXT file. If you look for
the string MBOX1, you should receive this type of data:
Object MBOX1
Type MESSAGE-BOX
Parent OEMAIN
Style MOVABLE BUTTONS(OK) DEFAULT-BUTTON(1) NOTIFICATION
Display Invalid price
Message This part and model cannot to be discounted
End Object #NO-DISCOUNT
Project
Messages
Create
You should then see the COBOL GUI Designer - Define Message window
(Figure 31).
33
Figure 31. COBOL GUI Designer - Define Message Window for I B M VDE
At this point it is very easy to port the properties into this window.
34
File Celdial.ODG
File Celdial.ODF
File Celdial.LOG
Go to the parts catalog notebook and from the user-defined page, select the
Celdial part.
35
Drag and drop the Celedial part to the project workframe and wait a few
seconds until the windows of the Celdial application finish building. A sample
of one is shown in Figure 33.
Because the push button you migrated had the fit-text property, the
dimension of the push button is based on the size of its label. Since this
property cannot be specified within the VDE, you need to resize each push
button manually.
In the settings of all the windows, except for the OEMAIN, flag the attribute
OPEN IMMEDIATELY to off.
Look in the CELDIAL.LOG file for part names longer than 23 characters. In
this case, we found the following:
At this point, start reading the CELDIAL.LOG file row by row, looking for
properties you want to keep but that the Migration Utility did not keep.
The first message is about the CLIPPED property of the OEMAIN window:
If you do not want to write code just to keep this property, ignore the message.
The next message in our example is:
(MessageBox)
migrated manually
automatically.
automatically.
automatically.
automatically.
First, you must understand the content of the message. Looking in the
CELDIAL.TXT file for the NO-DISCOUNT string, you find:
Object NO-DISCOUNT
Type MESSAGE-BOX
Parent OEMAIN
Style MOVABLE BUTTONS(OK) DEFAULT-BUTTON(1) NOTIFICATION
Display Invalid price
Message This part and model cannot be discounted
End Object #NO-DISCOUNT
You then go to the messages window (Figure 34) and translate those properties
as shown.
37
You then reach the end of the CELDIAL.LOG file without finding any other
property that needs to be described. Save the project and try a new build
operation.
38
On the syntactical page (Figure 35) flag the second check box ON, enabling
process BASIS and REPLACE statements.
In the Debug page (Figure 36), set the check box before the last to ON. This
enables the routine Generate debugging information.
39
d:\sqllib\lib\db2api.lib
In the library name entry field.
40
In the Other page (Figure 38), add a period to the first entry field and flag the
first check box ON, as shown.
41
You are now ready to add the COBOL logic and then compile the whole
application.
42
We copied the whole program at the end of the project source file into the
VDE CELDIAL.CBL file.
&
&
&
&
&
&
&
&
&
&
procedure division.
main-process section.
perform program-initialize.
perform program-body until exit-pgm-true.
perform program-terminate.
*---------------------------------------------------------------*
*
*
*---------------------------------------------------------------*
program-initialize section.
* Set handler for signal
CALL __SQLGISIG USING SQLCA.
* Connect to db
EXEC SQL
CONNECT TO celdial in SHARE MODE
END-EXEC.
if sqlcode not = 0
display connect error: sqlcode= , sqlcode
go to program-terminate.
*
EXEC SQL WHENEVER SQLERROR GO TO EXT END-EXEC.
*
EXEC SQL WHENEVER NOT FOUND GO TO CLS END-EXEC.
initialize data-block
initialize pgm-flags
move 0 to inx1
move 0 to inx2
move 0 to inx3
perform Start-application.
initialize ds-control-block
move data-block-version-no to ds-data-block-version-no
move version-no to ds-version-no
perform set-date.
perform load-screenset.
*---------------------------------------------------------------* Process the returned user action (in the flags); clear those
* flags and call Dialog System again.
*----------------------------------------------------------------
perform call-dialog-system
and
load-screenset section.
* Specify the screenset to be used and call Dialog System.
move ds-new-set to ds-control
move c:\dsg\celdial\celdial.gs
perform call-dialog-system.
to ds-set-name
43
*---------------------------------------------------------------*
call-dialog-system section.
call dialog-system using ds-control-block,
data-block.
if not ds-no-error
move ds-error-code to display-error-no
display DS ERROR NO: display-error-no
perform program-terminate
end-if.
2807 IGYPA3200-S
STOP LITERAL clause was
specified under the THREAD compiler option.
The statement was discarded.
4161
IGYPS0019-W
4216 IGYPS2123-S
COMMAND-LINE was not defined as a mnemonic-name.
The statement was discarded.
Same message on line:
4223
4217 IGYPS2121-S
RESULT was not defined as a data-name.
The statement was discarded.
Same message on line:
4224
4217 IGYPS2121-S FUNC was not defined as a data-name.
The statement was discarded.
Same message on line:
4224
4217 IGYPS2121-S COMMAND-LIN was not defined as a data-name.
The statement was discarded.
Same message on line:
4224
4244 IGYPS2015-I The paragraph or section prior to
paragraph or section CLS did not contain any statements.
Messages
Total
Informational
Warning
Error
Severe
Printed:
14
2
1
2
9
Terminating
44
We then tried build again, and got a zero return code from the build,
meaning that we were ready to add events to our project.
Global Dialog
Event ESC
RETC ;
End Event # ESC
Event CLOSED-WINDOW
MOVE 1 EXIT-PGM(1) ;
RETC ;
End Event # CLOSED-WINDOW
Event SCREENSET-INITIALIZED
SET-DATA-GROUP-SIZE SAVORDER 0 ;
MOVE by Dept W51 of STL AUTHOR-LINE ;
SET-COLOR BYLINE LIGHT RED WHITE ;
REFRESH-OBJECT OEMAIN ;
End Event # SCREENSET-INITIALIZED
End Dialog
You need not do anything about either the ESC event or the CLOSED-WINDOW
event. Both are automatically included in the .CBL file created by VDE. For
example, if you look at the content of the OEMAIN_OEMAIN_DESTROY event,
you find:
ENTRY OEMAIN_OEMAIN_DESTROY
USING VDE-CELDIAL.
MOVE VDE-TERMINATE-APPLICATION TO ACTION-RC.
GOBACK.
where the MOVE VDE-TERMINATE-APPLICATION TO ACTION-RC. statement has the
same meaning as MOVE 1 EXIT-PGM(1).
The only thing you then have to migrate is the SCREENSET-INITIALIZED event,
which corresponds to the CREATE event of the main window in VDE. In our
case, that means the OEMAIN_OEMAIN_CREATE event.
The SET-DATA-GROUP-SIZE command is used to set the internal size of a data
group in the Dialog System. Since data groups have a related structure in the
.CPB file that will be included in the COBOL program, it is easy to understand
the translated command:
MOVE 0 TO SAVORDER-SIZE
45
The statement MOVE by Dept W51 of STL AUTHOR-LINE needs no comment for the
translation into COBOL, but you must add some statements to have the same
result. Each entry field in the MF Dialog System has a related masterfield, which
represents the link between the dialog and the logic, thus between the Dialog
System and COBOL, so that modifying the value in the masterfield produces the
change in the related entry field, after a refresh object command. In the VDE, to
change the content of an entry field, you need to add the following code, but do
not need to refresh the object of the whole window:
46
After carrying out this operation in our case, we added the following code to the
event:
47
Dialog
Event CR
IF= CUSTNUM BLANK-CUSTNO ;
MOVE 1 CUSTID-USERFILLED(1) ;
RETC ;
BRANCH-TO-PROCEDURE BLANK-CUSTNO ;
End Event # CR
Procedure BLANK-CUSTNO
MOVE 1 CUSTLIST-BOTTON(1) ;
RETC ;
SET-DATA-GROUP-SIZE CUSTLIST CUST-SIZE ;
SHOW-WINDOW SELCUST ;
SET-FOCUS SELCUST ;
End Procedure # VALID-CUSTNO
Event GAINED-FOCUS
MOVE CR for customers MSG-AREA ;
REFRESH-OBJECT OEMAIN ;
End Event # GAINED-FOCUS
Event LOST-FOCUS
MOVE MSG-AREA ;
REFRESH-OBJECT OEMAIN ;
End Event # LOST-FOCUS
End Dialog
The CR stands for the Carriage Return event (Figure 40), which has its VDE
equivalent in the VDE VKEY-PRESS event when you press the Return (Newline)
key. Open the VKEY-PRESS event and add a test to ensure that the Return key
was pressed. The test is based on the variable VDE-VKey-Pressed-Data, defined
as:
01 VDE-VKey-Pressed-Data.
05 VCharacter-Key
88 VKey-Escape
88 VKey-Tab
.......
88 VKey-Newline
.......
88 VKey-F24
ENTRY OEMAIN_OEMAIN-CUSTNO_VKEYPRESS
USING VDE-CELDIAL,
VDE-VKey-Pressed-Data.
IF VKey-Newline THEN
****** LOGIC *********
END-IF
GOBACK.
48
In Figure 40, use the tree-view approach to select the event. This is a valid way
to select events when the window is too populated, since it takes less time to get
the event skeleton code.
Then pass the control to the COBOL program, since we want to execute the
routine associated with the flag CUSTID-USERFILLED Add the following
statements:
move 1 to custid-userfilled
perform OLDMAIN
where OLDMAIN is the old COBOL program in our example. We import
OLDMAIN because we want to be able to invoke all the sections it contains.
If the COBOL code has a variable linked to an object, MF Dialog System
automatically refreshes the related object when the parent window is refreshed.
In this case, the ds-customer , ds-custno , and the custnum values have been set.
Thus, to set the customer number entry field, add this logic:
49
The customer : variable updates the customer information automatically, just after
creating and refreshing it.
Then, at the end, the event logic has this shape:
BLANK-CUSTNO section.
MOVE 1 TO CUSTLIST-BOTTON
PERFORM OLDMAIN
CALL openWindow USING SELCUST-HANDLE,
VDE-RC
MOVE 0 TO ItemIndex
MOVE 0 TO counter
perform CUST-SIZE times
ADD 1 TO ItemIndex
ADD 1 TO counter
MOVE length of company(counter) TO Item-Length
MOVE company(counter) TO Item-String
CALL insertItem USING CUSTLIST-LIST-HANDLE,
ItemIndex,
Item,
VDE-RC
end-perform
CALL enableFocus USING SELCUST-HANDLE,
VDE-RC
In our example, we changed the logical order of certain statements. For
example, we must open the window first and then populate it. If not, we would
get an empty list box because we cannot populate the list box before it exists. If
we test the VDE-RC in that case, we get a return code of 9, meaning that the
object referred to in the insertItem statement is not valid (it does not yet exist).
The statement
......
end-perform
ENTRY OEMAIN_OEMAIN-CUSTNO_GOTFOCUS
USING VDE-CELDIAL.
MOVE CR for customers TO MSG-AREA
MOVE length of MSG-AREA TO Contents-Length
MOVE MSG-AREA TO Contents-String
CALL setContents USING MSG-TO-USER-HANDLE,
Contents,
VDE-RC
50
GOBACK.
ENTRY OEMAIN_OEMAIN-CUSTNO_LOSTFOCUS
USING VDE-CELDIAL.
MOVE TO MSG-AREA
MOVE length of MSG-AREA TO Contents-Length
MOVE MSG-AREA TO Contents-String
CALL setContents USING MSG-TO-USER-HANDLE,
Contents,
VDE-RC
GOBACK.
Press F9
GotFocus
LostFocus
ENTRY OEMAIN_OEMAIN-PARTNO_VKEYPRESS
USING VDE-CELDIAL,
VDE-VKey-Pressed-Data.
IF VKey-F9 THEN perform PART-LISTBOX END-IF
IF VKey-Newline THEN
IF COPART = THEN perform PART-LISTBOX END-IF
move 1 to part-userfilled
perform OLDMAIN
perform PART-LISTBOX
END-IF.
PART-LISTBOX.
MOVE 1 TO PART-FROM-LB
perform OLDMAIN
CALL openWindow USING SELPART-HANDLE,
VDE-RC
MOVE 0 TO ItemIndex
MOVE 0 TO counter
perform PROD-SIZE times
ADD 1 TO ItemIndex
ADD 1 TO counter
MOVE 27 TO Item-Length
MOVE spaces TO Item-String
MOVE ds-partno(counter) TO Item-String(1:5)
MOVE ds-partdesc(counter) TO Item-String(8:27)
CALL insertItem USING PARTS-HANDLE,
ItemIndex,
Item,
VDE-RC
end-perform
CALL enableFocus USING SELPART-HANDLE,
VDE-RC
GOBACK.
51
CLEAR-OBJECT MODEL-LIST
CLEAR-OBJECT SELMODEL
In our case, these statements need not be converted because when we open a
window, clearance is automatic. If the window is already open and you want to
clear just the MODEL-LIST list box, add a command like this:
compute-subtot section.
move 0 to go-compute
compute cosubtotal = counit * coprice.
compute total = total + cosubtotal.
Since the variables COSUBTOTAL and TOTAL have been modified, check to see
what object they are related to. Get the content of the variables counit and
coprice because if they have been changed from the application, those changes
are reflected automatically in the related variables.
Objects involved in this routine are:
OEMAIN-SUBTOTAL
OEMAIN-TOTAL
OEMAIN-UNIT-HANDLE
OEMAIN-ORDER-DETAIL-P-HANDLE
ENTRY OEMAIN_OEMAIN-UNIT_VKEYPRESS
USING VDE-CELDIAL,
VDE-VKey-Pressed-Data.
IF VKey-F9 THEN
CALL getContents USING OEMAIN-UNIT-HANDLE,
Contents,
52
VDE-RC
MOVE Contents-String TO counit
CALL getContents USING OEMAIN-ORDER-DETAIL-P-HANDLE,
Contents,
VDE-RC
MOVE Contents-String TO coprice
MOVE 1 TO go-compute
perform OLDMAIN
MOVE length of cosubtotal TO Contents-Length
MOVE cosubtotal TO Contents-String
CALL setContents USING OEMAIN-SUBTAOTAL-HANDLE,
Contents,
VDE-RC
MOVE length of total TO Contents-Length
MOVE total TO Contents-String
CALL setContents USING OEMAIN-TOTAL-HANDLE,
Contents,
VDE-RC
END-IF
GOBACK.
The remaining events are straightforward and require no comment.
Dialog
Event BUTTON-SELECTED
IF= CUSTNUM BAD-CUSTNO ;
MOVE 1 CUSTINFO-BOTTON(1) ;
RETC ;
SHOW-WINDOW CUSTINFO ;
SET-FOCUS CUSTINFO ;
REFRESH-OBJECT CUSTINFO ;
End Event # BUTTON-SELECTED
Procedure BAD-CUSTNO
INVOKE-MESSAGE-BOX NO-CUSTNO $NULL $REGISTER ;
End Procedure # BAD-CUSTNO
End Dialog
The IF statement checks whether the customer number is blank, but to do so,
you need the content of that field. You then need to add the routine to invoke the
message box.
First, you need to know which entry field is related to the custnum , variable, then
get its value, and finally test if its content is empty. If so, you need to invoke a
routine that shows the message box. Since there is no link between the Dialog
System message box name and the VDE message box number, you must also
look for the correct message in the VDE message list. Once you have the
message number, we are ready for the migration of the whole event.
Here is the logic you need:
53
ENTRY OEMAIN_OEMAIN-CUSTINFO_PRESS
USING VDE-CELDIAL.
CALL getContents USING OEMAIN-CUSTNO-HANDLE,
Contents,
VDE-RC
MOVE Contents-String TO CUSTNUM
IF CUSTNUM = THEN perform BAD-CUSTNO
ELSE
......
......
END-IF
GOBACK.
bad-custno.
MOVE 2 TO MessageNumber
MOVE 0 TO NumberOfSubStrings
CALL showMsgFromMsgFile USING MsgFileRecord,
MessageButtonReturned,
VDE-RC.
end-bad-custno.
For the rest of the event, you need only get and set contents. There is nothing of
interest in these changes.
Dialog
Event BUTTON-SELECTED
IF= 0 COSUBTOTAL(1) DONT-SAVE ;
MOVE 1 ITEM-OK-BOTTON(1) ;
RETC ;
CLEAR-OBJECT ORDEROK ;
SET-DATA-GROUP-SIZE SAVORDER SAVORDER-SIZE ;
REFRESH-OBJECT OEMAIN-ORDERS ;
REFRESH-OBJECT OEMAIN ;
End Event # BUTTON-SELECTED
Procedure DONT-SAVE
End Procedure # DONT-SAVE
End Dialog
The only item of interest in this event is the CLEAR-OBJECT command. In this
case, since the object is a radio button, this means setting the radio button to
OFF. The equivalent in VDE is:
The procedure you execute when you pass the ITEM-OK-BOTTON flag to the
COBOL program contains an INITIALIZE statement. This means that all of the
variables and the entry fields related to those variables are updated after a
REFRESH command.
54
Dialog
Event BUTTON-SELECTED
CLEAR-OBJECT OEMAIN-ORDERS ;
CLEAR-OBJECT OEMAIN ;
MOVE 1 NEWORDER-BOTTON(1) ;
RETC ;
SET-DATA-GROUP-SIZE SAVORDER 0 ;
REFRESH-OBJECT OEMAIN-ORDERS ;
REFRESH-OBJECT OEMAIN ;
SET-FOCUS OEMAIN ;
End Event # BUTTON-SELECTED
End Dialog
The first statement in the button-selected event code says you need to clear the
list box containing orders. First get the number of the items in the list box and
then delete them one by one. Here is the code you need to add for such a job:
ENTRY OEMAIN_OEMAIN-NEWORDER_PRESS
USING VDE-CELDIAL.
CALL getCount USING OEMAIN-ORDERS-HANDLE,
ItemCount,
VDE-RC
MOVE ItemCount TO counter
MOVE 1 TO ItemIndex
perform counter times
CALL removeItem USING OEMAIN-ORDERS-HANDLE,
ItemIndex,
VDE-RC
end-perform
.....
Look also at the content of the perform statement you execute in the OLDMAIN
procedure. You need to update the entry field related to the ordernum variable.
Dialog
Event BUTTON-SELECTED
MOVE 1 REVISE-ORDER-BOTTON(1) ;
GET-SELECTED-LIST-ITEM OEMAIN-ORDERS SELECTED-SAVEDITEM $EVENT-DATA ;
MOVE $EVENT-DATA SELECTED-SAVEDITEM ;
RETC ;
CLEAR-OBJECT REVISE-ORDER ;
DELETE-LIST-ITEM OEMAIN-ORDERS SELECTED-SAVEDITEM $EVENT-DATA ;
SET-DATA-GROUP-SIZE SAVORDER SAVORDER-SIZE ;
REFRESH-OBJECT OEMAIN ;
End Event # BUTTON-SELECTED
End Dialog
Statements that get the selected list item and delete it translate almost one to
one, but their sequence is not the same. In fact, in the Dialog System
environment, to delete a row for a list box, do it after the RETC command, in
order to use new values and then refresh the window with them. In the VDE
environment, you can delete the item before the RETC command because there
is no link between variables and objects. The result of the migration is:
Chapter 7. Event Logic Migration to VisualAge COBOL for Sample Application
55
ENTRY OEMAIN_REVISE-ORDER_SELECT
USING VDE-CELDIAL.
MOVE 1 TO revise-order-botton
CALL getFirstSelected USING OEMAIN-ORDERS-HANDLE,
ItemIndex,
VDE-RC
MOVE ItemIndex TO Selected-saveditem
CALL removeItem USING OEMAIN-ORDERS-HANDLE,
ItemIndex,
VDE-RC
perform OLDMAIN
MOVE length of total TO Contents-Length
MOVE total TO Contents-String
CALL setContents USING OEMAIN-TOTAL-HANDLE,
Contents,
VDE-RC
.....
CALL disableCheck USING REVISE-ORDER-HANDLE,
VDE-RC
GOBACK.
56
PKUNZIP MF2VDE.ZIP
Here is the list of files you should have:
DATAVAL.CMD
CELDIAL.TXT
KEYS
KEYS.CMD
STYLES.CMD
ATTRIBUT.CMD
LOGFILE
LOGWRITE.CMD
IWZVMKG.EXE
CHKLIST.MS
CELDIAL.BC
MF2VDE.ERR
MIGRATIO.NEW
MIGRATIO.BC
MIGRATIO.P
RMKG.CMD
BITMAP.CMD
CB.CMD
CHB.CMD
EF.CMD
GB.CMD
LB.CMD
MB.CMD
MENU.CMD
MLE.CMD
PB.CMD
RB.CMD
TEXT.CMD
WINDOW.CMD
MF2VDE.VRX
MF2VDE.VRP
MF2VDE.VRY
VROBJ.DLL
ODGUIDOF
MB
MF2VDE.ICO
30.SCR
30E.SCR
TEMPFILE
MF2VDEPS.CMD
WINDOW
EF
TEXT
TRIAL001
MLE
PB
RB
CB
CHB
MENU
XOR.CMD
IWZVCC.DLL
MIGRATIO.TXT
LB
GB
BITMAP
BOTCORN.CMD
SIZECONV.CMD
PRVA.CMD
M2VLABEL.CMD
STYLENAM.CMD
CATALOG.CMD
GPB
EF.OLD
57
MF2VDE.EXE
A.A
DATATYP.CMD
PMWIN.H
3. Edit the RMKG.CMD file and change the value of the somir variable by
changing its path. For example:
set somir=d:\ibmcobol\ctrl\iwzvsom.ir
set somir=C:\MYcobol\ctrl\iwzvsom.ir
Figure 41. MF2VDE - Settings Window Showing the Migration Utility Settings
If you should need to change the utility logic, you may need to use the VX-REXX
product. Logic for parsing the objects is included in the .CMD file, which can be
changed without the VX-REXX product. The objects are pure REXX code; they
use some of the VX-REXX functions but they have not been compiled and
included in the MF2VDE.EXE file.
The main source file is MF2VDE.VRX.
You cannot successfully modify this source if you do not use the VX-REXX
product.
58
Licensees of this program who wish to have information about it for the purpose
of enabling: (i) the exchange of information between independently created
programs and other programs (including this one) and (ii) the mutual use of the
information which has been exchanged, should contact IBM Corporation, Dept.
600A, Mail Drop 1329, Somers, NY 10589 USA.
Such information may be available, subject to appropriate terms and conditions,
including in some cases, payment of a fee.
The information contained in this document has not been submitted to any
formal IBM test and is distributed AS IS. The information about non-IBM
(vendor) products in this manual has been supplied by the vendor and IBM
assumes no responsibility for its accuracy or completeness. The use of this
information or the implementation of any of these techniques is a customer
responsibility and depends on the customers ability to evaluate and integrate
them into the customers operational environment. While each item may have
been reviewed by IBM for accuracy in a specific situation, there is no guarantee
that the same or similar results will be obtained elsewhere. Customers
attempting to adapt these techniques to their own environments do so at their
own risk.
The following terms are trademarks of the International Business Machines
Corporation in the United States and/or other countries:
DATABASE 2
DB2/2
PS/2
DB2
IBM
VisualAge
59
60
IBM VisualAge for COBOL for OS/2 Workframe User Guide , SG24-4604
IBM VisualAge for COBOL for OS/2 Object Oriented Programming , SG24-4606
Subscription
Number
SBOF-7201
SBOF-7370
SBOF-7240
SBOF-7270
SBOF-7230
SBOF-7205
SBOF-7290
SBOF-7250
Collection Kit
Number
SK2T-2177
SK2T-6022
SK2T-8038
SK2T-2849
SK2T-8040
SK2T-8041
SK2T-8037
SK2T-8042
61
62
Tools disks
To get LIST3820s of redbooks, type one of the following commands:
TOOLCAT REDBOOKS
To get lists of redbooks:
http://w3.itso.ibm.com/redbooks
http://www.elink.ibmlink.ibm.com/pbl/pbl
IBM employees may obtain LIST3820s of redbooks from this page.
Internet Listserver
With an Internet e-mail address, anyone can subscribe to an IBM Announcement Listserver. To initiate the
service, send an e-mail note to announce@webster.ibmlink.ibm.com with the keyword subscribe in the body of
the note (leave the subject line blank). A category form and detailed instructions will be sent to you.
63
Online Orders (Do not send credit card information over the Internet) send orders to:
In United States:
In Canada:
Outside North America:
1-800-879-2755
1-800-IBM-4YOU
(long
(+45)
(+45)
(+45)
(+45)
(+45)
Internet
usib6fpl@ibmmail.com
lmannix@vnet.ibm.com
bookshop@dk.ibm.com
Telephone orders
I B M Publications
Publications Customer Support
P.O. Box 29570
Raleigh, NC 27626-0570
USA
IBMMAIL
usib6fpl at ibmmail
caibmbkz at ibmmail
dkibmbsh at ibmmail
1-800-445-9269
1-403-267-4455
(+45) 48 14 2207 (long distance charge)
http://www.redbooks.ibm.com
http://www.elink.ibmlink.ibm.com/pbl/pbl
Internet Listserver
With an Internet e-mail address, anyone can subscribe to an IBM Announcement Listserver. To initiate the
service, send an e-mail note to announce@webster.ibmlink.ibm.com with the keyword subscribe in the body of
the note (leave the subject line blank).
64
Order Number
First name
Quantity
Last name
Company
Address
City
Postal code
Telephone number
Telefax number
Card issued to
Country
VAT number
Signature
We accept American Express, Diners, Eurocard, Master Card, and Visa. Payment by credit card not
available in all countries. Signature mandatory for credit card payment.
DO NOT SEND CREDIT CARD INFORMATION OVER THE INTERNET.
65
66
Glossary
The terms in this glossary are defined in accordance
with their meaning in COBOL. These terms may or
may not have the same meaning in other languages.
A
* abbreviated combined relation condition. The
combined condition that results from the explicit
omission of a common subject or a common subject
and common relational operator in a consecutive
sequence of relation conditions.
abend.
* alphanumeric character.
computers character set.
*
/
**
Meaning
addition
subtraction
multiplication
division
exponentiation
67
A condition caused:
C
callable services. In Language Environment, a set of
services that can be invoked by a COBOL program
using the conventional Language Environment-defined
call interface, and usable by all programs sharing the
Language Environment conventions.
called program. A program that is the object of a
CALL statement.
* calling program. A program that executes a CALL
to another program.
B
big-endian. Default format used by the mainframe
and the AIX workstation to store binary data. In this
format, the least significant digit is on the highest
address. Compare with little-endian.
binary item. A numeric data item represented in
binary notation (on the base 2 numbering system).
Binary items have a decimal equivalent consisting of
the decimal digits 0 through 9, plus an operational
sign. The leftmost bit of the item is the operational
sign.
binary search. A dichotomizing search in which, at
each step of the search, the set of data elements is
divided by two; some appropriate action is taken in
the case of an odd number.
* block. A physical unit of data that is normally
composed of one or more logical records. For mass
storage files, a block may contain a portion of a
logical record. The size of a block has no direct
relationship to the size of the file within which the
block is contained or to the size of the logical
record(s) that are either contained within the block or
that overlap the block. The term is synonymous with
physical record.
breakpoint. A place in a computer program, usually
specified by an instruction, where its execution may
68
>
<
:
*
/
=
$
,
;
.
Meaning
digit
uppercase letter
lowercase letter
space
plus sign
minus sign (hyphen)
asterisk
slant (virgule, slash)
equal sign
currency sign
comma (decimal point)
semicolon
period (decimal point, full stop)
quotation mark
left parenthesis
* COBOL word.
right parenthesis
greater than symbol
less than symbol
colon
See word.
Glossary
69
70
D
* data clause. A clause, appearing in a data
description entry in the DATA DIVISION of a COBOL
program, that provides information describing a
particular attribute of a data item.
* data description entry . An entry in the DATA
DIVISION of a COBOL program that is composed of a
level-number followed by a data-name, if required,
and then followed by a set of data clauses, as
required.
DATA DIVISION. One of the four main components of
a COBOL program, class definition, or method
definition. The DATA DIVISION describes the data to
be processed by the object program, class, or
method: files to be used and the records contained
within them; internal working-storage records that will
be needed; data to be made available in more than
one program in the COBOL run unit. (Note, the Class
DATA DIVISION contains only the
WORKING-STORAGE SECTION.)
* data item. A unit of data (excluding literals) defined
by a COBOL program or by the rules for function
evaluation.
* data-name. A user-defined word that names a data
item described in a data description entry. When
used in the general formats, data-name represents a
word that must not be reference-modified, subscripted
or qualified unless specifically permitted by the rules
for the format.
DBCS (Double-Byte Character Set). See
Double-Byte Character Set (DBCS).
* debugging line. A debugging line is any line with a
D in the indicator area of the line.
* debugging section. A section that contains a USE
FOR DEBUGGING statement.
* declarative sentence. A compiler directing sentence
consisting of a single USE statement terminated by
the separator period.
* declaratives. A set of one or more special purpose
sections, written at the beginning of the Procedure
Division, the first of which is preceded by the key
word DECLARATIVES and the last of which is followed
by the key words END DECLARATIVES. A declarative
is composed of a section header, followed by a USE
compiler directing sentence, followed by a set of zero,
one, or more associated paragraphs.
Glossary
71
E
* EBCDIC (Extended Binary-Coded Decimal
Interchange Code). A coded character set consisting
of 8-bit coded characters.
EBCDIC character. Any one of the symbols included
in the 8-bit EBCDIC (Extended Binary-Coded-Decimal
Interchange Code) set.
edited data item. A data item that has been modified
by suppressing zeroes and/or inserting editing
characters.
* editing character. A single character or a fixed
two-character combination belonging to the following
set:
Character
CR
DB
Z
*
$
,
.
/
Meaning
space
zero
plus
minus
credit
debit
zero suppress
check protect
currency sign
comma (decimal point)
period (decimal point)
slant (virgule, slash)
72
execution-time environment.
environment.
See run-time
F
* figurative constant. A compiler-generated value
referenced through the use of certain reserved words.
* file.
* expression.
expression.
An arithmetic or conditional
Glossary
73
74
G
* global name. A name which is declared in only one
program but which may be referenced from that
program and from any program contained within that
program. Condition-names, data-names, file-names,
record-names, report-names, and some special
registers may be global names.
* group item. A data item that is composed of
subordinate data items.
H
header label. (1) A file label or data set label that
precedes the data records on a unit of recording
media. (2) Synonym for beginning-of-file label.
* high order end.
of characters.
I
IBM COBOL extension. Certain COBOL syntax and
semantics supported by IBM compilers in addition to
those described in ANSI Standard.
IDENTIFICATION DIVISION. One of the four main
component parts of a COBOL program, class
definition, or method definition. The IDENTIFICATION
DIVISION identifies the program name, class name, or
method name. The IDENTIFICATION DIVISION may
include the following documentation: author name,
installation, or date.
* identifier. A syntactically correct combination of
character-strings and separators that names a data
item. When referencing a data item that is not a
function, an identifier consists of a data-name,
together with its qualifiers, subscripts, and
reference-modifier, as required for uniqueness of
reference. When referencing a data item which is a
function, a function-identifier is used.
IGZCBSN. The COBOL for MVS and VM bootstrap
routine. It must be link-edited with any module that
contains a COBOL for MVS and VM program.
* imperative statement. A statement that either
begins with an imperative verb and specifies an
unconditional action to be taken or is a conditional
statement that is delimited by its explicit scope
terminator (delimited scope statement). A n
imperative statement may consist of a sequence of
imperative statements.
* implicit scope terminator. A separator period which
terminates the scope of any preceding unterminated
statement, or a phrase of a statement which by its
occurrence indicates the end of the scope of any
statement contained within the preceding phrase.
* indexed file.
Glossary
75
76
K
K. When referring to storage capacity, two to the
tenth power; 1024 in decimal notation.
* key. A data item that identifies the location of a
record, or a set of data items which serve to identify
the ordering of data.
* key of reference. The key, either prime or
alternate, currently being used to access records
within an indexed file.
* key word. A reserved word or function-name
whose presence is required when the format in which
the word appears is used in a source program.
kilobyte (KB).
L
* language-name. A system-name that specifies a
particular programming language.
Language Environment-conforming. A characteristic
of compiler products (COBOL/370, COBOL for MVS
and VM, AD/Cycle C/370, C/C++ for MVS and VM,
PL/I for MVS and VM) that produce object code
conforming to the Language Environment format.
last-used state. A program is in last-used state if its
internal values remain the same as when the program
was exited (are not reset to their initial values).
* letter. A character belonging to one of the following
two sets:
1. Uppercase letters: A, B, C, D, E, F, G, H, I, J, K, L,
M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z
2. Lowercase letters: a, b, c, d, e, f, g, h, i, j, k, l, m,
n, o, p, q, r, s, t, u, v, w, x, y, z
* level indicator. Two alphabetic characters that
identify a specific type of file or a position in a
hierarchy. The level indicators in the DATA DIVISION
are: CD, FD, and SD.
* level-number. A user-defined word, expressed as a
two digit number, which indicates the hierarchical
position of a data item or the special properties of a
data description entry. Level-numbers in the range
from 1 through 49 indicate the position of a data item
in the hierarchical structure of a logical record.
Level-numbers in the range 1 through 9 may be
written either as a single digit or as a zero followed
by a significant digit. Level-numbers 66, 77 and 88
identify special properties of a data description entry.
M
main program. In a hierarchy of programs and
subroutines, the first program to receive control when
the programs are run.
* mass storage. A storage medium in which data
may be organized and maintained in both a
sequential and nonsequential manner.
* megabyte (M).
bytes.
N
name. A word composed of not more than 30
characters that defines a COBOL operand.
* native character set. The implementor-defined
character set associated with the computer specified
in the OBJECT-COMPUTER paragraph.
Glossary
77
O
object. An entity that has state (its data values) and
operations (its methods). An object is a way to
encapsulate state and behavior.
object code. Output from a compiler or assembler
that is itself executable machine code or is suitable
for processing to produce executable machine code.
* OBJECT-COMPUTER. The name of an
ENVIRONMENT DIVISION paragraph in which the
computer environment, within which the object
program is executed, is described.
* object computer entry. An entry in the
OBJECT-COMPUTER paragraph of the ENVIRONMENT
DIVISION which contains clauses that describe the
computer environment in which the object program is
to be executed.
object deck. A portion of an object program suitable
as input to a linkage editor. Synonymous with object
module and text deck .
object module.
WORKING-STORAGE SECTION
01 TABLE-1.
05 X
05 Y OCCURS 3 TIMES
DEPENDING ON X
ODO object.
78
PICS9.
PIC X.
P
packed decimal item.
SOURCE-COMPUTER.
OBJECT-COMPUTER.
SPECIAL-NAMES.
REPOSITORY. (Program or Class CONFIGURATION SECTION only)
FILE-CONTROL.
I-O-CONTROL.
* paragraph-name. A user-defined word that
identifies and begins a paragraph in the Procedure
Division.
parameter. Parameters are used to pass data values
between calling and called programs.
password. A unique string of characters that a
program, computer operator, or user must supply to
meet security requirements before gaining access to
data.
Glossary
79
See block.
(
)
Meaning
comma
semicolon
colon
period (full stop)
quotation mark
left parenthesis
right parenthesis
space
equal sign
Q
QSAM (Queued Sequential Access Method). An
extended version of the basic sequential access
method (BSAM). When this method is used, a queue
is formed of input data blocks that are awaiting
processing or of output data blocks that have been
processed and are awaiting transfer to auxiliary
storage or to an output device.
* qualifier.
80
R
* random access. An access mode in which the
program-specified value of a key data item identifies
the logical record that is obtained from, deleted from,
or placed into a relative or indexed file.
* record.
* record description.
Operator
IS GREATER THAN
IS >
IS NOT GREATER THAN
IS NOT >
Meaning
Greater than
Greater than
Not greater than
Not greater than
IS
IS
IS
IS
Less than
Less than
Not less than
Not less than
IS
IS
IS
IS
EQUAL TO
=
NOT EQUAL TO
NOT =
Equal to
Equal to
Not equal to
Not equal to
LESS THAN
<
* relation character.
following set:
Character
>
<
=
Meaning
greater than
less than
equal to
Glossary
81
S
SBCS (Single Byte Character Set).
Character Set (SBCS) .
CONFIGURATION SECTION.
INPUT-OUTPUT SECTION.
The permissible section headers in the DATA
DIVISION are:
FILE SECTION.
WORKING-STORAGE SECTION.
LOCAL-STORAGE SECTION.
LINKAGE SECTION.
In the Procedure Division, a section header is
composed of a section-name, followed by the
reserved word SECTION, followed by a separator
period.
* section-name. A user-defined word that names a
section in the Procedure Division.
selection structure. A program processing logic in
which one or another series of statements is
executed, depending on whether a condition is true or
false.
* sentence. A sequence of one or more statements,
the last of which is terminated by a separator period.
* separately compiled program. A program which,
together with its contained programs, is compiled
separately from all other programs.
* separator. A character or two contiguous
characters used to delimit character-strings.
* separator comma. A comma (,) followed by a space
used to delimit character-strings.
* separator period. A period (.) followed by a space
used to delimit character-strings.
82
Relation condition
Class condition
Condition-name condition
Switch-status condition
Sign condition
*
/
=
$
,
;
.
(
)
>
<
:
Meaning
plus sign
minus sign (hyphen)
asterisk
slant (virgule, slash)
equal sign
currency sign
comma (decimal point)
semicolon
period (decimal point, full stop)
quotation mark
left parenthesis
right parenthesis
greater than symbol
less than symbol
colon
Glossary
83
T
* table. A set of logically consecutive items of data
that are defined in the DATA DIVISION by means of
the OCCURS clause.
* table element. A data item that belongs to the set
of repeated items comprising a table.
text deck.
* text-name.
library text.
84
See structured
U
* unary operator. A plus (+) or a minus (-) sign, that
precedes a variable or a left parenthesis in an
arithmetic expression and that has the effect of
multiplying the expression by +1 or -1, respectively.
unit. A module of direct access, the dimensions of
which are determined by IBM.
universal object reference. A data-name that can
refer to an object of any class.
* unsuccessful execution. The attempted execution of
a statement that does not result in the execution of all
the operations specified by that statement. The
unsuccessful execution of a statement does not affect
any data referenced by that statement, but may affect
status indicators.
Z
zoned decimal item.
Glossary
85
86
List of Abbreviations
ANSI
DB2
DS
Dialog System
GUI
IBM
International Business
Machines Corporation
ITSO
International Technical
Support Organization
MF
Micro Focus
PM
presentation manager
UI
user interface
VDE
visual development
environment
VSAM
87
88
Index
parts in visual development environment (continued)
menu items 26
message boxes 33
multiline entry fields 31
notebooks 32
push buttons 29
radio button 31
selection or combination boxes 31
static text 31
windows 25
PM application
structure 3
A
abbreviations 87
acronyms 87
B
bibliography
61
D
dialog system
comparison to VDE 4
data migration 7
export file 17, 45
migration approach 5
objects 18
sample export file 19
structure 1, 2
R
REXX
VX-REXX
17
S
sample application
customer information window 13
customer list window 13
embedding logic code 42
entry field event code migration 48, 51
event logic migration 45
main window 11
migration 35
migration LOG file 36
o v e r v i e w 11
push button event code migration 53, 54
radio button event code migration 54, 55
select model window 14
select part number window 14
shipid window 15
VDE code assistant 46
window structure 13
M
migration utility
description 17
hardware requirements 57
installation 57
main window 17, 21
software requirements 57
using 21
O
objects in dialog system
bitmaps 32
dialog boxes 32
entry fields 27
group boxes 32
list boxes 30
menu items 26
message boxes 33
multiline entry fields 31
notebooks 32
push buttons 29
radio button 31
selection or combination boxes
static text 31
windows 25
31
P
parts in visual development environment
bitmaps 32
dialog boxes 32
entry fields 27
group boxes 32
list boxes 30
89
IBML
Printed in U.S.A.
SG24-4887-00