how can we code index in an array of cobol pgm?



how can we code index in an array of cobol pgm?..

Answer / jenny

It can be done in two ways:

1.Using the INDEXED BY phrase on the OCCURS clause.

2.index can be defined(as a working storage variable) with
USAGE IS INDEX clause.

In either case the index is set, icreased or decreased
using the SET verb in the Procedure Division.

Is This Answer Correct ?    15 Yes 2 No

Post New Answer

More COBOL Interview Questions

HOW WE WILL SORT THE ARRAY WHICH IS GOING TO USE FOR SEARCH ALL?

2 Answers   Cap Gemini,


i want a program using by if, evaluate , string, unstring, perform, occurs?

1 Answers  


what is the coding difference between COBOL and CICS.

8 Answers   Cap Gemini,


I have the requirement to compare the two files and pick up the matching records. File 1. file2 23 32 32 13 34 15 35 36 36 35 43 Get the matching records from this 2 files to out file. how you will do this in cobol program?

15 Answers   ADP, Broadridge, CTS, HSBC, L&T, RBS, TCS,


Explain about level numbers?

3 Answers  






What are the various section in data division and briefly explain them.

0 Answers  


Describe the difference between subscripting and indexing ?

2 Answers  


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.

11 Answers   FirstApex, NIIT,


WHAT IS SOC3?HOW IT CAN BE RESOLVED?

1 Answers  


How to read a 100 record from a file through cobol?

2 Answers  


What are the two search techniques ?

2 Answers   iGate,


what is s013u000 for?

1 Answers   Hewitt,


Categories