CHAP07.PPT 126KB Jun 05 2011 09:30:18 PM

��#ࡱ#�################>###��
#############################�#######����############���������������������������
��������������������������������������������������������������������������������
��������������������������������������������������������������������������������
��������������������������������������������������������������������������������
��������������������������������������������������������������������������������
��������������������������������������������������������������������������������
�����###���####################
###
#######

##############################################################################
###!###"#######$###%###&###'###(###)###*###+###,######.###/###0###1###2###3###4###5###6###7###8###9###:###;######?
###@###A###B###C###D###E###F###G###H###I###J###K###L###M###N###O###P###Q###R###S
###T###U###V###W###X###Y###Z###[###\###]###^###_###`###a###b###c###d###e###f###g
###h###i###j###k###l###m###n###o###p###q###r###s###t###u###v###w###x###y###z###{
###|###}###~###ࡱ###�###R#o#o#t#
#E#n#t#r#y#################################################��������#############
###################��;���#�###�#######P#P#4#0###################################
######################
###������������########################################k�########S#u#m#m#a#r#y#I

#n#f#o#r#m#a#t#i#o#n###########################(#######��������#################
###################�###�%######C#u#r#r#e#n#t#
#I#D#########################################################����###############
#################################�###�###�###�###�###�###�###�###�###�###�###�##
#�###�###�###�###�###�###�###�###�###�###�###�###�###�###�###�###�###�###�###�##
#�###�###�###�###�###�###�###�###�###�###�###�###�###�###�###�###�###�###�###�##
#�###�###�###�###�###�###�###�###�###�###�###�###�###�###�###�###�###�###�###�##
#�###�###�###�###�###�###�###�###�###�###�###�###�###�###�###�###�###�###�###�##
#�###�###�###�###�###�###�###�����###�###�###�###�###�###�###�###�###�###�###�##
#�###�###�###�###�###�###�����������������������������������������ޭ#####E###�#1#
k�##f#�#(###(###y###[###########�#########################�##�###��#�###�#�#��##
���#���###�##�###��#�###�#�#��##���#````````````````````````````````````````````
`````````````````###############################################################
####````````````````````````````````````````````````````````````hth
#############################################################
```�````````````````````````````````````````````````````````assa###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�```l##

###hff�o��������ffffffffffooofffffffffffffffffffffffffff

######```�f����������f�f�f�f�f�f��f�f�f�f�f�f�f�f�f�f�f�f�f�f```c######jffffffff
fffffffffffffffffffffffffffffffffffffffffffff
######```��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�```irig###hffffff
fffffffffffffffffffffffffffffffffffffffffffffff ###.
R```�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
in###jfffffffffffffffffffffffffffffffffffffffffffffffffffff"###the```��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�```el.
###hfffffffffffffffffffffffffffffffffffffffffffffffffffff
###rmi```�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```er
m###jfffffffffffffffffffffffffffffffffffffffffffffffffffff
###ist```��f�f�����������o����o���f�f�f�f�f�f�f�f�f�f�f�f�```for
###hfffffffffffffffffffffffffffffffffffffffffffffffffffff
###gra```�f�f�f������o���������������������������f�f�f�f````######jfffffffffffff
ffffffffffffffffffffffffffffffffffffffff"######b`b��f�f�����f��o���o�o����������
����f�f�f�f�f�f�````######hfffffffffffffffffffffffffffffffffffffffffffffffffffff
######```�f�f�f���������������������o�����o�����f�f�f�f�f````######jffffffffffff
fffffffffffffffffffffffffffffffffffffffff
######b`b��f�f���������������o�����o�����o��������f�f�f�f�```l#�9###hfffffffffff
ffffffffffffffffffffffffffffffffffffffffff
####*�```�f�f�f���������o�����f�f��o���������������f�f�f�f�f````#*�###jfffffffff

ffffffffffffffffffffffffffffffffffffffffffff"####

#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�```g9#####hfffffffffff
ffffffffffffffffffffffffffffffffffffffffff ##

`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�f```l

