1) can we display the index?

Answer Posted / jswan

You can't directly display the Index. But you can create a normal numeric field in your working storage and set that to the Index.

Example:

01 WS-TABLE.
05 WS-CUSTOMER PIC X(25) OCCURS 10 INDEXED BY INDEX1.

01 WS-NUMERICS.
05 WS-INDEX-COUNT PIC 9(02) VALUE 0.

SET WS-INDEX-COUNT TO INDEX1.
DISPLAY WS-INDEX-COUNT.

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is link edit in cobol?

717


how do you reference the rrds file formats from cobol programs

771


how can i see junk values in dclgen or in hostvariable of comp ?

2528


how to refer the data field?

1789


What is the usage of comp fields in cobol?

643






Write some characteristics of cobol as means of business language.

607


Name the divisions, which are available in a cobol program?

671


What guidelines should be followed to write a structured cobol prgm?

651


how we sort two input files based on a common column and giving one o/p file please send me the coding logic?

1635


What is the difference between PIC 9.99 and 9v99 in COBOL?

720


What is the LINKAGE SECTION used in COBOL?

876


What is difference between static and dynamic call in cobol?

762


how can we apply for HSBC exam(Mainframe) in India??? i went to their site and was told to submit my CV ,. etc..( totally confusing...)

1908


When is inspect verb is used in cobol?

661


Which is not true about evaluate statement

1555