is it possible to declare index in cobol program?
if it is not why its tell me pls

Answers were Sorted based on User's Feedback



is it possible to declare index in cobol program? if it is not why its tell me pls..

Answer / amjith pillai

No need to 'Declare' Index in working Storage section.since
Index is internally represented by 'Index Register' which
is Full-Word binary.

Yes, you can directly mention Index in Occurs clause and
can increment and re-positioning the index variable

Is This Answer Correct ?    9 Yes 0 No

is it possible to declare index in cobol program? if it is not why its tell me pls..

Answer / reddy

YES ITS POSSIBLE.
IN ARRAYS WE CAN USE INDEX.

Is This Answer Correct ?    1 Yes 2 No

is it possible to declare index in cobol program? if it is not why its tell me pls..

Answer / kiran

yes it is possible

ex PERFORM TEST AFTER VARYING WS-INDEX FROM
1 BY 1 UNTIL WS-INDEX = 10
DISPLAY "WS-INDEX is now equal to " WS-INDEX
END-PERFORM

Is This Answer Correct ?    0 Yes 6 No

Post New Answer

More COBOL Interview Questions

Whats the use of Examine command? can someone help me?

1 Answers   IBM,


s9(18) comp-3:: What is the size of memory it takes internally?

4 Answers  


i have mainprogram and subgram...if i compile mainprogram without stop run..what will u get in compilation time?

5 Answers   HCL,


Consider the following COBOL entries 05 X PIC 99 VALUE 10. ADD 40 X TO X. COMPUTE X = 3 * X - 40. The result in X is

12 Answers   TCS,


How would the number +1234 be stored if a PIC clause of PICTUREs9(4) comp-3 were used?

6 Answers  






How to retrive the 9th records out of ten records using the cobol program ?

3 Answers   UST,


SSRange is used to do a range check on which of the Following. SUBSCRIPT,INDEX,REFERENCE MODIFICATION,Run-time option.

3 Answers   Lehman Brothers,


01 a pic x(4) value 'abcd' 01 b pic 9(3) can we move from a to b.if possible what would be stored in b.

15 Answers   ACS,


Consider the following: 77 A PIC 9(10) 77 B PIC 9(10) 77 C PIC 9(19) MULTIPLY AB BY B GIVING C Which of the following is true ? (a) The execution of the above may result in size error. (b) The execution of the above will result in size error. (c) The definition of C is invalid resulting in compilation error. (d) No error will be thee and the program would proceed correctly.

4 Answers   TCS,


01 ws-p pic 9(2). 01 ws-q pic 9(2) value 01. 01 ws-r pic 9(2) value 99. p.d. compute p = q + r what will be result of p ans(00) but my question is that how i got 10 on the place of 00. (truncation will ocuure on right side not left). please tell me ?

6 Answers   L&T,


What is level 66 used for ?

3 Answers   TCS,


I have a occurs for 100 times but it has executed 101 time what could be the reason?

4 Answers  


Categories