CHAP08.PPT 112KB Jun 05 2011 09:30:18 PM
��#ࡱ#�################>###��
#####################################����############���������������������������
��������������������������������������������������������������������������������
��������������������������������������������������������������������������������
��������������������������������������������������������������������������������
��������������������������������������������������������������������������������
��������������������������������������������������������������������������������
��###�###�###�###�###�###�###�###�###�###�###�###�###�###�###�###�###�###�###�##
#�###�###�###�###�###�###�###�###�###�###�###�###�###�###�###�###�###�###�###�##
#�###�###�###�###�###�###�###�###�###�###�###�###�###�###�###�###�###�###�###�##
#�###�###�###�###�###�###�###�###�###�###�###�###�###�###�����###�###�###�###�##
#�###�###�###�###�###�###�###�###�###�###�###�###�������������������������������
��������������������������������������������������������������������������������
����������������������������������ޭ#####E###C#1#ш##f#B#(###(###y###[###########�
#########################�##�###��#�###�#�#��##���#���###�##�###��#�###�#�#��##�
��#`````````````````````````````````````````````````````````````################
###################################################`````````````````````````````
````````````````````````````````
############################################################
```�`````````````````````````````````````````````````````````
N###f#####################################################"##R#o#o#t#
#E#n#t#r#y#################################################��������#############
###################`�
���#####�#######O#b#j#e#c#t#1###################################################
######################�######F####
�4���#@;�###�###############h#################����####
#########AGg�#�
��############�##|
�=# A�g�p� �#############�##��=####�###########r##�##��0�M
���$###��#####��#��d#########d#########H###Ending Conditional Sentences
with a Period or an END-IF Scope Terminator
#H#########H#####$###########H#########H####��#��d#########d#########2##�##���M
s#��####��####T�n#��K#########d#########�###With COBOL 85 you should use
the END-IF as a scope terminator to establish the specific boundaries.IF PRICE1
IS LESS THAN PRICE2
ADD PRICE1 TO TOTAL
MOVE 2 TO ITEM1ELSE
ADD PRICE2 TO
TOTALEND-IF MOVE 0 TO ITEM2.#
#�#########�#################�#########d###U#n###K#########d###########T#n###K##
#######d###########T#n###K#########d###########T#n###K#########d###########T#n##
#K#########d###########T#n###K#########d###########T#n###K#########d###########T
#n###K#########d#######�###�#############�#####X#a#b#�###�###�
�>�###�###############i#################����####
#########AG#�#�
��############�##|
�=# A�g�p� �#############�##�#�=####�###U�######r##�##J�0��
���$###��#####��#��d#########d#########$###The CONTINUE or NEXT SENTENCE
Clause
#$#########$#####$###########$#########$####��#��d#########d#########2##�##���M
s#��####��#####�n#��d#########d#########>###There are times when you might
want to execute a series of steps only if a certain condition does not exist.
The COBOL expression CONTINUE (COBOL 85) or NEXT SENTENCE (COBOL 74) will enable
you:(1) to avoid performing any operation if a condition exists(2) to execute
instructions only if the ELSE condition is met.
#>#########>#################>#########n###U#n###K#########d#######V###U#n###K##
#######d############n###d#########d#######�###�####
###################�
�###�###�#�>�###�#################################����####
#########AG@� �`
�############�##�#�1####���
#�#############�##############�#######r##�##z�=�&
#��,###��#####��#��d#########d#########
#####################################����############���������������������������
��������������������������������������������������������������������������������
��������������������������������������������������������������������������������
��������������������������������������������������������������������������������
��������������������������������������������������������������������������������
��������������������������������������������������������������������������������
��###�###�###�###�###�###�###�###�###�###�###�###�###�###�###�###�###�###�###�##
#�###�###�###�###�###�###�###�###�###�###�###�###�###�###�###�###�###�###�###�##
#�###�###�###�###�###�###�###�###�###�###�###�###�###�###�###�###�###�###�###�##
#�###�###�###�###�###�###�###�###�###�###�###�###�###�###�����###�###�###�###�##
#�###�###�###�###�###�###�###�###�###�###�###�###�������������������������������
��������������������������������������������������������������������������������
����������������������������������ޭ#####E###C#1#ш##f#B#(###(###y###[###########�
#########################�##�###��#�###�#�#��##���#���###�##�###��#�###�#�#��##�
��#`````````````````````````````````````````````````````````````################
###################################################`````````````````````````````
````````````````````````````````
############################################################
```�`````````````````````````````````````````````````````````
N###f#####################################################"##R#o#o#t#
#E#n#t#r#y#################################################��������#############
###################`�
���#####�#######O#b#j#e#c#t#1###################################################
######################�######F####
�4���#@;�###�###############h#################����####
#########AGg�#�
��############�##|
�=# A�g�p� �#############�##��=####�###########r##�##��0�M
���$###��#####��#��d#########d#########H###Ending Conditional Sentences
with a Period or an END-IF Scope Terminator
#H#########H#####$###########H#########H####��#��d#########d#########2##�##���M
s#��####��####T�n#��K#########d#########�###With COBOL 85 you should use
the END-IF as a scope terminator to establish the specific boundaries.IF PRICE1
IS LESS THAN PRICE2
ADD PRICE1 TO TOTAL
MOVE 2 TO ITEM1ELSE
ADD PRICE2 TO
TOTALEND-IF MOVE 0 TO ITEM2.#
#�#########�#################�#########d###U#n###K#########d###########T#n###K##
#######d###########T#n###K#########d###########T#n###K#########d###########T#n##
#K#########d###########T#n###K#########d###########T#n###K#########d###########T
#n###K#########d#######�###�#############�#####X#a#b#�###�###�
�>�###�###############i#################����####
#########AG#�#�
��############�##|
�=# A�g�p� �#############�##�#�=####�###U�######r##�##J�0��
���$###��#####��#��d#########d#########$###The CONTINUE or NEXT SENTENCE
Clause
#$#########$#####$###########$#########$####��#��d#########d#########2##�##���M
s#��####��#####�n#��d#########d#########>###There are times when you might
want to execute a series of steps only if a certain condition does not exist.
The COBOL expression CONTINUE (COBOL 85) or NEXT SENTENCE (COBOL 74) will enable
you:(1) to avoid performing any operation if a condition exists(2) to execute
instructions only if the ELSE condition is met.
#>#########>#################>#########n###U#n###K#########d#######V###U#n###K##
#######d############n###d#########d#######�###�####
###################�
�###�###�#�>�###�#################################����####
#########AG@� �`
�############�##�#�1####���
#�#############�##############�#######r##�##z�=�&
#��,###��#####��#��d#########d#########