###jfffffffo�oo�����of�oof��o��oofo�o�o�o�o���ffffffff
####(#f`f��f�f�f�o�o��������o�����o���o�f��������f�f�f�f�```o######hfffffffoofff
ffffofffoof�fffoffffo��ffff�fffffffffffff
####$#bf`�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"####$#fbf��f�f�f�f�f�f�f�f�f��o�
������o��o�f�f�f�f�f�f�f�f�```h######hffffffffffffffffffof��o����f������ffffffff
fffffffff
######`fb�f�f�f�f�f�f�f�f�f�o��o�f����f�f�f�f�f�f�f�f�f�f�f```h######jffffffffff
fffffffffffffffffffffffffffffffffffffffffff ##
###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�```c######hfffffffff
fffffffffffffffo�ffffff�ffffffffffffffffffff
####,#ffb�f�f�f�f�f�f�f�f�f�f�f���o�����o�f�f�f�f�f�f�f�f�f�f```f#$####jffffffff
fffffffffffff��o������ffffffffffffffffffff"######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�```d#(###&hffffffffffffffffffffffffffffff��ffffffffffff
fffffffff
######bff�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�o�f�f�f�f�f�f```h######jffffff
fffffffof�����f���f�f�oooof���ooofffffffffff
######fff��f�f�f�f�f�f�o�����o�f�o������������o���f�f�f�f�f�```h###f#&hfffffffff
fffff��ffffff�fffffffffoff�ff�ffffffffffffff
######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```g#(##&#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�````#H#&#fhfffffffffffffffffff���ooof��o������fff
ffffffffffffff ######fff�f�f�f�f�f�f�f�f�f�f�o�����f�����f�f�f�f�f�f�f�f�f```l

#&#jfffffffffffffffffff��f�ffofo�o��fffffffffffffffffffff
####@#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
fffffffffffffffffffffffffffffffffffffffffffffff
###�#fff�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�f�o�f�f�f�f�f�f�f�f�f````####f#jfffffff
fffffffffof���oo�����o����fffffffffffffffff"######fff��f�f�f�f�f�f�f�f����o�f���
��o����f�f�f�f�f�f�f�f�````###f&fhffffffffffffffffof�f�offf��fffffff�fffffffffff
fffffff #####

fff�f�f�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```o���&f&jffffffffffff

ffffffffffffffoffffffffffffffffffffffffff
######�ff��f�f�f�f�f�f�f�f�f�f��������o�o�f�f�f�f�f�f�f�f�f�```o0h#fffhfffffffff
ffffffffffff�o����f���o�fffffffffffffffffff ####V
fff�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```j###&f&jfffffffffffff
ffffffffffffffffffffffffffffffffffffffff"###

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�````#�#fffhffffffffffff
fffffffffo�ffffffffffffffffffffffffffffff
####8#fff�f�f�f�f�f�f�f�f�f�f���o������o���f�f�f�f�f�f�f�f�f```h#8#fffjfffffffff
ffffffffff�o������o���ffffffffffffffffff
####J#�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#�#fffhfffffff
ffffffffffffffffffffff�fffffffffffffffffffffff ##
#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�f�f```g#�#fffjfffffffff
fffffffffffffffffffffffffo�ffffffffffo�fffff"####8#�f���f�o���o�����������o�o�o�
f�o����o�����������f�f�```h#^#fffhffffo�oo�ooo�o���ofof�oo�ooffoo��o�f���oo�ooof
ffff
######fff�f�f���o�o�o���o�o����o�f�o�o�o��������o�f�f�f```m#�#fffjfffo�fffffffff
fff�f���o�o�offo�ffffffffffff�ffffffff
######�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#�


fffnffffffffffffffffffffffffffffffffffffffffffffffffffffn
####��f�f����������������������������```l

fff�������������������������������������������������������####

�f�f�f�f�f�f�f�ffffffffffffffffffbfff`f`f`b`b```````````````l

fffffffffffffffff&f&f&f#&#f###&#############################

#fff�fff�fff�ffffffffffffffffbfff`fbf`b`b````````````````````j###ffffffffffffff&
f&&#f#&#&#&####################################

�f�f�f�f�f�f�fff�ffffffffffffffbfffbf`f`f`b`b```````````````l

####��.##`##��.#####�5/#####�5/##N##�5/##&##��4##"##��4#####��4##
##��4#####�#5#####�#5##�##�#5##&##��5##"##��5#####�!
6##@##�96#####�y6#####�y6##�##�y6##&##�Y8##"##�ࡱ8#####��8##@##��8#####��8#####��
8##8##��8##&##�1F###K###############�#################����####

#########`#����

##############�##|#wD##`#���� :#############�##|#wD##AGg���
��############�##�##;# A�g��
�#############�#####;####�###########r##�##��#�M
���$###��#####��#��d#########d############ADD STATEMENTW

###############$########################��#��d#########d#########2##�##���M
�#��####��####U�n#��K#########d#########�###Deciding Whether to Use the TO
or GIVING Format Use the GIVING format with the ADD statement when the contents
of operands are to be retained. When you will no longer need the original
contents of an operand after the addition, the TO format may be used.D

