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 remove the spaces at end of each record in the output file Via COBOL program? note: The file has a VB length

3 Answers   TCS,


We know that size of redefine and redefining need not to be same..Then does the below case true 01 ws-date pic 9(6). 01 ws-redf-date REDEFINES ws-date 05 ws-year pic 9(4) 05 ws-mon pic 9(2) 05 ws-day pic 9(2)

1 Answers   Cap Gemini,


hi. This is Ram.i have one doubt.why can't we display comp-3 variables directly? let me answer quickly plez........

1 Answers  


I want to declare a field with data type Double in my COBOL program. how shall i do that ?

5 Answers  


With in these three which one is the default one Call Reference, Call By Value, Call By Content.-Which one is default?

4 Answers   IBM,






What is LENGTH in COBOL II?

2 Answers   CSC,


What is amode(24), amode(31), rmode(24) and rmode(any) (applicable to only mvsesa enterprise server) ?

0 Answers  


Is this allowed? 01 WS-TABLE. 03 FILLER-X PIC X(5) VALUE 'AAAAA'. 03 WS-EX REDEFINES FILLER-X OCCURS 5 TIMES PIC X(1). can redefines clause be used with occurs clause?

4 Answers  


A table has two indexes defined. Which one will be used by the SEARCH?

0 Answers  


Which of the following paragraphs is compulsory in every COBOL program? (a) SPECIAL-NAMES (b) PROGRAM-ID (c) FILE-CONTROL (d) OBJECT-COMPUTER

4 Answers  


How can we pass data from cobol to JCl?

7 Answers   ADP, Amdocs, IBM,


Suppose i have a Cobol field of 10 byte. it contains a decimal sign.How to know where is the point location?

1 Answers  


Categories