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 To move a value to an array using move verb?

3 Answers   IBM,


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,


COMP-3 field occupy ?

8 Answers  


hi is there any means of deletin a record from a ps usin cobol not using jcl?eg if i am reading a record and if some condition is matched tat particular record must be deletd fom the ps

5 Answers   iNautix,


What is the file organization clause ?

2 Answers  






What is CALL statement in COBOL?

4 Answers  


In the JCL, how do you define the files referred to in a subroutine ?

2 Answers  


What is a scope terminator give example?

0 Answers  


What is the default value of DISP parameter?

3 Answers   IBM,


What is report-item?

1 Answers   IBM,


what is the basic concept of mainframe? what knowledge is needed for learn this mainframe?

4 Answers   CSE, TCS, Wipro,


how to convert vsam table into DB2 table?

1 Answers   IBM, Wipro,


Categories