#�#########1###############�#################�#########1###U#n###K#########d####
###�###U#n###K#########d#######Q###N#########################O###P###t##?
M###R###############D#################����####

#########AGg���

��############�##�#�9# A�g�� �#############�####�9####�###

#######r##�##��#�M


���$###��#####��#��d#########d############ADD STATEMENT#

###############$########################��#��d#########d#########2##�##���M
�#��####��####T�n#��K#########d######�##O###INTERPRETING FORMATS1.
Underlined words are required.2. Uppercase word are COBOL reserved words.3. The
word �identifier� means a field or record defined in the DATA DIVISION.4. The
braces {} mean that one of the enclosed words is required.5. The ellipses or
dots (..) indicate that two or more fields or literals may be specified.#

#O#########O#################O#############U#n###K#########d#######"###T#n###K##
#######d######�,###T#n###K#########d######�O###T#n###K#########d######�B###T#n##
#K#########d######�[###T#n###K#########d######�X###U###################)###�#V##
#W###T##?T###Y###############�#################����####

#########AGp���

��############�####ࡱ2# A�p��

#############�##


##4####�###########r##�##����V
###ADD STATEMENT#

���$###��#####��#��d#########d######�##

###############$########################��#��d#########d######�##2##�##���V
##��####��####U�n#��K#########d#########h###Adding More Than Two FieldsAs
you can see from the instruction formats, you are not restricted to two operands
when using an ADD operation. Example 7ADD AMT1
AMT2
AMT3
GIVING AMT4 The original contents of AMT4, the resultant field,
are destroyed and have no effect on the ADD operation. The three operands AMT1,
AMT2, and AMT3 are unchanged.

#h#########################L#################h#############U#n###K#########d####
###{#####�#��d#########d#######
#####�#��d#########d#######
#####�#��d#########d#######

