consider the following piece of code
01 GROUP-ITEM
05 AMOUNT-1 PIC 99V9 USAGE COMP VALUE 50
05 AMOUNT-2 PIC 9(4)V99 USAGE COMP
MOVE ZERO TO GROUP-ITEM
ADD 50 TO AMOUNT-1
what will be the content of AMOUNT-1?
a.50
b.100
c.0
d.unpredictable

Answer Posted / sachin borase

yes answer will be 50.

But if you initialize instead of move zeros then
value will be 100.

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many bytes S(8) comp field occupy and its maximum value?

1620


here is my requirement A1 is alphanumeric with value 'A1B2C3D4' as defined below 05 A1 PIC X(8) VALUE IS 'A1B2C3D4' but i need to have A2,A3 as ABCD & 1234 repectively...... A2 = ABCD A3 = 1234 Can you please explain me what are the different ways to do it?

6778


Which is not true about evaluate statement

1560


Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?

806


can you please let me know if there is any walkins for COBOL/PLI/DB2/IMS/JCL in pune other than IBM and ITC infotech

1942






Explain what you understand by passing by value.

685


Whats the difference between search & search ALL?

5226


how to convert the recors form vsam file to db2 table tru file aid

2742


In COBOL programming, what is PERFORM? What is VARYING?

662


Write the code to count the sum of n natural numbers.

695


I have a program with an Array of 5000 occurences which is being passed from 5 sub levels to the front end screen. Thess 5 programs using each 5*2 = 10 different arrays with size as 5000. This is causing the transaction to utilize more storage consupmtion. I am looking to reduce the storage consumption. As part of that initially i thought Dynamic array may solve my problem. After viewing the comments given i see its same as normal array. IS there any other way we can resolve this issue?

1219


what is search and searchall?what is the diffrence between them?give an best example?

5521


What are the different open modes available in cobol?

711


What guidelines should be followed to write a structured cobol prgm?

655


how can we apply for HSBC exam(Mainframe) in India??? i went to their site and was told to submit my CV ,. etc..( totally confusing...)

1913