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

How to change size of Initial number of records to *NOMAX for ALL PF files from perticular library, how can I do that

2732


How do you reference the fixed block file formats from cobol programs

705


What is the default value(s) for an initialize and what keyword allows for an override of the default?

697


What is comp-1 and comp-2?

764


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...)

1931






What is amode(24)?

684


HOw can I get the negative sign while deduct high value from low value

1790


How to find out the closest prime number of an input number? I believe it has something to do with SEARCH and COBOL Linear Array.

3720


What is redefines clause in COBOL?

851


Can you please let me know the centre name of INS certification in Kolkata.

1715


For rewrite, why is it mandatory that file needs to be opened?

623


What is static and dynamic call in cobol?

597


EXPLAIN MAIN FRAME TESTING PROCESS...HOW TO FIX THE MAINFRAME BUGS?

2060


What is rmode(24)

680


I have one ps file in which there are 3 fileds emp_no,emp_name and leave_app.this ps file information give the detail of employee which is going to apply for leave.suppose emp_no=113430,emp_name=ajay,leave_app=1 that means he is going to apply for 1 day leave.and accordingling the table in db2 will be updated means if he has that no of leave in his account then he will get dat leave and updated acc. in table(leave_balance=previous leave present in table-leave_app).Now i want to check whther the updated result is correct or not by comparing the two ps file using IEBCOMPARE or icetool so what is going to be the two ps file and how its is going to be compare.

2010