#####�#��d#########d#############�#��d#########d#######�###U#n###K#########d####
###_###\#########################]###^###�##?
[###`###############P#################����####

#########a#����P
��############�##�#�>##a#��#�0
#4##AGg��� ��############�##

0#############�##�

##4# A�g��� �#############�##\
#4####�###########3##�##����#
��#############��#��d#########d#############A

############################################��#��d#########d#########3##�###���###��####��#####��#��d#########d############# x

############################################��#��d#########d#########r##�##��#�M
���$###��#####��#��d#########d############ADD STATEMENT#

###############$########################��#��d#########d#########2##�##����M

�#��####��####U�n#��K#########d#########�###Example 8 ADD
AMT1
AMT2
AMT3 TO AMT4AMT1, AMT2, and AMT3 are added to the
original contents of AMT4. The result is placed in AMT4. AMT1, AMT2, AMT3 are
unchanged just as in the GIVING option.p

#�#########
##############################################�#################�#########
###U#n###K#########d#######
#####�#��d#########d#############�#��d#########d#############�#��d#########d####
###�###U#n###K#########d#######f###c#########################d###e###>###�#####>#####3##�###�}� �#��####��#####��#��d#########d#########
###

#
#########
#################
##############��#��d#########d############��#��d#########d############��#��d####
#####d############��#��d#########d############��#��d#########d############��#��d
#########d############��#��d#########d#########r##�##��@�M
���$###��#####��#��d#########d######### ###SELF-TESTe

#

#########
#####$########### #########
####��#��d#########d#########2##�##���M
�#��####��####U�n#��K#########d#########o###Indicate the errors, if any,
in Statements 1 and 21. ADD '12' TO TOTALSOLUTION: �12� is not a numeric
literal#

#o#########3###############################'#################o#########3###U#n##
#K#########d###########T#n###K#########d#######'###U#n###K#########d#######{###x
#########################y###z###�##?w###|
#################################����####

#########AGg�S�
#�############�##�##;# A�g��
�#############�##$##;####�###########r##�##��p�M
#��$###��#####��#��d#########d######### ###SELF-TEST

#

#########
#####$########### #########
####��#��d#########d#########2##�##���M
�##############��#��d#########d#########�###2. ADD TAX TO TOTAL GIVING AMT
SOLUTION:-- For COBOL 85, the statement is okay; for COBOL 74, the words TO and
GIVING may not appear in the same ADD statement.

#�#########################�#################�##############��#��d#########d####
###�###U#n###K#########d#######�###ࡱ#########################�###�###|##?
~###�###############�#################����####

#########AGg�#�
��############�##�##;# A�g��
�#############�##�##;####�###########r##�##��@�M
���$###��#####��#��d#########d######### ###SELF-TESTf

#

#########
#####$########### #########
####��#��d#########d#########2##�##���M
�#��####��####U�n#��K#########d#########�###3. If ADD 1 15 3 TO COUNTER is
performed and COUNTER is initialized at 10, the sum of _____ will be placed
in______ at the end of the operationSOLUTION:--29; COUNTER

#�#########�#################################�#########�###T#n###K#########d####
#######U#n###K#########d#######�###�###################�###�#�###�###� #?
�###�###############�#################����####

#########AGg�#�
��############�##�##;##`##��0 (#############�##\
wD##�#v�v#?#�#############�##D#wD# A�g�P� p#############�##|
##;####�###########r##�##��@�M
���$###��#####��#��d#########d#########
###SELF-TEST

#
#########
#####$###########
#########
####��#��d#########d#########2##�##��m�M
S#��####��####U�n#��K#########d#########G###4. Without using the word TO,
write a statement equivalent to the one in Question 3.SOLUTION:-- ADD 1 15 3
COUNTER GIVING WS-AREA1. In this case, the result is placed in WS-AREA1 and
COUNTER remains unchanged. The arithmetic is, however, the same as in the
previous problem. ADD 1 15 3 COUNTER GIVING COUNTER is also correct.r

#G#########V###############�#################G#########U####��#��d#########d####
#!######��#��d#########d#####!
#�###U#n###K#########d#######�###�#########################�###�###|
#?�###�#################################����####

#########AGg�#�
��############�##�##;# A�g��
�#############�##D##;####�###########r##�##��@�M
���$###��#####��#��d#########d######### ###SELF-TESTl

#

#########
#####$########### #########
####��#��d#########d#########2##�##���M
�##############��#��d#########d#########i###5. If ADD 1 15 3 GIVING
COUNTER is performed, ______will be the result in _____.SOLUTION:--19; COUNTER#

#i#########i#################i#########Q###T#n###K#########d###########U#n###K##
#######d#######�###�#############�######�###�###�###�
#?�###�###############�#################����####

#########AGg���
��############�##�#�9# A�g��� �#############�##�#�9##`#��#�
�#############�##�#�=####�###########r##�##��#�M
���$###��#####��#��d#########d#############SUBTRACT STATEMENT

#################$##########################��#��d#########d#########2##�##����M
�##############��#��d#########d#########�###The SUBTRACT operation has the
following two formats: Format 1 SUBTRACT {identifier-1} {literal-1} .. FROM
identifier-2 ..Format 2 SUBTRACT {identifier-1} {literal-1} .. FROM
{identifier-2} {literal-2} GIVING identifier-3...�

#�#########@####################################################################
###########################
################################################################################
#################################################�#########6###U#n###K#########d
#######
###U#n###K#########d#######=#####�#��d#########d#######
###U#n###K#########d#######`#####�#��d#########d#######�###�####################
#####�###�###<
7,�###�###############$#################����####

#########AGg���
��############�##�#?># A�g�0�
P#############�####�=####�###########r##�##��#�M
���$###��#####��#��d#########d#############SUBTRACT STATEMENT

#################$##########################��#��d#########d#########2##�##��M�M
3#��####��####T�n#��K#########d#########'###Rules for Interpreting the
Instruction Format1. All literals and data-names that are part of the
subtraction must be numeric; the field specified after the word GIVING, however,
may be a report-item.2. The receiving field, must be a data-name and not a
literal.3. All fields and literals preceding the word FROM will be added
together and the sum subtracted from the field following the word FROM. The
result, or difference, will be placed in this same field if no GIVING option is
used. All other fields will remain unchanged.4. When using the GIVING option,
the operation performed is the same as in Rule 3, but the result, or
difference, is placed in the field following the word GIVING. The initial
contents of the resultant field after the word GIVING do not take part in the
arithmetic operation.�

#'#########.###############�#################'#########.###U#n###K#########d####
###�###T#n###K#########d#######?
###T#n###K#########d###########T#n###K#########d###########T#n###K#########d####
###�###�###################P#####�###�###|
7,�###�###############�#################����####

#########AGg���
��############�##�##;# A�g��� �#############�##|
##;####�###########r##�##��#�M
���$###��#####��#��d#########d#############SUBTRACT STATEMENT

#################$##########################��#��d#########d#########2##�##����M
�#��####��####U�n#��K#########d#########P###Examples:1.
SUBTRACT
15.40
TAX
TOTAL FROM AMT2.
SUBTRACT
15.40
TAX
TOTAL
FROM AMT
GIVING NET Examples 1 and 2 produce the same result but
in different storage areas. In Example 2, the original contents of NET are
replaced with the result and do not affect the calculation.

#P#########
###############################(###############################A################
###############�#################P#########
###U#n###K#########d###########U#n###K#########d#############�#��d#########d####
#########�#��d#########d#############�#��d#########d###########U#n###K#########d
#######
#####�#��d#########d############��#��d#########d############��#��d#########d####
########��#��d#########d#######�###U#n###K#########d#######�###�################
####### #�###�###l
7,�###�###############�#################����####

#########`#����� �#############�##�#�=##AGg�#� ��############�####�># A�g��
�#############�##�#�=####�###########r##�##��0�M
���$###��#####��#��d#########d#############SUBTRACT STATEMENT

#################$##########################��#��d#########d#########2##�##���M
�#��####��####U�n#��K#########d#########�###Deciding Which Format to UseAs
a rule, when the contents of an operand are not needed after the SUBTRACT
operation, Format 1 may be used. When the contents of all operands are to be
retained, use Format 2.

#�#########################�#################�#############U#n###K#########d####
###�###U#n###K#########d#######�###�#########################�###�###,#?
�###�###############4#################����####

#########AGg�#�
��############�##�##;##`#���0 (#############�##�#�=# A�g��
�#############�##D##;####�###########r##�##��0�M
���$###��#####��#��d#########d######### ###SELF-TEST#

#

#########
#####$########### #########
####��#��d#########d#########2##�##���M
�#��####��####U�n#��K#########d#########s###1. In the operation SUBTRACT
1500 FROM GROSS GIVING NET, the result, or difference, is placed in . What
happens to the original contents of GROSS? If GROSS has an original value of
8500, and NET has an original value of 2000, the result in NET would be _____ .
SOLUTION:-- NET; it remains unchanged; 7000 (The original 2000 in NET does not
enter into the calculation.)o

#s#########s#################s#############T#n###K#########d#############

Dokumen yang terkait

ANALISIS FAKTOR YANGMEMPENGARUHI FERTILITAS PASANGAN USIA SUBUR DI DESA SEMBORO KECAMATAN SEMBORO KABUPATEN JEMBER TAHUN 2011

2 53 20

EFEKTIVITAS PENDIDIKAN KESEHATAN TENTANG PERTOLONGAN PERTAMA PADA KECELAKAAN (P3K) TERHADAP SIKAP MASYARAKAT DALAM PENANGANAN KORBAN KECELAKAAN LALU LINTAS (Studi Di Wilayah RT 05 RW 04 Kelurahan Sukun Kota Malang)

45 393 31

FAKTOR – FAKTOR YANG MEMPENGARUHI PENYERAPAN TENAGA KERJA INDUSTRI PENGOLAHAN BESAR DAN MENENGAH PADA TINGKAT KABUPATEN / KOTA DI JAWA TIMUR TAHUN 2006 - 2011

1 35 26

A DISCOURSE ANALYSIS ON “SPA: REGAIN BALANCE OF YOUR INNER AND OUTER BEAUTY” IN THE JAKARTA POST ON 4 MARCH 2011

9 161 13

Pengaruh kualitas aktiva produktif dan non performing financing terhadap return on asset perbankan syariah (Studi Pada 3 Bank Umum Syariah Tahun 2011 – 2014)

6 101 0

Pengaruh pemahaman fiqh muamalat mahasiswa terhadap keputusan membeli produk fashion palsu (study pada mahasiswa angkatan 2011 & 2012 prodi muamalat fakultas syariah dan hukum UIN Syarif Hidayatullah Jakarta)

0 22 0

05 BHS JEPANG

0 14 16

Pendidikan Agama Islam Untuk Kelas 3 SD Kelas 3 Suyanto Suyoto 2011

4 108 178

HUBUNGAN ANTARA KELENTUKAN DAN KESEIMBANGAN DENGAN KEMAMPUAN BACK OVER DALAM SENAM PADA SISWA SMA NEGERI 05 BANDAR LAMPUNG

0 42 1

KOORDINASI OTORITAS JASA KEUANGAN (OJK) DENGAN LEMBAGA PENJAMIN SIMPANAN (LPS) DAN BANK INDONESIA (BI) DALAM UPAYA PENANGANAN BANK BERMASALAH BERDASARKAN UNDANG-UNDANG RI NOMOR 21 TAHUN 2011 TENTANG OTORITAS JASA KEUANGAN

3 32 52