How to display the index.(displacement from an array)
Answers were Sorted based on User's Feedback
Answer / naina
Ye we can!!!
The easiest way, which would work in all versions of COBOL
is
SET W-S-VAR-PICS9(9)-USAGE-DISPLAY TO THE-INDEX-U-WANT-TO-
DISPLAY
DISPLAY W-S-VAR-PICS9(9)-USAGE-DISPLAY
| Is This Answer Correct ? | 11 Yes | 1 No |
Answer / sreeji
we cant display index variable. we can display subscript
| Is This Answer Correct ? | 13 Yes | 7 No |
Answer / guest1
I tried to redefine a the index variable by a zoned
variable. But not thing displayed..
| Is This Answer Correct ? | 2 Yes | 3 No |
Answer / shan
The above set statements are correct but the variable which
you are going to display should be defined as usage is index.
| Is This Answer Correct ? | 3 Yes | 6 No |
in cobol perform stmt whether it first checks the condition or not
How do you differentiate between cobol and cobol-ii?
How to retrive the 9th records out of ten records using the cobol program ?
can we display comp-3 variables. if we want to display what we have to do . give me one example
What is the purpose of Identification Division?
WHY LRECL NEEDS TO BE 4 EXTRA THEN THE COBOL FILE LENGTH & WHAT IT CONTAIN IN THAT LENGTH
can I copy book which contain db2 statment in procedure divion?
01 ws-p pic 9(2). 01 ws-q pic 9(2) value 01. 01 ws-r pic 9(2) value 99. p.d. compute p = q + r what will be result of p ans(00) but my question is that how i got 10 on the place of 00. (truncation will ocuure on right side not left). please tell me ?
I need to compare two VSAM files, both having 'number' as key. If there is a matching record, write the data into another VSAM file. How will it be possible.
Can we use redefine clause in occurs clause?
Difference between cobol and cobol-ii?
I have a occurs for 100 times but it has executed 101 time what could be the reason?