Directory UMM :wiley:Public:college:cobol:
��#ࡱ#�################>###��
#############################_#######����########�������������������������������
��������������������������������������������������������������������������������
��������������������������������������������������������������������������������
��������������������������������������������������������������������������������
��������������������������������������������������������������������������������
��������������������������������������������������������������������������������
����a###########################
###
#######
##############################################################################
###!###"#######$###%#####'###(###)###*###+###,######.###/###0###1###2###3###4###5###6###7###8###9###:###;######?
###@###A###B###C###D###E###F###G###H###I###J###K###L###����N###O###P###Q###R###S
###T###U###V###W###X###Y###Z###[###\###]###^###���������������������������������
��������������������������������������������������������������������������������
�����������������������R#o#o#t#
#E#n#t#r#y#################################################��������#############
###################��J+
[�#`###�#######P#P#4#0#########################################################
###����####����########################################
�########S#u#m#m#a#r#y#I#n#f#o#r#m#a#t#i#o#n###########################(###�����
�������####################################M###t#######C#u#r#r#e#n#t#
#I#D#################################################������������###############
#################################�ޭ#####E###�#1#
�##f#�#(###(###y###[###########�#########################�##�###��#�###�#�#��##�
��#���###�##�###��#�###�#�#��##���#`````````````````````````````````````````````
````````````````################################################################
/h#`````````````````````````````````````````````````````````````################
################################################�D�```�`````````````````````````
```````````````````````````````o���###f#########################################
############"####�#```��f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�````
##�###h�o��o���fffffffffffffff�o�fffffffffffffffffffffffff
###���```�f�f�f�f�f�f�f�f�f�f�f�f�f�o�f�f�f�f�f�f�f�f�f�f�f�f�f````######jffffff
fffffffffffffffffffffffffffffffffffffffffffffff
###��```��f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�```n�#####hfffffff
ffffffffffffffffffffffffffffffffffffffffffffff
####��```�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f````#��###jffffff
fffffffffffffffffffffffffffffffffffffffffffffff"######```��f�f�f�f�f�f�f�f�f�f�f
�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�```h######hffffffffffffffffffffffffffffffffffffff
fffffffffffffff
######```�f�f������������������������������o�f�f�f�f�f�f````��####jfffffffffffff
ffffffffffffffffffffffffffffffffffffffff
######```��f�f����������������o���������o������o�o���f�f�````######hffffffffffff
fffffffffffffffffffffffffffffffffffffffff
######```�f�f������f������������������o��o���������f�f�f````�#�###jfffffffffffff
ffffffffffffffffffffffffffffffffffffffff"###�##b`b��f�f��������������������o�o��
�������������f�f�f�```o���###hffffffffffffffffffffffffffffffffffffffffffffffffff
fff
######```�f�f�o���o�o��o�����f��������������������������f�f�f````######jffffffff
fffffffffffffffffffffffffffffffffffffffffffff
######b`b��f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�```n��####hffffff
fffffffffffffffffffffffffffffffffffffffffffffff
###���```�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f````######jffffff
fffffffffff�fffffffffffffffffffffffffffffffffff"######f`f��f�f�f�o�o�o�f���o��o�
���o�f���o��o���f�f�f�f�````######hfffffffooo�o��oo�f��o����oo����of��o������fff
fffff
######`b`�f�f�f�f�o�f�f�f�o�f�o�f�f�f�f�f�o��f�f�f�f�f�f�f�f�f```g######jfffffff
ffffffffffffff�fffffffffffffffffffffffffffffff
######f`f��f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�````######hffffff
fffffffffffo��oo����o��oo��offffffffffffffffff
######bf`�f�f�f�f�f�f�f�f�f�f�������o�������f�f�f�f�f�f�f�f�f````######jffffffff
fffffffffo��fofff�o�f�offffffffffffffffffffff"######fbf��f�f�f�f�f�f�f�f�f�f�f�f
�f�f�f�f�f�f�f�f�f�f�f�f�f�f�````######hffffffffffffffffffffffffffffffffffffffff
fffffffffffff
######`fb�f�f�f�f�f�f�f�f�f�f�f�f��f�f�f�f�f�f�f�f�f�f�f�f�f�f````######jfffffff
fffffffffffff���oo����offfffffffffffffffffff
######fff��f�f�f�f�f�f�f�f�f�f��o�������f�f�f�f�f�f�f�f�f�f�````######hfffffffff
fffffffffff��fffffff��ffffffffffffffffffffff
######ffb�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f��f�f�f�f�f�f�f�f�f�f�f```o######jfffffff
ffffffffffffffffffffffffffffffffffffffffffffff"###���fff��f�f�f�f�f�f�f�f�f�f�f�
f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�````#####&hfffffffffffffffffffffffffffffff�ffffffo
�fffffffffffff
######bff�f�f�f�f�f�f�f����������o�f���f����o�f�f�f�f�f�f�f````######jffffffffff
foo�of�ofo��������f�o���o��ffffffffffff
######fff��f�f�f�f�f�f���f�f�o�f�f�f�f�f�f��f�f�f�f�f�f�f�f�f�````##�f#&hfffffff
fffffffffffffffffffffffffffff�ffffffffffffffff
######fff�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f````��#jfffffff
fffffffffff���ooof��o������ffffffffffffffffff"######fff��f�f�f�f�f�f�f�f�f�o����
�f������f�f�f�f�f�f�f�f�f�````##�fhffffffffffffffffff��f�ffofo�o��ffffffffffff
ffffffffff
#####�fff�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f```d####jffffff
fffffffffffffffffffffffffffffffffffffffffffffff
####��fff��f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�````###f&fhffffff
ffffffffffffffffffffffffffffoffffffffffffffffff
#####�fff�f�f�f�f�f�f�f�f�o���o��f���������f�f�f�f�f�f�f�f�f```o#��#f#jfffffffff
fffffffo���oo�of��������fffffffffffffffff"######fff��f�f�f�f�f�f�f�f�f�o�o�f���f
�f�f�f�f�f�f�f�f�f�f�f�f�```o�#f&fhffffffffffffffffffff�ffffffffffffffffffffffff
ffffffff
######fff�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f````##�&f&jffffff
ffffffffffffff�o��f�o��oooffffffffffffffffffff
####���ff��f�f�f�f�f�f�f�f�f�f�����f���o�f�f�f�f�f�f�f�f�f�f�````###fffhffffffff
ffffffffffffoofffffo��fffffffffffffffffffffff
####��fff�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f````###&f&jffffff
fffffffffffffffffffffffffffffffffffffffffffffff"####t#ff���f�f�f�f�f�f�f�f�f�f�f
�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�```h#8#fffhffffffffffffffffffffo�ffffffffffffffff
fffffffffffffff
####�#fff�f�f�f�f�f�f�f�f�f�o����������o�f�f�f�f�f�f�f�f�f�f```n#8#fffjfffffffff
fffffffffoo�������o���fffffffffffffffffff
####8#�f���f�f�f�f�f�f�f�f�f���f�o�f�f�o�f�f�f�f�f�f�f�f�f�f�f�```g#�#fffhffffff
ffffffffffffffffffffff�ffffffffffffffffffffffff
####8#f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f���f�f�f�f�f���f�f```h#8#fffjffffo�
��o��o���o��f���o�o�o�foof����o��������o�ffff"####�#�f���f�f�o��o�o�o�o���o�o���
o�o�f�o�������o��o�f�f�```h#8#fffhffffo��o�o�o���ofof�o��ooffo�o�o����o���o�ffff
##
#z#fff�f�f�o�f�f�f�f�f�f����o�o�o�f��f�f�f�f�f�f�f�f�f�f````#C#fffjfffffffffffff
ffffffffffffffffffffffffffffffffffffffff ##
#6#�f���f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�````#�#fffnfffffffff
fffffffffffffffffffffffffffffffffffffffffffn ##
#�#f�f����������������������������````###fff������������������������������������
�������������������######�f�f�f�f�f�f�f�ffffffffffffffffffbfff`f`f`b`b``````````
``````###fffffffffffffffff&f&f&f#f###################################fff�fff
�fff�ffffffffffffffffbfff`fbf`b`b`````````````````````###ffffffffffffff&f&f#
#####################################�f�f�f�f�f�f�fff�ffffffffffffffbfffbf`f
`f`b`b````````````````###
###��###�##��######�}######�}###8##�}####��$##"##��$#####��$## ##�#
%#####�5%#####�5%##�##�5%###��
%##"##�#####�E#`##�]####��####��#v##��##�3)##"##�Y)#####�{)##@##��
)#####��)#####��)#####��)###��,##"##�#-#####�5-##@##�M-#####��-#####��##�##��###�71##"##�]1#####�ࡱ1##@##��1#####��1#####��1#####��1###��5##"##�#6#####�96
##@##�Q6#####��6#####��6##�##��6###��9##"##��9#####��9##@##��9#####�/:#####�/:
#####�/:###�?>##"##�e>#####��>##@##��>#####��>#####��>##`##��>###�?
C##"##�eC#####��C##@##��C#####��C#####��C##L##��C###�+F##"##�QF#####�sF##`##��
F#####��F#####��F##Z##��F###�EJ##"##�kJ#####��J##`##��J#####�#K#####�#K##0##�#
K###�5M##"##�[M#####�}M##@##��M#####��M#####��M##4##��M###�
R##"##�/R#####�QR##@##�iR#####��R#####��R##�##��R###�cV##"##��V#####��V##`##��
V#####�#W#####�#W##�##�#W###�#[##"##�1[#####�S[##@##�k[#####��[#####��[##�##��
[###��^##"##��^#####��^##@##��^#####�!_#####�!_##.##�!
_###�Oa##"##�ua#####��a##@##��a#####��a#####��a##�##��a###�od##"##��d#####��
d##@##��d#####�#e#####�#e##�##�#e###��h##"##�#i#####�;i##`##�Si#####��i#####��
i##�##��i###�?
m##"##�em#####��m##`##��m#####��m#####��m#####��m###�#q##"##�=q#####�_q##@##�w
q#####��q#####��q##�##��q###��t##"##��t#####��t##@##�
u#####�Iu#####�Iu##�##�Iu###�5x##"##�[x#####�}x##@##��x#####��x#####��x##�##��
x###�}}##"##��}##�##��}#####�Uࡱ#####�kࡱ##�##��ࡱ#####�c�##�##�c�##z##�#�###��
�##`##���#####�#�#####�#�##�##�#�###� ##�#�#####�#�##"##ۇ
1�#####�#�##"##��###�]�##�##�]�#####�]�#####�;�##�##
##�I�#####�i�#####�i�##�##�i�###��##"##�#�#####�?
�#####�Q�#####�a�#####�{�#####���##�##���##N##�3�##v##���##v##��##$##�m�#####���
##"##���##�##�Ő##�##�c�#####�_�##�##�s�##########����##############AG�����
��############�##�
�># A���0�##�############�###
o2##`# �P#`#p#############�##d
�(##a#���#�#�#############�##�#�>####�###########3##�##���#f#�#��
###��#####��#��d#########d#2#######v###�Copyright
1997 John Wiley & Sons,
Inc... All rights reserved. Reproduction or translation of this work beyond that
permitted in Section 117 of the 1976 United States Copyright Act without the
express written permission of the copyright owner is unlawful. Request for
further information should be addressed to the Permissions Department, John
Wiley & Sons, Inc... The purchaser may make back-up copies for his/her own use
only and not for distribution or resale. The Publisher assumes no responsibility
for errors, omissions, or damages, caused by the use of these programs or from
the use of the information contained herein.�
#v#########v#####
###########v#########v##### #��d#########d#2#######r##�##
���
���$###��#####��#��d######3##d#############Structured COBOL Programming
#################$###
######################��#��d######3##d#########2##�##��M�F#���####��####T�n#��K#
#####0##d#########Z###
Eighth edition
Nancy Stern
Hofstra University
Robert A. Stern
Nassau Community College
Prepared by
Herbert Rebhun
University of Houston Downtown
#Z#######################################>########################
#####A##############b##############1############## #########
#######Z#############T#n###K######0##d#######R###T#n###K######0##d#######Z###T#n
###K######0##d#######�###T#n###K######0##d######################################
#######d#,####################5#################����##############AGg�@�
@�############�##4
?3################r##�##��]�M
#���,###��#####��#��d#########d###########`#���� -#############�##�#�=# A�g��� ##############�##T
?3####�###########r##�##��0�M
���,###��#####��#��d#########d#############Overview
#################,#########################��#��d#########d#########2##�##����M
�#��####��#####��#��d#########d#########�###Example-3Data such as accountnumber can be shared by objects within the class as well. This may be made
available to users for processing but may also be protected so that users can
enter and retrieve them, but not be able to change them.
#�#########
##############�#################�#########
###U#n###K#########d#######�####��#��d#########d#######Q###N####################
###�#O###P###�#�
M###R#################################����##############AGg�#�
��############�##�
�># A�g��
�#############�##�
O=####�###0#######r##�##��0�M
���,###��#####��#��d#########d#############Overview
#################,#########################��#��d#########d#########2##�##���M
s#��####��####U�n#��K#########d#########�###There are two types of data in
a class:INSTANCE VARIABLE--an object data and procedure that are unique for each
object in the class.FACTORY--data and procedures that are data shared by all
objects in the classFactory data must be set to its initial value using the
INITIALIZE verb or a VALUE
clause.METHODS can be two types:Object methods
unique to each object in the class.Factory methods shared by all objects in the
class.Objects are identified by unique names called OBJECT HANDLES
#�#########(#############################M########################
#####�#############################�########################
#######�#########(###U#n###K#########d#######^#####�#��d#########d#######N#####�
#��d#########d#######]#####�#��d#########d###########U#n###K#########d#######3##
###�#��d#########d#######4#####�#��d#########d######## A�g��
�#############�##T
?3####�###########r##�##��0�M
���,###��#####��#��d#########d#############Overview
#################,#########################��#��d#########d#########2##�##����M
�#��####��#####��#��d#########d#########�###POLYMORPHISM means a method
can be implemented differently depending on the object.Withdrawal, for example,
may be implemented: one way for objects like checking-account within the bankaccount class.a different way for objects in a credit-card class.The Interface
that links the Method to the object may be different but the service provided
will be similar.An INTERFACE is the entire set of messages to which an object
can respond along with the parameters required by each message.#
#�#########
##############d############## ##############r#########
#######�#########T###U#n###K#########d############�#��d#########d#######J#####�#��d#########d#######5#####�#��d#########d####
###m###U#n###K#########d#######~#####�#��d#########d#######_###\#############�##
###X#a#b#]###^###�##,[###`#################################����####
#########AGg�#�
��############�##�
�># A�7�p�##�#############�##
#,#0A# �p��
�#############�##|#�>�###X#####�#####2##�##Z���
s#��####��#####��#��d#########d#########�###Traditional Programming Terms1.
Procedures, functions, subroutines2. Data3. Procedure call or function call4.
Abstract data type5. Copy#
#�########################o#########
#######�#############U#n###K#########d#############�#��d#########d###########�
#��d#########d#############�#��d#########d#############�#��d#########d##########
###�#��d#########d#############�#��d#########d#########r##�##��0�M
���,###��#####��#��d#########d#############Overview
#################,###
######################��#��d#########d#########2##�##q���s#��####��#####��#��d##
#######d#########Z###Object-Oriented Terms1. Methods2. Instance variable 3.
Message4. Class5. Inheritance
#Z########################E#########
#######Z#############U#n###K#########d#############�#��d#########d#############�
#��d#########d#############�#��d#########d#############�#��d#########d#######
#####�#��d#########d#############�#��d#########d#######f###c###################h
###�#d###e###
##,b###g#################################����##############AGg�#�
��############�##�
�>##a#��#�` F#############�##�#?3D#########D#####3##�##��-�&
)#��####��#####��#��d#########d#############Object-Oriented Terms
Traditional
Programming Terms1. Methods
1. Procedures, functions,
subroutines2. Instance variable
2. Data3. Message
3.
Procedure call or
function call4. Class
4. Abstract data type5. Inheritance
5. Copy
###########:###############�###########################:####��#��d#########d####
########��#��d#########d#######8####��#��d#########d############��#��d#########d
#######6####��#��d#########d#######!
####��#��d#########d############��#��d#########d#########r##�##��0�M
���,###��#####��#��d#########d#############Overview #Analogiesi
#################,###
######################��#��d#########d#######m###j###########��w#####�#b#b#k###l
###�#�
i###n#################################����##############AGg�#�
��############�##�
�># A�g�p� �#############�##�#�>####�###########r##�##��0�M
���,###��#####��#��d#########d#############Overview
#################,#########################��#��d#########d#########2##�##���M
s#��####��####U�n#��K#########d#########�###ENCAPSULATION--the ability to
hide internal details of data and procedures while providing a public interface
through a user-defined messageBASE CLASS--a new class from an existing class
through INHERITANCE
#�#######################�##############
##############8#########
#######�#########�###U#n###K#########d#######B###U#n###K#########d#######t###q##
###########�#####X#a#b#r###s###\##,p###u#################################����###
###########AGg�#� ��############�##�
�># A�g�p� �#############�##t#�>####�###########r##�##��0�M
���,###��#####��#��d#########d#############Overview
#################,#########################��#��d#########d#########2##�##���M
s#��####��#####��#��d#########d#############Conceptually the
implementation of OO in COBOL begins using standard COBOL:The COPY statement
enables the copying of class definitions and objects into a program.The CALL
statement enables the sending of message to objects to get results.The INVOKE
statement may be used also.+
#####################
#################M###U#n###K#########d#######X#####�#��d#########d#######M#####�
#��d#########d#######'#####�#��d#########d#######{###x#############�#####X#a#b#y
###z###L#�
w###|#################################����##############AGg�#�
��############�##�
�># A�g��
�#############�##�#�>####�###########r##�##��0�M
���,###��#####��#��d#########d#############Overview
#################,#########################��#��d#########d#########2##�##���M
s#��####��#####��#��d#########d#########�###A COBOL Example:INVOKE
ASAVINGSACCOUNT �Withdraw� USING CUSTOMER-ACCT TRANS-AMT RETURNING ACCOUNT
�Withdraw� is a method.USING indicate the parameters to pass to the object.
RETURNING indicate the parameters passed back to the user program.Often you
begin establishing a new instance of an object from a class of objects.
MYSAVINGSACCOUNT may be an instance of ASAVINGSACCOUNT. This is called
INSTANTIATION.This many be coded as INVOKE ASAVINGSACCOUNT �New� RETURNING
MYSAVINGSACCOUNT.
#�#########�#############################O#########
#######�#############U#n###K#########d#######S#####�#��d#########d#############�
#��d#########d#######5#####�#��d#########d#######C#####�#��d#########d#######R##
#U#n###K#########d#######X#####�#��d#########d#######O#####�#��d#########d######
#�###ࡱ#############�#####X#a#b#�###�###4#�
~###�#################################����##############AGg�#�
��############�##�
�># A�g�P�
#�############�##\##,##`#���;###############�##\#wN####�###########r##�##��0�M
���,###��#####��#��d#########d#############Overview
#################,#########################��#��d#########d#########2##�##��m�M
���####��#####��#��d#########d#########m###PERSISTENCE is the ability for
changes to be retained after the program is terminated and when the program
executes it begins just as it ended.For objects within a class the following is
done in COBOLIDENTIFICATION DIVISION.FACTORY.ENVIRONMENT DIVISION.DATA DIVISION.
PROCEDURE DIVISION. END FACTORY.#
#m########################b################m#####
###�###U#n###K#########d#######:###U#n###K#########d#############�#��d#########d
#######
#####�#��d#########d#############�#��d#########d#############�#��d#########d####
#########�#��d#########d#############�#��d#########d#############�#��d#########d
#######
#####�#��d#########d#######�###�#########################�###�###|#�
�###�#################################����##############AGg�#�
��############�##�
�># A�g�#� ��############�##�
?3##`# � ��
Z#############�##�#wN####�###########r##�##��0�M
���,###��#####��#��d#########d#############Overview
#################,#########################��#��d#########d#########2##�##��-�M
���####��#####��#��d#########d######### ###To define methods and data
unique to a specific object the following COBOL is written::IDENTIFICATION
DIVISION.OBJECT. ENVIRONMENT DIVISION.
DATA DIVISION.
PROCEDURE DIVISION.
END OBJECT.
#
#########
################ #####
###Z###U#n###K#########d###########T#n###K#########d#############�#��d#########d
#######0#####�#��d#########d#############�#��d#########d#############�#��d######
###d#############�#��d#########d#############�#��d#########d#############�#��d##
#######d#############�#��d#########d#######�###�#########################�###�##
#�#�
�###�#################################����##############AGg�#�
��############�##,#wN# A�g�p� �#############�####�
####�###########r##�##��0�M
���,###��#####��#��d#########d#############OBJECTORIENTED COBOL PRODUCTS
#################,#########################��#��d#########d#########2##�##���M
s#��####��#####��#��d#########d#########"###The following companies and
products have incorporated OO options into their COBOL compilersSOFTWARE
DEVELOPER
PRODUCTMicro Focus
Object COBOLIBM
Visual Age for COBOLComputer Associates
Visual Realia COBOL
Netron, Inc....
Netron/FusionTechBridge Technology
TechBridge Builder
#"#########"#########
#######"#########]###U#n###K#########d###########U#n###K#########d#############�
#��d#########d#############�#��d#########d#######)#####�#��d#########d#######
#####�#��d#########d#######)#####�#��d#########d#######�###�####################
###`#�###�###T#�
�###�#################################����##############AGg�#�
��############�##|#G## A�g�p�
�#############�##�#G#####�###########r##�##��0�M
���,###��#####��#��d#########d#########$###TUTORIAL FOR OO COBOL BY MICRO
FOCUS
#$#########$#####,##########$#########$####��#��d#########d#########2##�##���M
s#��####��#####��#��d#########d#############Lesson OneIntroduces the Class
Browser which works with a project file.Permits you to look at source code and
edit your choices for use.Lesson TwoPermits working with an Object and a Class
Lesson ThreePermits the Passing of a Parameter to an Object and Returning a
Value.
#####################
#####################U#n###K#########d#######>#####�#��d#########d#######D#####�
#��d#########d###########U#n###K#########d#######+#####�#��d#########d#######
###U#n###K#########d#######F#####�#��d#########d#######�###�#############w#####�
#b#b#�###�###<
�
�###�#########G=######################����####
#########AGg�#�
��############�##,#wN# A�g�#�
#############�#################E###############L###############S
###############Z###############a###############h###############o###############v
###############}###############�###############�###############�###############�
###############�###############�#########�##############,##NU####����####
#########################################AGg�#� ��############�##T#G## A�g�p�
�#############�##�#G###!##��#3�#############�##T#G###!
#��#�#�#############�##�#G###�#f��#z#�#############�###
G#############################
###################################
###��w�5�#�############4
G#####
###� q�
��#
##########T G#####
###��t�
��#
##########t G#####
###����.�#############� G#####
###� ��#
�##
##########� G#####
###��G#
�#############�
G#####
###5����
D##
##########�###########��p�@�#��p�#�p���#�@�####X
��
#�
��X
��X
��
#�####+��
��+�� ��V
�����#####�#�p�##�#�p�p�p� ##�#####�
��#
�##
���
#��
C##
�######�P#� �##�#�
�#�
P#`�P#�###:#####�#####q##�##S��#��h#��####��#####��#��d#########d#########
###STERN/COBOL8e#
########################################��#��d#########d#########q##�##
%#�#�#h#��####��#####��#��d#########d###############
############################################��#��d#########d#########9#P###���#@
#t#��####��#####��#��d#########d#############18-�
############################################��#��d#########d#########r##�##��0�M
���,###��#####��#��d#########d######### ###Click to edit Master title
style
# ######### #####,########## ######### ####��#��d#########d#########2##�##���M
s#��####��#####��#��d#########d#########R###Click to edit Master text
stylesSecond LevelThird LevelFourth LevelFifth Level
#R#########R################R#########!###U#n###K#########d#######
#####�#��d#########d#######
#####�#��d#########d#######
#####�#��d#########d#############�#��d#########d#######�###�####################
#####�###�#### A���p�0#�
############�##$#�4A###`�p�#�############�########!#I#G
E###############�##
�4####�#####�#####q##�##�#d
##�
��####��#####��#��d#########d###############
############################################��#��d#########d#########2##�##
��#s ��
###��#####��#��d#########d#########S###Click to edit Master notes stylesSecond
LevelThird LevelFourth LevelFifth Level#
#S#########S#####
###########S#########"####��###d#########d###########��###d#########d#######
####��###d#########d#######
####��###d#########d############��###d#########d#######�###�#########��#########
#####�###�###�
#,�###�###�#####�3##�3############NU####����####
#########!#I#G
E###############�##�#�4##########�#####q##�##�#d
##�
��####��#####��#��d#########d###############
############################################��#��d#########d#######�###�########
#����############�###�###�#,�#######�#######################NU####����####
#########!#I#G
E###############�##�#�4##########�#####q##�##�#d
##�
��####��#####��#��d#########d###############
############################################��#��d#########d#######�###�########
#����############�###�###|#,�#######�###########=*#########�J��.##�ࡱ######�3�###
#�"2�$|##,#### # #@#@#`#`#�#�###@###�###�# #�#@#�#`###�###@####��(�.##�ࡱ#######@
%#�#####�########�####'############��#,######�!######'##'u##�.###'
######�.�###�� #���>ح##�m{c���@c�p��##�S�K;###����X#������Y#########
#�###
###############################################################`#####�##########
####################
#
#|
#################;###����X#������Y#######'#����##O#7�##��##���{�IM#�Ծ������@c�p�
�##############################d#d#d#######7#�#######X#������Y#########h�h�h�Y##
#####D#Ga[���3####�####��##�(##������#�##�.##�ࡱ######�3##�###########�###|
#,L
#,�
#,##r##�##,##########,##########,##########,##########,###
######��#��d#########d############��#��d#########d############��#��d#########d##
##########��#��d#########d############��#��d#########d#############2##�######
############################################
#####U#n###K#########d#############�#��d#########d#############�#��d#########d##
###########�#��d#########d#############�#��d#########d#############2##�##
###########
###########
###########
###########
##########��#��d#########d############��#��d#########d############��#��d########
#d############��#��d#########d############��#��d#########d###########��2##�#####
#########################################################�###d#########d###��###
#####�###d#########d###��########�###d#########d###��########�###d#########d###�
�########�###d#########d###��########3##�#######################################
######################��#��d#########d############��#��d#########d############��
#��d#########d############��#��d#########d############��#��d#########d##########
#####################0#0############�##�.##�ࡱ##@###�3##########�#########Times
New Roman####
######�ZE#�7######+#]###############�########"Arial#�Z�#_8�?
#############################_#######����########�������������������������������
��������������������������������������������������������������������������������
��������������������������������������������������������������������������������
��������������������������������������������������������������������������������
��������������������������������������������������������������������������������
��������������������������������������������������������������������������������
����a###########################
###
#######
##############################################################################
###!###"#######$###%#####'###(###)###*###+###,######.###/###0###1###2###3###4###5###6###7###8###9###:###;######?
###@###A###B###C###D###E###F###G###H###I###J###K###L###����N###O###P###Q###R###S
###T###U###V###W###X###Y###Z###[###\###]###^###���������������������������������
��������������������������������������������������������������������������������
�����������������������R#o#o#t#
#E#n#t#r#y#################################################��������#############
###################��J+
[�#`###�#######P#P#4#0#########################################################
###����####����########################################
�########S#u#m#m#a#r#y#I#n#f#o#r#m#a#t#i#o#n###########################(###�����
�������####################################M###t#######C#u#r#r#e#n#t#
#I#D#################################################������������###############
#################################�ޭ#####E###�#1#
�##f#�#(###(###y###[###########�#########################�##�###��#�###�#�#��##�
��#���###�##�###��#�###�#�#��##���#`````````````````````````````````````````````
````````````````################################################################
/h#`````````````````````````````````````````````````````````````################
################################################�D�```�`````````````````````````
```````````````````````````````o���###f#########################################
############"####�#```��f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�````
##�###h�o��o���fffffffffffffff�o�fffffffffffffffffffffffff
###���```�f�f�f�f�f�f�f�f�f�f�f�f�f�o�f�f�f�f�f�f�f�f�f�f�f�f�f````######jffffff
fffffffffffffffffffffffffffffffffffffffffffffff
###��```��f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�```n�#####hfffffff
ffffffffffffffffffffffffffffffffffffffffffffff
####��```�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f````#��###jffffff
fffffffffffffffffffffffffffffffffffffffffffffff"######```��f�f�f�f�f�f�f�f�f�f�f
�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�```h######hffffffffffffffffffffffffffffffffffffff
fffffffffffffff
######```�f�f������������������������������o�f�f�f�f�f�f````��####jfffffffffffff
ffffffffffffffffffffffffffffffffffffffff
######```��f�f����������������o���������o������o�o���f�f�````######hffffffffffff
fffffffffffffffffffffffffffffffffffffffff
######```�f�f������f������������������o��o���������f�f�f````�#�###jfffffffffffff
ffffffffffffffffffffffffffffffffffffffff"###�##b`b��f�f��������������������o�o��
�������������f�f�f�```o���###hffffffffffffffffffffffffffffffffffffffffffffffffff
fff
######```�f�f�o���o�o��o�����f��������������������������f�f�f````######jffffffff
fffffffffffffffffffffffffffffffffffffffffffff
######b`b��f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�```n��####hffffff
fffffffffffffffffffffffffffffffffffffffffffffff
###���```�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f````######jffffff
fffffffffff�fffffffffffffffffffffffffffffffffff"######f`f��f�f�f�o�o�o�f���o��o�
���o�f���o��o���f�f�f�f�````######hfffffffooo�o��oo�f��o����oo����of��o������fff
fffff
######`b`�f�f�f�f�o�f�f�f�o�f�o�f�f�f�f�f�o��f�f�f�f�f�f�f�f�f```g######jfffffff
ffffffffffffff�fffffffffffffffffffffffffffffff
######f`f��f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�````######hffffff
fffffffffffo��oo����o��oo��offffffffffffffffff
######bf`�f�f�f�f�f�f�f�f�f�f�������o�������f�f�f�f�f�f�f�f�f````######jffffffff
fffffffffo��fofff�o�f�offffffffffffffffffffff"######fbf��f�f�f�f�f�f�f�f�f�f�f�f
�f�f�f�f�f�f�f�f�f�f�f�f�f�f�````######hffffffffffffffffffffffffffffffffffffffff
fffffffffffff
######`fb�f�f�f�f�f�f�f�f�f�f�f�f��f�f�f�f�f�f�f�f�f�f�f�f�f�f````######jfffffff
fffffffffffff���oo����offfffffffffffffffffff
######fff��f�f�f�f�f�f�f�f�f�f��o�������f�f�f�f�f�f�f�f�f�f�````######hfffffffff
fffffffffff��fffffff��ffffffffffffffffffffff
######ffb�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f��f�f�f�f�f�f�f�f�f�f�f```o######jfffffff
ffffffffffffffffffffffffffffffffffffffffffffff"###���fff��f�f�f�f�f�f�f�f�f�f�f�
f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�````#####&hfffffffffffffffffffffffffffffff�ffffffo
�fffffffffffff
######bff�f�f�f�f�f�f�f����������o�f���f����o�f�f�f�f�f�f�f````######jffffffffff
foo�of�ofo��������f�o���o��ffffffffffff
######fff��f�f�f�f�f�f���f�f�o�f�f�f�f�f�f��f�f�f�f�f�f�f�f�f�````##�f#&hfffffff
fffffffffffffffffffffffffffff�ffffffffffffffff
######fff�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f````��#jfffffff
fffffffffff���ooof��o������ffffffffffffffffff"######fff��f�f�f�f�f�f�f�f�f�o����
�f������f�f�f�f�f�f�f�f�f�````##�fhffffffffffffffffff��f�ffofo�o��ffffffffffff
ffffffffff
#####�fff�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f```d####jffffff
fffffffffffffffffffffffffffffffffffffffffffffff
####��fff��f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�````###f&fhffffff
ffffffffffffffffffffffffffffoffffffffffffffffff
#####�fff�f�f�f�f�f�f�f�f�o���o��f���������f�f�f�f�f�f�f�f�f```o#��#f#jfffffffff
fffffffo���oo�of��������fffffffffffffffff"######fff��f�f�f�f�f�f�f�f�f�o�o�f���f
�f�f�f�f�f�f�f�f�f�f�f�f�```o�#f&fhffffffffffffffffffff�ffffffffffffffffffffffff
ffffffff
######fff�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f````##�&f&jffffff
ffffffffffffff�o��f�o��oooffffffffffffffffffff
####���ff��f�f�f�f�f�f�f�f�f�f�����f���o�f�f�f�f�f�f�f�f�f�f�````###fffhffffffff
ffffffffffffoofffffo��fffffffffffffffffffffff
####��fff�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f````###&f&jffffff
fffffffffffffffffffffffffffffffffffffffffffffff"####t#ff���f�f�f�f�f�f�f�f�f�f�f
�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�```h#8#fffhffffffffffffffffffffo�ffffffffffffffff
fffffffffffffff
####�#fff�f�f�f�f�f�f�f�f�f�o����������o�f�f�f�f�f�f�f�f�f�f```n#8#fffjfffffffff
fffffffffoo�������o���fffffffffffffffffff
####8#�f���f�f�f�f�f�f�f�f�f���f�o�f�f�o�f�f�f�f�f�f�f�f�f�f�f�```g#�#fffhffffff
ffffffffffffffffffffff�ffffffffffffffffffffffff
####8#f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f���f�f�f�f�f���f�f```h#8#fffjffffo�
��o��o���o��f���o�o�o�foof����o��������o�ffff"####�#�f���f�f�o��o�o�o�o���o�o���
o�o�f�o�������o��o�f�f�```h#8#fffhffffo��o�o�o���ofof�o��ooffo�o�o����o���o�ffff
##
#z#fff�f�f�o�f�f�f�f�f�f����o�o�o�f��f�f�f�f�f�f�f�f�f�f````#C#fffjfffffffffffff
ffffffffffffffffffffffffffffffffffffffff ##
#6#�f���f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�````#�#fffnfffffffff
fffffffffffffffffffffffffffffffffffffffffffn ##
#�#f�f����������������������������````###fff������������������������������������
�������������������######�f�f�f�f�f�f�f�ffffffffffffffffffbfff`f`f`b`b``````````
``````###fffffffffffffffff&f&f&f#f###################################fff�fff
�fff�ffffffffffffffffbfff`fbf`b`b`````````````````````###ffffffffffffff&f&f#
#####################################�f�f�f�f�f�f�fff�ffffffffffffffbfffbf`f
`f`b`b````````````````###
###��###�##��######�}######�}###8##�}####��$##"##��$#####��$## ##�#
%#####�5%#####�5%##�##�5%###��
%##"##�#####�E#`##�]####��####��#v##��##�3)##"##�Y)#####�{)##@##��
)#####��)#####��)#####��)###��,##"##�#-#####�5-##@##�M-#####��-#####��##�##��###�71##"##�]1#####�ࡱ1##@##��1#####��1#####��1#####��1###��5##"##�#6#####�96
##@##�Q6#####��6#####��6##�##��6###��9##"##��9#####��9##@##��9#####�/:#####�/:
#####�/:###�?>##"##�e>#####��>##@##��>#####��>#####��>##`##��>###�?
C##"##�eC#####��C##@##��C#####��C#####��C##L##��C###�+F##"##�QF#####�sF##`##��
F#####��F#####��F##Z##��F###�EJ##"##�kJ#####��J##`##��J#####�#K#####�#K##0##�#
K###�5M##"##�[M#####�}M##@##��M#####��M#####��M##4##��M###�
R##"##�/R#####�QR##@##�iR#####��R#####��R##�##��R###�cV##"##��V#####��V##`##��
V#####�#W#####�#W##�##�#W###�#[##"##�1[#####�S[##@##�k[#####��[#####��[##�##��
[###��^##"##��^#####��^##@##��^#####�!_#####�!_##.##�!
_###�Oa##"##�ua#####��a##@##��a#####��a#####��a##�##��a###�od##"##��d#####��
d##@##��d#####�#e#####�#e##�##�#e###��h##"##�#i#####�;i##`##�Si#####��i#####��
i##�##��i###�?
m##"##�em#####��m##`##��m#####��m#####��m#####��m###�#q##"##�=q#####�_q##@##�w
q#####��q#####��q##�##��q###��t##"##��t#####��t##@##�
u#####�Iu#####�Iu##�##�Iu###�5x##"##�[x#####�}x##@##��x#####��x#####��x##�##��
x###�}}##"##��}##�##��}#####�Uࡱ#####�kࡱ##�##��ࡱ#####�c�##�##�c�##z##�#�###��
�##`##���#####�#�#####�#�##�##�#�###� ##�#�#####�#�##"##ۇ
1�#####�#�##"##��###�]�##�##�]�#####�]�#####�;�##�##
##�I�#####�i�#####�i�##�##�i�###��##"##�#�#####�?
�#####�Q�#####�a�#####�{�#####���##�##���##N##�3�##v##���##v##��##$##�m�#####���
##"##���##�##�Ő##�##�c�#####�_�##�##�s�##########����##############AG�����
��############�##�
�># A���0�##�############�###
o2##`# �P#`#p#############�##d
�(##a#���#�#�#############�##�#�>####�###########3##�##���#f#�#��
###��#####��#��d#########d#2#######v###�Copyright
1997 John Wiley & Sons,
Inc... All rights reserved. Reproduction or translation of this work beyond that
permitted in Section 117 of the 1976 United States Copyright Act without the
express written permission of the copyright owner is unlawful. Request for
further information should be addressed to the Permissions Department, John
Wiley & Sons, Inc... The purchaser may make back-up copies for his/her own use
only and not for distribution or resale. The Publisher assumes no responsibility
for errors, omissions, or damages, caused by the use of these programs or from
the use of the information contained herein.�
#v#########v#####
###########v#########v##### #��d#########d#2#######r##�##
���
���$###��#####��#��d######3##d#############Structured COBOL Programming
#################$###
######################��#��d######3##d#########2##�##��M�F#���####��####T�n#��K#
#####0##d#########Z###
Eighth edition
Nancy Stern
Hofstra University
Robert A. Stern
Nassau Community College
Prepared by
Herbert Rebhun
University of Houston Downtown
#Z#######################################>########################
#####A##############b##############1############## #########
#######Z#############T#n###K######0##d#######R###T#n###K######0##d#######Z###T#n
###K######0##d#######�###T#n###K######0##d######################################
#######d#,####################5#################����##############AGg�@�
@�############�##4
?3################r##�##��]�M
#���,###��#####��#��d#########d###########`#���� -#############�##�#�=# A�g��� ##############�##T
?3####�###########r##�##��0�M
���,###��#####��#��d#########d#############Overview
#################,#########################��#��d#########d#########2##�##����M
�#��####��#####��#��d#########d#########�###Example-3Data such as accountnumber can be shared by objects within the class as well. This may be made
available to users for processing but may also be protected so that users can
enter and retrieve them, but not be able to change them.
#�#########
##############�#################�#########
###U#n###K#########d#######�####��#��d#########d#######Q###N####################
###�#O###P###�#�
M###R#################################����##############AGg�#�
��############�##�
�># A�g��
�#############�##�
O=####�###0#######r##�##��0�M
���,###��#####��#��d#########d#############Overview
#################,#########################��#��d#########d#########2##�##���M
s#��####��####U�n#��K#########d#########�###There are two types of data in
a class:INSTANCE VARIABLE--an object data and procedure that are unique for each
object in the class.FACTORY--data and procedures that are data shared by all
objects in the classFactory data must be set to its initial value using the
INITIALIZE verb or a VALUE
clause.METHODS can be two types:Object methods
unique to each object in the class.Factory methods shared by all objects in the
class.Objects are identified by unique names called OBJECT HANDLES
#�#########(#############################M########################
#####�#############################�########################
#######�#########(###U#n###K#########d#######^#####�#��d#########d#######N#####�
#��d#########d#######]#####�#��d#########d###########U#n###K#########d#######3##
###�#��d#########d#######4#####�#��d#########d######## A�g��
�#############�##T
?3####�###########r##�##��0�M
���,###��#####��#��d#########d#############Overview
#################,#########################��#��d#########d#########2##�##����M
�#��####��#####��#��d#########d#########�###POLYMORPHISM means a method
can be implemented differently depending on the object.Withdrawal, for example,
may be implemented: one way for objects like checking-account within the bankaccount class.a different way for objects in a credit-card class.The Interface
that links the Method to the object may be different but the service provided
will be similar.An INTERFACE is the entire set of messages to which an object
can respond along with the parameters required by each message.#
#�#########
##############d############## ##############r#########
#######�#########T###U#n###K#########d############�#��d#########d#######J#####�#��d#########d#######5#####�#��d#########d####
###m###U#n###K#########d#######~#####�#��d#########d#######_###\#############�##
###X#a#b#]###^###�##,[###`#################################����####
#########AGg�#�
��############�##�
�># A�7�p�##�#############�##
#,#0A# �p��
�#############�##|#�>�###X#####�#####2##�##Z���
s#��####��#####��#��d#########d#########�###Traditional Programming Terms1.
Procedures, functions, subroutines2. Data3. Procedure call or function call4.
Abstract data type5. Copy#
#�########################o#########
#######�#############U#n###K#########d#############�#��d#########d###########�
#��d#########d#############�#��d#########d#############�#��d#########d##########
###�#��d#########d#############�#��d#########d#########r##�##��0�M
���,###��#####��#��d#########d#############Overview
#################,###
######################��#��d#########d#########2##�##q���s#��####��#####��#��d##
#######d#########Z###Object-Oriented Terms1. Methods2. Instance variable 3.
Message4. Class5. Inheritance
#Z########################E#########
#######Z#############U#n###K#########d#############�#��d#########d#############�
#��d#########d#############�#��d#########d#############�#��d#########d#######
#####�#��d#########d#############�#��d#########d#######f###c###################h
###�#d###e###
##,b###g#################################����##############AGg�#�
��############�##�
�>##a#��#�` F#############�##�#?3D#########D#####3##�##��-�&
)#��####��#####��#��d#########d#############Object-Oriented Terms
Traditional
Programming Terms1. Methods
1. Procedures, functions,
subroutines2. Instance variable
2. Data3. Message
3.
Procedure call or
function call4. Class
4. Abstract data type5. Inheritance
5. Copy
###########:###############�###########################:####��#��d#########d####
########��#��d#########d#######8####��#��d#########d############��#��d#########d
#######6####��#��d#########d#######!
####��#��d#########d############��#��d#########d#########r##�##��0�M
���,###��#####��#��d#########d#############Overview #Analogiesi
#################,###
######################��#��d#########d#######m###j###########��w#####�#b#b#k###l
###�#�
i###n#################################����##############AGg�#�
��############�##�
�># A�g�p� �#############�##�#�>####�###########r##�##��0�M
���,###��#####��#��d#########d#############Overview
#################,#########################��#��d#########d#########2##�##���M
s#��####��####U�n#��K#########d#########�###ENCAPSULATION--the ability to
hide internal details of data and procedures while providing a public interface
through a user-defined messageBASE CLASS--a new class from an existing class
through INHERITANCE
#�#######################�##############
##############8#########
#######�#########�###U#n###K#########d#######B###U#n###K#########d#######t###q##
###########�#####X#a#b#r###s###\##,p###u#################################����###
###########AGg�#� ��############�##�
�># A�g�p� �#############�##t#�>####�###########r##�##��0�M
���,###��#####��#��d#########d#############Overview
#################,#########################��#��d#########d#########2##�##���M
s#��####��#####��#��d#########d#############Conceptually the
implementation of OO in COBOL begins using standard COBOL:The COPY statement
enables the copying of class definitions and objects into a program.The CALL
statement enables the sending of message to objects to get results.The INVOKE
statement may be used also.+
#####################
#################M###U#n###K#########d#######X#####�#��d#########d#######M#####�
#��d#########d#######'#####�#��d#########d#######{###x#############�#####X#a#b#y
###z###L#�
w###|#################################����##############AGg�#�
��############�##�
�># A�g��
�#############�##�#�>####�###########r##�##��0�M
���,###��#####��#��d#########d#############Overview
#################,#########################��#��d#########d#########2##�##���M
s#��####��#####��#��d#########d#########�###A COBOL Example:INVOKE
ASAVINGSACCOUNT �Withdraw� USING CUSTOMER-ACCT TRANS-AMT RETURNING ACCOUNT
�Withdraw� is a method.USING indicate the parameters to pass to the object.
RETURNING indicate the parameters passed back to the user program.Often you
begin establishing a new instance of an object from a class of objects.
MYSAVINGSACCOUNT may be an instance of ASAVINGSACCOUNT. This is called
INSTANTIATION.This many be coded as INVOKE ASAVINGSACCOUNT �New� RETURNING
MYSAVINGSACCOUNT.
#�#########�#############################O#########
#######�#############U#n###K#########d#######S#####�#��d#########d#############�
#��d#########d#######5#####�#��d#########d#######C#####�#��d#########d#######R##
#U#n###K#########d#######X#####�#��d#########d#######O#####�#��d#########d######
#�###ࡱ#############�#####X#a#b#�###�###4#�
~###�#################################����##############AGg�#�
��############�##�
�># A�g�P�
#�############�##\##,##`#���;###############�##\#wN####�###########r##�##��0�M
���,###��#####��#��d#########d#############Overview
#################,#########################��#��d#########d#########2##�##��m�M
���####��#####��#��d#########d#########m###PERSISTENCE is the ability for
changes to be retained after the program is terminated and when the program
executes it begins just as it ended.For objects within a class the following is
done in COBOLIDENTIFICATION DIVISION.FACTORY.ENVIRONMENT DIVISION.DATA DIVISION.
PROCEDURE DIVISION. END FACTORY.#
#m########################b################m#####
###�###U#n###K#########d#######:###U#n###K#########d#############�#��d#########d
#######
#####�#��d#########d#############�#��d#########d#############�#��d#########d####
#########�#��d#########d#############�#��d#########d#############�#��d#########d
#######
#####�#��d#########d#######�###�#########################�###�###|#�
�###�#################################����##############AGg�#�
��############�##�
�># A�g�#� ��############�##�
?3##`# � ��
Z#############�##�#wN####�###########r##�##��0�M
���,###��#####��#��d#########d#############Overview
#################,#########################��#��d#########d#########2##�##��-�M
���####��#####��#��d#########d######### ###To define methods and data
unique to a specific object the following COBOL is written::IDENTIFICATION
DIVISION.OBJECT. ENVIRONMENT DIVISION.
DATA DIVISION.
PROCEDURE DIVISION.
END OBJECT.
#
#########
################ #####
###Z###U#n###K#########d###########T#n###K#########d#############�#��d#########d
#######0#####�#��d#########d#############�#��d#########d#############�#��d######
###d#############�#��d#########d#############�#��d#########d#############�#��d##
#######d#############�#��d#########d#######�###�#########################�###�##
#�#�
�###�#################################����##############AGg�#�
��############�##,#wN# A�g�p� �#############�####�
####�###########r##�##��0�M
���,###��#####��#��d#########d#############OBJECTORIENTED COBOL PRODUCTS
#################,#########################��#��d#########d#########2##�##���M
s#��####��#####��#��d#########d#########"###The following companies and
products have incorporated OO options into their COBOL compilersSOFTWARE
DEVELOPER
PRODUCTMicro Focus
Object COBOLIBM
Visual Age for COBOLComputer Associates
Visual Realia COBOL
Netron, Inc....
Netron/FusionTechBridge Technology
TechBridge Builder
#"#########"#########
#######"#########]###U#n###K#########d###########U#n###K#########d#############�
#��d#########d#############�#��d#########d#######)#####�#��d#########d#######
#####�#��d#########d#######)#####�#��d#########d#######�###�####################
###`#�###�###T#�
�###�#################################����##############AGg�#�
��############�##|#G## A�g�p�
�#############�##�#G#####�###########r##�##��0�M
���,###��#####��#��d#########d#########$###TUTORIAL FOR OO COBOL BY MICRO
FOCUS
#$#########$#####,##########$#########$####��#��d#########d#########2##�##���M
s#��####��#####��#��d#########d#############Lesson OneIntroduces the Class
Browser which works with a project file.Permits you to look at source code and
edit your choices for use.Lesson TwoPermits working with an Object and a Class
Lesson ThreePermits the Passing of a Parameter to an Object and Returning a
Value.
#####################
#####################U#n###K#########d#######>#####�#��d#########d#######D#####�
#��d#########d###########U#n###K#########d#######+#####�#��d#########d#######
###U#n###K#########d#######F#####�#��d#########d#######�###�#############w#####�
#b#b#�###�###<
�
�###�#########G=######################����####
#########AGg�#�
��############�##,#wN# A�g�#�
#############�#################E###############L###############S
###############Z###############a###############h###############o###############v
###############}###############�###############�###############�###############�
###############�###############�#########�##############,##NU####����####
#########################################AGg�#� ��############�##T#G## A�g�p�
�#############�##�#G###!##��#3�#############�##T#G###!
#��#�#�#############�##�#G###�#f��#z#�#############�###
G#############################
###################################
###��w�5�#�############4
G#####
###� q�
��#
##########T G#####
###��t�
��#
##########t G#####
###����.�#############� G#####
###� ��#
�##
##########� G#####
###��G#
�#############�
G#####
###5����
D##
##########�###########��p�@�#��p�#�p���#�@�####X
��
#�
��X
��X
��
#�####+��
��+�� ��V
�����#####�#�p�##�#�p�p�p� ##�#####�
��#
�##
���
#��
C##
�######�P#� �##�#�
�#�
P#`�P#�###:#####�#####q##�##S��#��h#��####��#####��#��d#########d#########
###STERN/COBOL8e#
########################################��#��d#########d#########q##�##
%#�#�#h#��####��#####��#��d#########d###############
############################################��#��d#########d#########9#P###���#@
#t#��####��#####��#��d#########d#############18-�
############################################��#��d#########d#########r##�##��0�M
���,###��#####��#��d#########d######### ###Click to edit Master title
style
# ######### #####,########## ######### ####��#��d#########d#########2##�##���M
s#��####��#####��#��d#########d#########R###Click to edit Master text
stylesSecond LevelThird LevelFourth LevelFifth Level
#R#########R################R#########!###U#n###K#########d#######
#####�#��d#########d#######
#####�#��d#########d#######
#####�#��d#########d#############�#��d#########d#######�###�####################
#####�###�#### A���p�0#�
############�##$#�4A###`�p�#�############�########!#I#G
E###############�##
�4####�#####�#####q##�##�#d
##�
��####��#####��#��d#########d###############
############################################��#��d#########d#########2##�##
��#s ��
###��#####��#��d#########d#########S###Click to edit Master notes stylesSecond
LevelThird LevelFourth LevelFifth Level#
#S#########S#####
###########S#########"####��###d#########d###########��###d#########d#######
####��###d#########d#######
####��###d#########d############��###d#########d#######�###�#########��#########
#####�###�###�
#,�###�###�#####�3##�3############NU####����####
#########!#I#G
E###############�##�#�4##########�#####q##�##�#d
##�
��####��#####��#��d#########d###############
############################################��#��d#########d#######�###�########
#����############�###�###�#,�#######�#######################NU####����####
#########!#I#G
E###############�##�#�4##########�#####q##�##�#d
##�
��####��#####��#��d#########d###############
############################################��#��d#########d#######�###�########
#����############�###�###|#,�#######�###########=*#########�J��.##�ࡱ######�3�###
#�"2�$|##,#### # #@#@#`#`#�#�###@###�###�# #�#@#�#`###�###@####��(�.##�ࡱ#######@
%#�#####�########�####'############��#,######�!######'##'u##�.###'
######�.�###�� #���>ح##�m{c���@c�p��##�S�K;###����X#������Y#########
#�###
###############################################################`#####�##########
####################
#
#|
#################;###����X#������Y#######'#����##O#7�##��##���{�IM#�Ծ������@c�p�
�##############################d#d#d#######7#�#######X#������Y#########h�h�h�Y##
#####D#Ga[���3####�####��##�(##������#�##�.##�ࡱ######�3##�###########�###|
#,L
#,�
#,##r##�##,##########,##########,##########,##########,###
######��#��d#########d############��#��d#########d############��#��d#########d##
##########��#��d#########d############��#��d#########d#############2##�######
############################################
#####U#n###K#########d#############�#��d#########d#############�#��d#########d##
###########�#��d#########d#############�#��d#########d#############2##�##
###########
###########
###########
###########
##########��#��d#########d############��#��d#########d############��#��d########
#d############��#��d#########d############��#��d#########d###########��2##�#####
#########################################################�###d#########d###��###
#####�###d#########d###��########�###d#########d###��########�###d#########d###�
�########�###d#########d###��########3##�#######################################
######################��#��d#########d############��#��d#########d############��
#��d#########d############��#��d#########d############��#��d#########d##########
#####################0#0############�##�.##�ࡱ##@###�3##########�#########Times
New Roman####
######�ZE#�7######+#]###############�########"Arial#�Z�#_8�?