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

what are the steps to sort in a cobol program?

2 Answers   Patni,


How do you define a table/array in COBOL?

5 Answers   Hexaware,


In A cobol program , we can use COPY Statement in FILE- SECTION / WORKING-STORAGE SECTION / ENVIRONMENT DIVIION basically what is the difference

3 Answers   IBM,


When is a scope terminator mandatory?

3 Answers  


u have passed sme charecters thru parm parameter in jcl. how do u code in cobol to recieve the values u gave in parm ?

2 Answers   IBM,


The following entries appear in the WORKING-STORAGE SECTION: 01 DATE-TODAY. 05 YY PIC XX VALUE "90". 05 MM PIC XX VALUE "12". 05 DD PIC XX VALUE :31". 01 DATE-EDIT PIC XX/XX/XX. MOVE DATE-TODAY TO DATE-EDIT. (a) 901231 (b) 90/12/31 (c) 31/12/90 (d) 311290

4 Answers   TCS,


what is the purpose of linkage section?

10 Answers  


What does the IS NUMERIC clause establish ?

2 Answers  


What is the maximum length of a field you can define using COMP-3?

4 Answers   Complex System, Infosys,


Can we put move statement in COBOL copybook

3 Answers   Global Logic,


What will happen if you code GO BACK instead of STOP RUN in a stand-alone COBOL program i.e. a program which is not calling any other program ?

3 Answers  


what happens if we dont close cursor in db2-cobol pgm?

6 Answers  


Categories