Migrating Micro Focus Os/2 Dialog System Applications To Ibm Visualage For Cobol For Os/2
Migrating Micro Focus Os/2 Dialog System Applications To Ibm Visualage For Cobol For Os/2
Migrating Micro Focus Os/2 Dialog System Applications To Ibm Visualage For Cobol For Os/2
December 1996
IBML
SG24-4887-00
International Technical Support Organization
December 1996
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.
This edition applies to Version 1.2 Refresh, 83H9131, VisualAge for COBOL for OS/2 for use with the OS/2 WARP
3.0 Operating System.
When you send information to IBM, you grant IBM a non-exclusive right to use or distribute the information in any
way it believes appropriate without incurring any obligation to you.
Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
How This Redbook Is Organized . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
The Author of This Redbook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viii
Comments Welcome . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viii
Chapter 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1 Description of a Typical GUI MF COBOL Application . . . . . . . . . . . . . 1
1.2 Description of a Typical IBM COBOL PM Application . . . . . . . . . . . . 3
1.3 The Migration Approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.3.1 Changing from DS to VDE . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.3.2 Translating from the Dialog System Code to the IBM COBOL Structure 6
1.3.3 Moving from MF COBOL to IBM COBOL . . . . . . . . . . . . . . . . . 7
1.3.4 Data Migration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
List of Abbreviations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
1. MF DS COBOL Representation . . . . . . . . . . . . . . . . . . . . . . . . . 3
2. IBM VDE Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
3. MF COBOL versus IBM COBOL . . . . . . . . . . . . . . . . . . . . . . . . 5
4. Migration Cycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
5. MF COBOL versus IBM COBOL . . . . . . . . . . . . . . . . . . . . . . . . 7
6. Conversion Requirements for Data File Migration . . . . . . . . . . . . . 8
7. Proposed Migration Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
8. Main Window of the Celdial Order Entry Application . . . . . . . . . . . . 12
9. Customer List Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
10. Customer Information Window . . . . . . . . . . . . . . . . . . . . . . . . . 14
11. Select Part Number Window . . . . . . . . . . . . . . . . . . . . . . . . . . 14
12. Select Model Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
13. Ship ID Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
14. The Celdial Order Entry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
15. Micro Focus DS to IBM VDE Migration Utility Window . . . . . . . . . . . 18
16. Sample Micro Focus Dialog System Window . . . . . . . . . . . . . . . . . 18
17. Micro Focus DS to IBM VDE Migration Utility Window . . . . . . . . . . . 21
18. MF2VDE - Message Window Migration Utility . . . . . . . . . . . . . . . . 22
19. Parts Catalog Window of the Migration Utility . . . . . . . . . . . . . . . . 23
20. Window Properties Window for MF Dialog System . . . . . . . . . . . . . 26
21. Window Part Settings Window for IBM VDE . . . . . . . . . . . . . . . . . 26
22. Pull Down Choice Details Window for the MF Dialog System . . . . . . . 27
23. Menu Item Part Settings Window for IBM VDE . . . . . . . . . . . . . . . . 27
24. Entry Field Properties Window for MF Dialog System . . . . . . . . . . . 29
25. Entry Field Part Settings Window for IBM VDE . . . . . . . . . . . . . . . . 29
26. Push Button Properties Window for MF Dialog System . . . . . . . . . . 30
27. Push Button Part Settings Window for IBM VDE . . . . . . . . . . . . . . . 30
28. List Box Properties Window for MF Dialog System . . . . . . . . . . . . . 31
29. List Box Part Settings Window for IBM VDE . . . . . . . . . . . . . . . . . 31
30. Message Box Properties Window for MF Dialog System . . . . . . . . . . 33
31. COBOL GUI Designer - Define Message Window for IBM VDE . . . . . . 34
32. Migration Utility Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
33. Migrated Ship - ID Window Showing Wrong-Sized Push Buttons. . . . . 36
34. VDE Define Message Window Showing Migration Fixes. . . . . . . . . . . 38
35. IBM COBOL Compiler Options Window . . . . . . . . . . . . . . . . . . . . 39
36. IBM COBOL Compiler Options Window . . . . . . . . . . . . . . . . . . . . 40
37. IBM COBOL Compiler Options Window . . . . . . . . . . . . . . . . . . . . 41
38. IBM COBOL Compiler Options Window . . . . . . . . . . . . . . . . . . . . 42
39. IBM VDE Code Assistant Window . . . . . . . . . . . . . . . . . . . . . . . 47
40. COBOL GUI Designer - Celdial Window . . . . . . . . . . . . . . . . . . . . 49
41. MF2VDE - Settings Window Showing the Migration Utility Settings . . . 58
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.
Knowledge of Micro Focus Dialog System, IBM VisualAge for COBOL for OS/2,
the COBOL language, and visual building techniques is required.
Thanks to the following people for their invaluable contributions to this project:
Paul Pacholski
IBM Toronto
Wilbert Kho
IBM Santa Teresa Laboratory, San Jose, California
Joe DeCarlo
IBM International Technical Support Organization, San Jose Center
Comments Welcome
Your comments are important to us!
In this type of migration we most often stay with the same product, merely
changing syntactical structures or introducing new functions.
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.
procedure division.
main-process section.
perform program-initialize.
perform program-body until exit-pgm-true.
perform program-terminate.
program-terminate section.
........
stop run.
load-screenset section.
move ds-new-set to ds-control
move ″c:\dsg\celdial\celdial.gs″ to ds-set-name
perform call-dialog-system.
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 IBM′s 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.
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.
Another characteristic that makes the tools different is that IBM COBOL uses
entires to define events, while MF uses procedures and calls them by setting a
flag and performing the related procedure in an Evaluate Loop.
Chapter 1. Introduction 3
Figure 2. IBM VDE Representation. Graphical representation of the structure of an I B M COBOL VisualAge
application.
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).
Chapter 1. Introduction 5
Figure 4. Migration Cycle
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 7
1.3.4 Data Migration
Since the only difference we have found is in the format of VSAM and sequential
files, we suggest writing a small program that reads data from the MF format
and writes into a flat file. Then, with another program, you can read that data
and recreate the files in the IBM COBOL format (Figure 6).
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.
Chapter 1. Introduction 9
10 Micro Focus Dialog System to VisualAge COBOL
Chapter 2. Sample Application Description
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.
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).
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).
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.
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).
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.
The utility needs an input file (.TXT) from the MF Dialog System. To produce this
file, you must go into the Dialog System and, after opening the application to be
migrated, you must:
• Select the File option from the main DS window.
• Select Export from the File option.
• From the Dialog System Export window,
− Select file as the destination.
− Select all of the items in the Sections to Export group box.
− Select all of the items in the Objects to Export group box.
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).
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.
Figure 16. Sample Micro Focus Dialog System Window. This w i n d o w migrates with the utility.
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
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 result of the process (the .ODG file) should have a format similar to the
following:
B 100 0
W FVDESFrameWindow V 318 V 294 V 110 V 2 V 00000800 V 00000033 D D V WIN1 D D D D D D D V Window@Title D D D
W FVDESMenuBar D D D D D V 1 V 1 D D D D D D D D D D D D D
W FVDESMenuItem D D D D D D D D V NoName D D D D D D D V File D D D D D
W FVDESSubmenu D D D D D D V 1 V 1 D D D D D D D D D D D D
WFVDESMenuItem D D D D D D D D V NoName D D V 34 D D D D V Exit D D D D D
X
X
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:
File Restructuring needed. Just continue
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.
For the .ODF file name, we suggest you use the file name proposed by the utility.
At the end of the process, you should hear a triple beep confirming that the
process has completed without errors. Otherwise, you will receive a message
window with error codes. Again, the Migration Utility is meant to handle a fair
number of MF Dialog System designs but not all DS system designs can be
migrated. Differences between DS and VDE will require manual migration.
At this point you are ready to open the VisualAge COBOL project. Open the
tools palette and find, in the user-defined page, the part you added to the catalog
(Figure 19). Now you need only drag the selected part into the VDE frame, drop
it, and wait a few seconds until all of the MF DS windows and objects are shown.
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:
>>>>>>>>> part name too long.
If you find it, the string should continue with the part name. In this case
the string is:
>>>>>>>>> part name too long: OEMAIN-ORDER-DETAIL-PARTPRICE.
If you read the following two rows, you find:
>>>>>>>>> it must be at least 23 characters, CORRECT IT ! in the VDE.
------------ OBJECT : PB1-LUNGOPIUDIVENTITREBYTEPER (PushButton)
This message informs you that the object which needs to be changed is
a push button. To find the parent of this object you must go back through
the .LOG file until you find the first FrameWindow. This is its parent.
− 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.
• You are now ready to build.
If the build completes successfully, you can begin changing and adding the
properties that the utility has not migrated.
This chapter describes the objects used by the MF Dialog System and compares
them with the objects (parts in the IBM environment vocabulary) belonging to the
VDE. For each object, we stress only those differences that are not portable from
the MF Dialog System to the VDE.
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.
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.
Micro Focus does validations on the entry fields based on the format of the field
and on values the user specifies. This kind of validation can only be partially
translated into the VDE (Figure 25). The following is a list of the validations that
VDE cannot completely support:
• 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.
The following are MF properties and their corresponding names in the VDE:
• Display field --> Visible
• No echo --> Masked
• AutoSkip --> AutoTab
• Border --> Margins
Notes:
• 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.
The VDE (Figure 29) does not automatically support the blank-when-zeros
property.
There are no major list box differences. Use of the associated with group
property in the MF DS is easy to translate into the IBM VDE syntax by using the
same COBOL structure when you want to populate or, in general, act on it.
In the MF DS environment, you must specify whether selection box items must
be in upper case, mixed case, or lower case. This is not needed in the IBM VDE.
You must also define which type of value you are using in the selection box (for
example, x(10) or 9(4)) and you may specify that items should be “blank when
zero” or “justified right.”
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.
At this point it is very easy to port the properties into this window.
Using the Migration Utility tool (Figure 32), create the following:
• File Celdial.ODG
• File Celdial.ODF
• File Celdial.LOG
• Part name Celdial part for the IBM VDE catalog
Figure 32. Migration Utility Window. Shows values used for the Celdial application.
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:
>>>>>>>>>>>>>>> part name too long: OEMAIN-ORDER-DETAIL-PARTPRICE
>>>>>>>>>>>>>>> it must be at least 23 characters,
CORRECT IT ! in the VDE.
------------------ OBJECT : OEMAIN-ORDER-DETAIL-PARTPRICE (EntryField)
As a remedy, we went back to VDE and changed
OEMAIN-ORDER-DETAIL-PAR, the name that VDE truncated, into
OEMAIN-ORDER-DETAIL-P. This change is needed even if the name has
already been truncated.
• Open the source code and save it.
• Save the untitled project as Celdial in the \IBMCOBOL\CELDIAL directory.
• Check that the return code from the build is zero.
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:
-------------------------- OBJECT : OEMAIN (FrameWindow)
property CLIPPED cannot be implemented automatically.
Ignore the message as this is not a property you can keep, since IBM VDE does
not allow specification of this property.
In this case, open the part settings notebook and look first at the datatype. A
character data type with a length equal to seven, can be fixed in the validation
page by specifying Comparison as the validation criterion, with value Not Equal,
then typing seven blanks.
This means you need to do some MAKE UP for the dimensions of this push
button.
Then, after some properties already treated, you reach these messages:
-------------------------- OBJECT : NO-DISCOUNT (MessageBox)
++++++++++++++ the above object: NO-DISCOUNT must be migrated manually
property MOVABLE cannot be implemented automatically.
property BUTTONS(OK) cannot be implemented automatically.
property DEFAULT-BUTTON(1) cannot be implemented automatically.
property NOTIFICATION cannot be implemented 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.
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.
Before describing how to embed the COBOL logic, we show how to set the
environment to be able to build.
Figure 35. IBM COBOL Compiler Options Window. Shows changes to syntactical defaults.
• In the Debug page (Figure 36), set the check box before the last to ON. This
enables the routine ″Generate debugging information.″
You are now ready to add the COBOL logic and then compile the whole
application.
perform call-dialog-system
and
load-screenset section.
call-dialog-system section.
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.
• When we tried to compile, we encountered these error messages:
2745 IGYPS0008-E A quote or an apostrophe was used as
a character string delimiter. It was not the delimiter option in effect.
The use was accepted.
Start from the .TXT file. and look for the global dialog string to start migrating the
event that sets the environment. You then follow the order of items found in the
.TXT file.
What you find, looking for the global dialog string, is:
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.
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 next statement is the colors setting for the BYLINE entry field. To convert
that setting, use the VDE GUI Assistant. In the GUI assistant window, select the
OEMAIN window, the BYLINE entry field, and the setBackColor action, then press
the Move push button displayed in the window (Figure 39).
After carrying out this operation in our case, we added the following code to the
event:
MOVE Color-Red TO Color
CALL ″setForeColor″ USING BYLINE-HANDLE,
Color,
VDE-RC
MOVE Color-White TO Color
CALL ″setBackColor″ USING BYLINE-HANDLE,
Color,
VDE-RC
Now, starting from the beginning of the .TXT file, stop at each object that has a
dialog to migrate into COBOL, working your way through the whole file.
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 PIC 9(9) USAGE COMP-5.
88 VKey-Escape VALUE 0.
88 VKey-Tab VALUE 1.
.......
88 VKey-Newline VALUE 6.
.......
88 VKey-F24 VALUE 47.
The code to add is:
ENTRY ″OEMAIN_OEMAIN-CUSTNO_VKEYPRESS″
USING VDE-CELDIAL,
VDE-VKey-Pressed-Data.
IF VKey-Newline THEN
END-IF
GOBACK.
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
Thus, to set the customer number entry field, add this logic:
MOVE length of ds-custno TO Contents-Length
MOVE ds-custno TO Contents-String
CALL ″setContents″ USING OEMAIN-CUSTNO-HANDLE,
Contents,
VDE-RC
You need to translate the BLANK-CUSTNO procedure into COBOL. Here is the
result:
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
The statement
SET-DATA-GROUP-SIZE CUSTLIST CUST-SIZE
has been translated into the loop
perform CUST-SIZE times ...... end-perform
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:
The remaining part of the migration for events of this object is trivial.
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.
ENTRY ″OEMAIN_OEMAIN-UNIT_VKEYPRESS″
USING VDE-CELDIAL,
VDE-VKey-Pressed-Data.
IF VKey-F9 THEN
CALL ″getContents″ USING OEMAIN-UNIT-HANDLE,
Contents,
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.
For the rest of the event, you need only get and set contents. There is nothing of
interest in these changes.
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.
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.
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:
.....
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.
You cannot successfully modify this source if you do not use the VX-REXX
product.
Information in this book was developed in conjunction with use of the equipment
specified, and is limited in application to those specific hardware and software
products and levels.
IBM may have patents or pending patent applications covering subject matter in
this document. The furnishing of this document does not give you any license to
these patents. You can send license inquiries, in writing, to the IBM Director of
Licensing, IBM Corporation, 500 Columbus Avenue, Thornwood, NY 10594 USA.
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.
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 customer′s ability to evaluate and integrate
them into the customer′s 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.
DATABASE 2 DB2
DB2/2 IBM
PS/2 VisualAge
Micro Focus and Dialog System are trademarks of Micro Focus Corporation
The publications listed in this section are considered particularly suitable for a
more detailed discussion of the topics covered in this redbook.
This information was current at the time of publication, but is continually subject to change. The latest
information may be found at URL http://www.redbooks.ibm.com.
IBMMAIL Internet
In United States: usib6fpl at ibmmail usib6fpl@ibmmail.com
In Canada: caibmbkz at ibmmail lmannix@vnet.ibm.com
Outside North America: dkibmbsh at ibmmail bookshop@dk.ibm.com
• Telephone orders
Company
Address
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.
IBM is grateful to the American National Standards ANSI (American National Standards Institute). An
Institute (ANSI) for permission to reprint its definitions organization consisting of producers, consumers, and
from the following publications: general interest groups, that establishes the
•
procedures by which accredited organizations create
American National Standard Programming
and maintain voluntary industry standards in the
Language COBOL, ANSI X3.23-1985 (Copyright
United States.
1985 American National Standards Institute, Inc.),
which was prepared by Technical Committee
* argument. An identifier, a literal, an arithmetic
X3J4, which had the task of revising American
expression, or a function-identifier that specifies a
National Standard COBOL, X3.23-1974.
value to be used in the evaluation of a function.
• American National Dictionary for Information
Processing Systems (Copyright 1982 by the * arithmetic expression. An identifier of a numeric
Computer and Business Equipment Manufacturers elementary item, a numeric literal, such identifiers
Association). and literals separated by arithmetic operators, two
arithmetic expressions separated by an arithmetic
American National Standard definitions are preceded operator, or an arithmetic expression enclosed in
by an asterisk (*). parentheses.
* block. A physical unit of data that is normally character position. The amount of physical storage
composed of one or more logical records. For mass required to store a single standard data format
storage files, a block may contain a portion of a character described as USAGE IS DISPLAY.
logical record. The size of a block has no direct
relationship to the size of the file within which the character set. All the valid characters for a
block is contained or to the size of the logical programming language or a computer system.
record(s) that are either contained within the block or
that overlap the block. The term is synonymous with * character-string. A sequence of contiguous
physical record. characters that form a COBOL word, a literal, a
PICTURE character-string, or a comment-entry. Must
breakpoint. A place in a computer program, usually be delimited by separators.
specified by an instruction, where its execution may
* COBOL character set. The complete COBOL * common program. A program which, despite being
character set consists of the characters listed below: directly contained within another program, may be
Character Meaning called from any program directly or indirectly
0,1...,9 digit contained in that other program.
A,B,...,Z uppercase letter
* compile. (1) To translate a program expressed in a
a,b,...,z lowercase letter
high-level language into a program expressed in an
• space
intermediate language, assembly language, or a
+ plus sign
computer language. (2) To prepare a machine
− minus sign (hyphen)
language program from a computer program written
* asterisk
in another programming language by making use of
/ slant (virgule, slash)
the overall logic structure of the program, or
= equal sign
generating more than one computer instruction for
$ currency sign
each symbolic statement, or both, as well as
, comma (decimal point)
performing the function of an assembler.
; semicolon
. period (decimal point, full stop)
* compile time. The time at which a COBOL source
″ quotation mark
program is translated, by a COBOL compiler, to a
( left parenthesis
COBOL object program.
Glossary 69
compiler. A program that translates a program * conditional variable. A data item one or more
written in a higher level language into a machine values of which has a condition-name assigned to it.
language object program.
* condition-name. A user-defined word that assigns a
compiler directing statement. A statement, beginning name to a subset of values that a conditional variable
with a compiler directing verb, that causes the may assume; or a user-defined word assigned to a
compiler to take a specific action during compilation. status of an implementor defined switch or device.
When ‘condition-name’ is used in the general formats,
compiler directing statement. A statement that it represents a unique data item reference consisting
specifies actions to be taken by the compiler during of a syntactically correct combination of a
processing of a COBOL source program. Compiler ‘condition-name’, together with qualifiers and
directives are contained in the COBOL source subscripts, as required for uniqueness of reference.
program. Thus, you can specify different suboptions
of the directive within the source program by using * condition-name condition. The proposition, for
multiple compiler directive statements in the which a truth value can be determined, that the value
program. of a conditional variable is a member of the set of
values attributed to a condition-name associated with
* complex condition. A condition in which one or the conditional variable.
more logical operators act upon one or more
conditions. (See also “negated simple condition,” * CONFIGURATION SECTION. A section of the
“combined condition,” and “negated combined ENVIRONMENT DIVISION that describes overall
condition.”) specifications of source and object programs and
class definitions.
* computer-name. A system-name that identifies the
computer upon which the program is to be compiled CONSOLE. A COBOL environment-name associated
or run. with the operator console.
condition. An exception that has been enabled, or * contiguous items. Items that are described by
recognized, by Language Environment and thus is consecutive entries in the Data Division, and that
eligible to activate user and language condition bear a definite hierarchic relationship to each other.
handlers. Any alteration to the normal programmed
flow of an application. Conditions can be detected by CORBA. The Common Object Request Broker
the hardware/operating system and results in an Architecture established by the Object Management
interrupt. They can also be detected by Group. IBM′ s Interface Definition Language used to
language-specific generated code or language library describe the interface for SOM classes is fully
code. compliant with CORBA standards.
* condition. A status of a program at run time for * counter. A data item used for storing numbers or
which a truth value can be determined. Where the number representations in a manner that permits
term ‘condition’ (condition-1, condition-2,...) appears these numbers to be increased or decreased by the
in these language specifications in or in reference to value of another number, or to be changed or reset to
‘condition’ (condition-1, condition-2,...) of a general zero or to an arbitrary positive or negative value.
format, it is a conditional expression consisting of
either a simple condition optionally parenthesized, or cross-reference listing. The portion of the compiler
a combined condition consisting of the syntactically listing that contains information on where files, fields,
correct combination of simple conditions, logical and indicators are defined, referenced, and modified
operators, and parentheses, for which a truth value in a program.
can be determined.
currency sign. The character ‘$’ of the COBOL
* conditional expression. A simple condition or a character set or that character defined by the
complex condition specified in an EVALUATE, IF, CURRENCY compiler option. If the NOCURRENCY
PERFORM, or SEARCH statement. (See also “simple compiler option is in effect, the currency sign is
condition” and “complex condition.”) defined as the character ‘$’.
* conditional phrase. A conditional phrase specifies currency symbol. The character defined by the
the action to be taken upon determination of the truth CURRENCY compiler option or by the CURRENCY
value of a condition resulting from the execution of a SIGN clause in the SPECIAL-NAMES paragraph. If the
conditional statement. NOCURRENCY compiler option is in effect for a
COBOL source program and the CURRENCY SIGN
* conditional statement. A statement specifying that clause is also not present in the source program, the
the truth value of a condition is to be determined and currency symbol is identical to the currency sign.
that the subsequent action of the object program is
dependent on this truth value.
* declaratives. A set of one or more special purpose do-until. In structured programming, a do-until loop
sections, written at the beginning of the Procedure will be executed at least once, and until a given
Division, the first of which is preceded by the key condition is true. In COBOL, a TEST AFTER phrase
word DECLARATIVES and the last of which is followed used with the PERFORM statement functions in the
by the key words END DECLARATIVES. A declarative same way.
is composed of a section header, followed by a USE
compiler directing sentence, followed by a set of zero, do-while. In structured programming, a do-while loop
one, or more associated paragraphs. will be executed if, and while, a given condition is
Glossary 71
true. In COBOL, a TEST BEFORE phrase used with * elementary item. A data item that is described as
the PERFORM statement functions in the same way. not being further logically subdivided.
Double-Byte Character Set (DBCS). A set of enclave. When running under the Language
characters in which each character is represented by Environment product, an enclave is analogous to a
two bytes. Languages such as Japanese, Chinese, run unit. An enclave can create other enclaves on
and Korean, which contain more symbols than can be MVS and CMS by a LINK, on CMS by CMSCALL, and
represented by 256 code points, require Double-Byte the use of the system () function of C.
Character Sets. Because each character requires two
bytes, entering, displaying, and printing DBCS *end class header. A combination of words, followed
characters requires hardware and supporting software by a separator period, that indicates the end of a
that are DBCS-capable. COBOL class definition. The end class header is:
END CLASS class-name.
* dynamic access. An access mode in which specific
logical records can be obtained from or placed into a *end method header. A combination of words,
mass storage file in a nonsequential manner and followed by a separator period, that indicates the end
obtained from a file in a sequential manner during the of a COBOL method definition. The end method
scope of the same OPEN statement. header is:
element (text element). One logical unit of a string of environment variable. Any of a number of variables
text, such as the description of a single data item or that describe the way an operating system is going to
verb, preceded by a unique code identifying the run and the devices it is going to recognize.
element type.
execution time. See “run time.”
* external data record. A logical record which is * file control entry. A SELECT clause and all its
described in one or more programs of a run unit and subordinate clauses which declare the relevant
whose constituent data items may be referenced from physical attributes of a file.
any program in which they are described.
* file description entry. An entry in the File Section
external decimal item. A format for representing of the DATA DIVISION that is composed of the level
numbers in which the digit is contained in bits 4 indicator FD, followed by a file-name, and then
through 7 and the sign is contained in bits 0 through 3 followed by a set of file clauses as required.
of the rightmost byte. Bits 0 through 3 of all other
bytes contain 1’s (hex F). For example, the decimal * file-name. A user-defined word that names a file
value of +123 is represented as 1111 0001 1111 0010 connector described in a file description entry or a
1111 0011. (Also know as “zoned decimal item.”) sort-merge file description entry within the File
Section of the DATA DIVISION.
* external file connector. A file connector which is
accessible to one or more object programs in the run * file organization. The permanent logical file
unit. structure established at the time that a file is created.
external floating-point item. A format for *file position indicator. A conceptual entity that
representing numbers in which a real number is contains the value of the current key within the key of
represented by a pair of distinct numerals. In a reference for an indexed file, or the record number of
floating-point representation, the real number is the the current record for a sequential file, or the relative
product of the fixed-point part (the first numeral), and record number of the current record for a relative file,
a value obtained by raising the implicit floating-point or indicates that no next logical record exists, or that
base to a power denoted by the exponent (the second an optional input file is not present, or that the at end
numeral). condition already exists, or that no valid next record
has been established.
Glossary 73
* File Section. The section of the DATA DIVISION
that contains file description entries and sort-merge G
file description entries together with their associated
* global name. A name which is declared in only one
record descriptions.
program but which may be referenced from that
file system. The collection of files and file program and from any program contained within that
management structures on a physical or logical mass program. Condition-names, data-names, file-names,
storage device, such as a diskette or minidisk. record-names, report-names, and some special
registers may be global names.
* fixed file attributes. Information about a file which
is established when a file is created and cannot * group item. A data item that is composed of
subsequently be changed during the existence of the subordinate data items.
file. These attributes include the organization of the
file (sequential, relative, or indexed), the prime record
key, the alternate record keys, the code set, the
H
minimum and maximum record size, the record type
header label. (1) A file label or data set label that
(fixed or variable), the collating sequence of the keys
precedes the data records on a unit of recording
for indexed files, the blocking factor, the padding
media. (2) Synonym for beginning-of-file label.
character, and the record delimiter.
* high order end. The leftmost character of a string
* fixed length record. A record associated with a file
of characters.
whose file description or sort-merge description entry
requires that all records contain the same number of
character positions. I
fixed-point number. A numeric data item defined IBM COBOL extension. Certain COBOL syntax and
with a PICTURE clause that specifies the location of semantics supported by IBM compilers in addition to
an optional sign, the number of digits it contains, and those described in ANSI Standard.
the location of an optional decimal point. The format
may be either binary, packed decimal, or external IDENTIFICATION DIVISION. One of the four main
decimal. component parts of a COBOL program, class
definition, or method definition. The IDENTIFICATION
floating-point number. A numeric data item DIVISION identifies the program name, class name, or
containing a fraction and an exponent. Its value is method name. The IDENTIFICATION DIVISION may
obtained by multiplying the fraction by the base of the include the following documentation: author name,
numeric data item raised to the power specified by installation, or date.
the exponent.
* identifier. A syntactically correct combination of
* format. A specific arrangement of a set of data. character-strings and separators that names a data
item. When referencing a data item that is not a
* function. A temporary data item whose value is function, an identifier consists of a data-name,
determined at the time the function is referenced together with its qualifiers, subscripts, and
during the execution of a statement. reference-modifier, as required for uniqueness of
reference. When referencing a data item which is a
* function-identifier. A syntactically correct
function, a function-identifier is used.
combination of character-strings and separators that
references a function. The data item represented by IGZCBSN. The COBOL for MVS and VM bootstrap
a function is uniquely identified by a function-name routine. It must be link-edited with any module that
with its arguments, if any. A function-identifier may contains a COBOL for MVS and VM program.
include a reference-modifier. A function-identifier that
references an alphanumeric function may be specified * imperative statement. A statement that either
anywhere in the general formats that an identifier begins with an imperative verb and specifies an
may be specified, subject to certain restrictions. A unconditional action to be taken or is a conditional
function-identifier that references an integer or statement that is delimited by its explicit scope
numeric function may be referenced anywhere in the terminator (delimited scope statement). A n
general formats that an arithmetic expression may be imperative statement may consist of a sequence of
specified. imperative statements.
function-name. A word that names the mechanism * implicit scope terminator. A separator period which
whose invocation, along with required arguments, terminates the scope of any preceding unterminated
determines the value of a function. 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.
* index data item. A data item in which the values * input procedure. A set of statements, to which
associated with an index-name can be stored in a control is given during the execution of a SORT
form specified by the implementor. statement, for the purpose of controlling the release
of specified records to be sorted.
indexed data-name. An identifier that is composed of
a data-name, followed by one or more index-names instance data. Data defining the state of an object.
enclosed in parentheses. The instance data introduced by a class is defined in
the WORKING-STORAGE SECTION of the DATA
* indexed file. A file with indexed organization. DIVISION of the class definition. The state of an
object also includes the state of the instance
* indexed organization. The permanent logical file variables introduced by base classes that are
structure in which each record is identified by the inherited by the current class. A separate copy of the
value of one or more keys within that record. instance data is created for each object instance.
indexing. Synonymous with subscripting using * integer. (1) A numeric literal that does not include
index-names. any digit positions to the right of the decimal point.
* index-name. A user-defined word that names an (2) A numeric data item defined in the DATA DIVISION
index associated with a specific table. that does not include any digit positions to the right of
the decimal point.
* inheritance (for classes). A mechanism for using (3) A numeric function whose definition provides that
the implementation of one or more classes as the all digits to the right of the decimal point are zero in
basis for another class. A sub-class inherits from one the returned value for any possible evaluation of the
or more super-classes . By definition the inheriting function.
class conforms to the inherited classes.
integer function. A function whose category is
* initial program. A program that is placed into an numeric and whose definition does not include any
initial state every time the program is called in a run digit positions to the right of the decimal point.
unit.
interface. The information that a client must know to
* initial state. The state of a program when it is first use a class —the names of its attributes and the
called in a run unit. signatures of its methods . With direct-to-SOM
compilers such as COBOL, the interface to a class
inline. In a program, instructions that are executed may be defined by native language syntax for class
sequentially, without branching to routines, definitions. Classes implemented in other languages
subroutines, or other programs. might have their interfaces defined directly in SOM
Interface Definition Language (IDL). The COBOL
* input file. A file that is opened in the INPUT mode.
compiler has a compiler option, IDLGEN, to
automatically generate IDL for a COBOL class.
* input mode. The state of a file after execution of an
OPEN statement, with the INPUT phrase specified, for
Interface Definition Language (IDL). The formal
that file and before the execution of a CLOSE
language (independent of any programming language)
statement, without the REEL or UNIT phrase for that
by which the interface for a class of objects is defined
file.
in a IDL file, which the SOM compiler then interprets
to create an implementation template file and binding
* input-output file. A file that is opened in the I-O
files. SOM′s Interface Definition Language is fully
mode.
compliant with standards established by the Object
Management Group′s Common Object Request Broker
* INPUT-OUTPUT SECTION. The section of the
Architecture ( CORBA ).
ENVIRONMENT DIVISION that names the files and the
external media required by an object program or
interlanguage communication (ILC). The ability of
method and that provides information required for
routines written in different programming languages
transmission and handling of data during execution of
to communicate. ILC support allows the application
the object program or method definition.
writer to readily build applications from component
routines written in a variety of languages.
* Input-Output statement. A statement that causes
files to be processed by performing operations upon
intermediate result. An intermediate field containing
individual records or upon the file as a unit. The
the results of a succession of arithmetic operations.
input-output statements are: ACCEPT (with the
Glossary 75
* internal data. The data described in a program iteration structure. A program processing logic in
excluding all external data items and external file which a series of statements is repeated while a
connectors. Items described in the LINKAGE condition is true or until a condition is true.
SECTION of a program are treated as internal data.
* library text. A sequence of text words, comment * mass storage file. A collection of records that is
lines, the separator space, or the separator assigned to a mass storage medium.
pseudo-text delimiter in a COBOL library.
* megabyte (M). One megabyte equals 1,048,576
LILIAN DATE. The number of days since the bytes.
beginning of the Gregorian calendar. Day one is
Friday, October 15, 1582. The Lilian date format is * merge file. A collection of records to be merged by
named in honor of Luigi Lilio, the creator of the a MERGE statement. The merge file is created and
Gregorian calendar. can be used only by the merge function.
* LINAGE-COUNTER. A special register whose value metaclass. A SOM class whose instances are SOM
points to the current position within the page body. class-objects. The methods defined in metaclasses
are executed without requiring any object instances of
LINKAGE SECTION. The section in the DATA the class to exist, and are frequently used to create
DIVISION of the called program that describes data instances of the class.
items available from the calling program. These data
items may be referred to by both the calling and method. Procedural code that defines one of the
called program. operations supported by an object, and that is
executed by an INVOKE statement on that object.
literal. A character-string whose value is specified
either by the ordered set of characters comprising the * Method Definition. The COBOL source unit that
string, or by the use of a figurative constant. defines a method.
local. A set of attributes for a program execution * method identification entry. An entry in the
environment indicating culturally sensitive METHOD-ID paragraph of the IDENTIFICATION
considerations, such as: character code page, DIVISION which contains clauses that specify the
collating sequence, date/time format, monetary value method-name and assign selected attributes to the
representation, numeric value representation, or method definition.
language.
* method-name. A user-defined word that identifies a
* LOCAL-STORAGE SECTION. The section of the method.
DATA DIVISION that defines storage that is allocated
and freed on a per-invocation basis, depending on the * mnemonic-name. A user-defined word that is
value assigned in their VALUE clauses. associated in the ENVIRONMENT DIVISION with a
specified implementor-name.
* logical operator. One of the reserved words AND,
OR, or NOT. In the formation of a condition, either multitasking. Mode of operation that provides for the
AND, or OR, or both can be used as logical concurrent, or interleaved, execution of two or more
connectives. NOT can be used for logical negation. tasks. When running under the Language
Environment product, multitasking is synonymous with
* logical record. The most inclusive data item. The multithreading .
level-number for a record is 01. A record may be
either an elementary item or a group of items. The MVS/XA* (Multiple Virtual Storage/Extended
term is synonymous with record. Architecture). An IBM operating system that
manages multiple virtual address spaces in IBM
* low order end. The rightmost character of a string processors operating in extended architecture mode.
of characters. MVS/XA supports the 31-bit addressing mechanism of
extended architecture mode, and therefore, allows an
address space as large as 2 31 bytes (2048 megabytes
M or 2 gigabytes).
Glossary 77
* native collating sequence. The implementor-defined * numeric literal. A literal composed of one or more
collating sequence associated with the computer numeric characters that may contain either a decimal
specified in the OBJECT-COMPUTER paragraph. point, or an algebraic sign, or both. The decimal point
must not be the rightmost character. The algebraic
* negated combined condition. The ‘NOT’ logical sign, if present, must be the leftmost character.
operator immediately followed by a parenthesized
combined condition.
O
* negated simple condition. The ‘NOT’ logical
operator immediately followed by a simple condition. object. An entity that has state (its data values) and
operations (its methods). An object is a way to
nested program. A program that is directly contained encapsulate state and behavior.
within another program.
object code. Output from a compiler or assembler
* next executable sentence. The next sentence to that is itself executable machine code or is suitable
which control will be transferred after execution of the for processing to produce executable machine code.
current statement is complete.
* OBJECT-COMPUTER. The name of an
* next executable statement. The next statement to ENVIRONMENT DIVISION paragraph in which the
which control will be transferred after execution of the computer environment, within which the object
current statement is complete. program is executed, is described.
* next record. The record that logically follows the * object computer entry. An entry in the
current record of a file. OBJECT-COMPUTER paragraph of the ENVIRONMENT
DIVISION which contains clauses that describe the
* noncontiguous items. Elementary data items in the computer environment in which the object program is
WORKING-STORAGE and LINKAGE SECTIONs that to be executed.
bear no hierarchic relationship to other data items.
object deck. A portion of an object program suitable
* nonnumeric item. A data item whose description as input to a linkage editor. Synonymous with object
permits its content to be composed of any module and text deck .
combination of characters taken from the computer’s
character set. Certain categories of nonnumeric object module. Synonym for object deck or text deck .
items may be formed from more restricted character
sets. * object of entry. A set of operands and reserved
words, within a DATA DIVISION entry of a COBOL
* nonnumeric literal. A literal bounded by quotation program, that immediately follows the subject of the
marks. The string of characters may include any entry.
character in the computer’s character set.
* object program. A set or group of executable
null. Figurative constant used to assign the value of machine language instructions and other material
an invalid address to pointer data items. NULLS can designed to interact with data to provide problem
be used wherever NULL can be used. solutions. In this context, an object program is
generally the machine language result of the
* numeric character. A character that belongs to the operation of a COBOL compiler on a source program.
following set of digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. Where there is no danger of ambiguity, the word
‘program’ alone may be used in place of the phrase
numeric-edited item. A numeric item that is in such a ‘object program.’
form that it may be used in printed output. It may
consist of external decimal digits from 0 through 9, * object time. The time at which an object program is
the decimal point, commas, the dollar sign, editing executed. The term is synonymous with execution
sign control symbols, plus other editing symbols. time.
* numeric function. A function whose class and * obsolete element. A COBOL language element in
category are numeric but which for some possible Standard COBOL that is to be deleted from the next
evaluation does not satisfy the requirements of revision of Standard COBOL.
integer functions.
ODO object. In the example below,
* numeric item. A data item whose description
WORKING-STORAGE SECTION
restricts its content to a value represented by 01 TABLE-1.
characters chosen from the digits from ‘0’ through ‘9’; 05 X PICS9.
if signed, the item may also contain a ‘ + ’, ‘ − ’, or 05 Y OCCURS 3 TIMES
other representation of an operational sign. DEPENDING ON X PIC X.
Glossary 79
* phrase. A phrase is an ordered set of one or more performed procedures. Contained program procedure
consecutive COBOL character-strings that form a integration is the process where a CALL to a
portion of a COBOL procedural statement or of a contained program is replaced by the program code.
COBOL clause.
* procedure-name. A user-defined word that is used
* physical record. See “block.” to name a paragraph or section in the Procedure
Division. It consists of a paragraph-name (which may
pointer data item. A data item in which address be qualified) or a section-name.
values can be stored. Data items are explicitly
defined as pointers with the USAGE IS POINTER procedure-pointer data item. A data item in which a
clause. ADDRESS OF special registers are implicitly pointer to an entry point can be stored. A data item
defined as pointer data items. Pointer data items can defined with the USAGE IS PROCEDURE-POINTER
be compared for equality or moved to other pointer clause contains the address of a procedure entry
data items. point.
portability. The ability to transfer an application * program identification entry. An entry in the
program from one application platform to another PROGRAM-ID paragraph of the IDENTIFICATION
with relatively few changes to the source program. DIVISION which contains clauses that specify the
program-name and assign selected program
preloaded. In COBOL this refers to COBOL programs attributes to the program.
that remain resident in storage under IMS instead of
being loaded each time they are called. * program-name. In the IDENTIFICATION DIVISION
and the end program header, a user-defined word
* prime record key. A key whose contents uniquely that identifies a COBOL source program.
identify a record within an indexed file.
* pseudo-text. A sequence of text words, comment
* priority-number. A user-defined word which lines, or the separator space in a source program or
classifies sections in the Procedure Division for COBOL library bounded by, but not including,
purposes of segmentation. Segment-numbers may pseudo-text delimiters.
contain only the characters ′0′,′1′, ... , ′9′. A
segment-number may be expressed either as a one- * pseudo-text delimiter. Two contiguous equal sign
or two-digit number. characters (==) used to delimit pseudo-text.
* record area. A storage area allocated for the * relational operator. A reserved word, a relation
purpose of processing the record described in a character, a group of consecutive reserved words, or
record description entry in the File Section of the a group of consecutive reserved words and relation
DATA DIVISION. In the File Section, the current characters used in the construction of a relation
number of character positions in the record area is condition. The permissible operators and their
determined by the explicit or implicit RECORD clause. meanings are:
recursively capable. A program is recursively * relation character. A character that belongs to the
capable (can be called recursively) if the RECURSIVE following set:
attribute is on the PROGRAM-ID statement.
Character Meaning
reel. A discrete portion of a storage medium, the
dimensions of which are determined by each > greater than
implementor that contains part of a file, all of a file, or < less than
any number of files. The term is synonymous with = equal to
unit and volume.
Glossary 81
* relation condition. The proposition, for which a
truth value can be determined, that the value of an S
arithmetic expression, data item, nonnumeric literal,
SBCS (Single Byte Character Set). See ″ Single Byte
or index-name has a specific relationship to the value
Character Set (SBCS) ″ .
of another arithmetic expression, data item,
nonnumeric literal, or index name. (See also
scope terminator. A COBOL reserved word that
“relational operator.”)
marks the end of certain Procedure Division
statements. It may be either explicit (END-ADD, for
* relative file. A file with relative organization.
example) or implicit (separator period).
* relative key. A key whose contents identify a
* section. A set of zero, one or more paragraphs or
logical record in a relative file.
entities, called a section body, the first of which is
* relative organization. The permanent logical file preceded by a section header. Each section consists
structure in which each record is uniquely identified of the section header and the related section body.
by an integer value greater than zero, which specifies
* section header. A combination of words followed by
the record’s logical ordinal position in the file.
a separator period that indicates the beginning of a
* relative record number. The ordinal number of a section in the Environment, Data, and Procedure
record in a file whose organization is relative. This Divisions. In the ENVIRONMENT and DATA
number is treated as a numeric literal which is an DIVISIONs, a section header is composed of reserved
integer. words followed by a separator period. The
permissible section headers in the ENVIRONMENT
* reserved word. A COBOL word specified in the list DIVISION are:
of words that may be used in a COBOL source CONFIGURATION SECTION.
program, but that must not appear in the program as INPUT-OUTPUT SECTION.
user-defined words or system-names.
The permissible section headers in the DATA
* resource. A facility or service, controlled by the DIVISION are:
operating system, that can be used by an executing FILE SECTION.
program. WORKING-STORAGE SECTION.
LOCAL-STORAGE SECTION.
* resultant identifier. A user-defined data item that is LINKAGE SECTION.
to contain the result of an arithmetic operation.
In the Procedure Division, a section header is
composed of a section-name, followed by the
reusable environment. A reusable environment is
reserved word SECTION, followed by a separator
when you establish an assembler program as the
period.
main program by using either ILBOSTP0 programs,
IGZERRE programs, or the RTEREUS run-time option.
* section-name. A user-defined word that names a
section in the Procedure Division.
routine. A set of statements in a COBOL program
that causes the computer to perform an operation or
selection structure. A program processing logic in
series of related operations. In Language
which one or another series of statements is
Environment, refers to either a procedure, function, or
executed, depending on whether a condition is true or
subroutine.
false.
Glossary 83
sequences; and relating class-names to sets of * symbolic-character. A user-defined word that
characters. specifies a user-defined figurative constant.
* special registers. Certain compiler generated syntax. (1) The relationship among characters or
storage areas whose primary use is to store groups of characters, independent of their meanings
information produced in conjunction with the use of a or the manner of their interpretation and use. (2) The
specific COBOL feature. structure of expressions in a language. (3) The rules
governing the structure of a language. (4) The
* standard data format. The concept used in relationship among symbols. (5) The rules for the
describing the characteristics of data in a COBOL construction of a statement.
DATA DIVISION under which the characteristics or
properties of the data are expressed in a form * system-name. A COBOL word that is used to
oriented to the appearance of the data on a printed communicate with the operating environment.
page of infinite length and breadth, rather than a form
oriented to the manner in which the data is stored System Object Model (SOM). IBM′s object-oriented
internally in the computer, or on a particular external programming technology for building, packaging, and
medium. manipulating class libraries. SOM conforms to the
Object Management Group′s (OMG) Common Object
* statement. A syntactically valid combination of Request Broker Architecture (CORBA) standards.
words, literals, and separators, beginning with a verb,
written in a COBOL source program.
T
structured programming. A technique for organizing
and coding a computer program in which the program * table. A set of logically consecutive items of data
comprises a hierarchy of segments, each segment that are defined in the DATA DIVISION by means of
having a single entry point and a single exit point. the OCCURS clause.
Control is passed downward through the structure
without unconditional branches to higher levels of the * table element. A data item that belongs to the set
hierarchy. of repeated items comprising a table.
* sub-class. A class that inherits from another class. text deck. Synonym for object deck or object module .
When two classes in an inheritance relationship are
considered together, the sub-class is the inheritor or * text-name. A user-defined word that identifies
inheriting class; the super-class is the inheritee or library text.
inherited class.
* text word. A character or a sequence of contiguous
* subject of entry. An operand or reserved word that characters between margin A and margin R in a
appears immediately following the level indicator or COBOL library, source program, or in pseudo-text
the level-number in a DATA DIVISION entry. which is:
• A separator, except for: space; a pseudo-text
* subprogram. See “called program.” delimiter; and the opening and closing delimiters
for nonnumeric literals. The right parenthesis and
* subscript. An occurrence number represented by left parenthesis characters, regardless of context
either an integer, a data-name optionally followed by within the library, source program, or pseudo-text,
an integer with the operator + or -, or an index-name are always considered text words.
optionally followed by an integer with the operator +
• A literal including, in the case of nonnumeric
or -, that identifies a particular element in a table. A
subscript may be the word ALL when the subscripted literals, the opening quotation mark and the
identifier is used as a function argument for a function closing quotation mark that bound the literal.
allowing a variable number of arguments. • Any other sequence of contiguous COBOL
characters except comment lines and the word
* subscripted data-name. An identifier that is ‘COPY’ bounded by separators that are neither a
composed of a data-name followed by one or more separator nor a literal.
subscripts enclosed in parentheses.
top-down design. The design of a computer program
* super-class. A class that is inherited by another using a hierarchic structure in which related functions
class. See also sub-class . are performed at each level of the structure.
switch-status condition. The proposition, for which a top-down development. See “structured
truth value can be determined, that an UPSI switch, programming.”
capable of being set to an ‘on’ or ‘off’ status, has
been set to a specific status.
* unary operator. A plus (+) or a minus (-) sign, that * variably located item.. A data item following, and
precedes a variable or a left parenthesis in an not subordinate to, a variable-length table in the
arithmetic expression and that has the effect of same level-01 record.
multiplying the expression by +1 or -1, respectively.
* verb. A word that expresses an action to be taken
unit. A module of direct access, the dimensions of by a COBOL compiler or object program.
which are determined by IBM.
VM/SP (Virtual Machine/System Product). An
universal object reference. A data-name that can IBM-licensed program that manages the resources of
refer to an object of any class. a single computer so that multiple computing systems
appear to exist. Each virtual machine is the
* unsuccessful execution. The attempted execution of functional equivalent of a “real” machine.
a statement that does not result in the execution of all
the operations specified by that statement. The volume. A module of external storage. For tape
unsuccessful execution of a statement does not affect devices it is a reel; for direct-access devices it is a
any data referenced by that statement, but may affect unit.
status indicators.
volume switch procedures. System specific
UPSI switch. A program switch that performs the procedures executed automatically when the end of a
functions of a hardware switch. Eight are provided: unit or reel has been reached before end-of-file has
UPSI-0 through UPSI-7. been reached.
* variable. A data item whose value may be changed * WORKING-STORAGE SECTION. The section of the
by execution of the object program. A variable used DATA DIVISION that describes working storage data
in an arithmetic expression must be a numeric items, composed either of noncontiguous items or
elementary item. working storage records or of both.
Glossary 85
86 Micro Focus Dialog System to VisualAge COBOL
List of Abbreviations
ANSI American National Standards MF Micro Focus
Institute
PM presentation manager
DB2 Data Base 2 from IBM
UI user interface
DS Dialog System
VDE visual development
GUI graphical user interface environment
IBM International Business VSAM virtual storage access
Machines Corporation method
ITSO International Technical
Support Organization
Printed in U.S.A.
SG24-4887-00