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

How to delete leading spaces/blank in COBOL ? Example:- 01 data-name-1 pic x(220) " English is a language". I would like to delete leading spaces.

7 Answers   Financial Services,


What will happen if we generate GDG +2 version instead of +1 version?

2 Answers   T systems,


when COMP-3 is preferrable?

3 Answers   Patni,


Explain Restart Logic in Cobol?

1 Answers   L&T, Syntel,


What is the difference between comp and comp-3 usage?

0 Answers  






How can I find the maximum value of a field in a file while reading the file dynamically? without using sort function. Suppose i have a file with fields Timestamp, description, teamname, teamnumber.. i have read the file till end and find the maximun value of timestamp which is not in sorted order.. can we use function max(timestamp)?

1 Answers   CGI,


What is the linkage section?

4 Answers  


How many sections are there in data division in COBOL?

0 Answers   B-Ways TecnoSoft,


What will happen if you code GO BACK instead of STOP RUN in a stand alone COBOL program ?

8 Answers   Arigo Infotech, IBM,


What is a scope terminator give example?

0 Answers  


How many bytes do a s9 (7) comp-3 field occupy?

1 Answers  


Re: 01 NAME1 PIC X(13) VALUE "COBOL PROGRAMMING". 01 NAME2 PIC X(13). now I want to display the value of NAME1 in reverse order i.e value should be displayed as "GNIMMARGORP LOBOC" HOW can I do that ??? please let me know if any one knows it.

2 Answers   IBM,


Categories