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
how to move the records from file to array table. give with code example
How to remove the spaces at the end of each record in the output file of variable length, via cobol program?
Explain how you can characterize tables in cobol?
) how do u code after getting data?
how can i see junk values in dclgen or in hostvariable of comp ?
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...)
What are various search techniques in cobol? Explain.
Are you comfortable in cobol or jcl?
How do define dynamic array in cobol.
What is the default value(s) for an initialize? What keyword will allow for an override of the default?
What are the pertinent COBOL
What are the different rules of SORT operation?
Is it possible that the redefines clause has different picture clauses compared to the one it redefined?
What rules are followed by the search verb.
write a cobol logic. i have file that has 10 records .1 record go to first output file and second record goes to 2 output and etc