If i initialize the 01 level variable in array, will it
initialize all the array elements (occurs)?

Answer Posted / nag(igate)

hi rakesh and sneha

we can initialize the array at group level.

01 xxx-yyy VALUE "ABCDEFGH"
03 XX-YYY-ARRAY OCCURS 2 TIMES.
05 XX-YYY-MEM1 PIC X(2).
05 XX-YYY-MEM2 PIC X(2).
the initialize value should depend on the number of times
the, occurs clause repeat.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to remove 2 duplicate records and copy only one using job control language?

755


Name the divisions, which are available in a cobol program?

686


What is the difference between binary search and sequential search?

643


For rewrite, why is it mandatory that file needs to be opened?

623


What are different data types in cobol?

695






I have a File that has duplicate records. I need only those records that occur more than thrice.?

8662


How do u write test cases?

1641


What is the utilization of copybook in cobol?

657


EXPLAIN MAIN FRAME TESTING PROCESS...HOW TO FIX THE MAINFRAME BUGS?

2060


What is rmode(24)

683


What happens when we move a comp-3 field to an edited (say z (9). Zz-)?

780


Differentiate cobol and cobol-ii. (Most of our programs are written in cobolii, so, it is good to know, how, this is different from cobol)?

635


Can we change the password using ALTER? anyone tried and changed?

1552


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...)

1932


What is static and dynamic call in cobol?

601