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 |
1)what is the maximum limit for occurs? Eg: 01 A PIC X(10) OCCURS N TIME. What is the max value for N?
how we rectify soc7 and soc4 errors in project?
The order of precedence of arithmetic operators in an expression can be overridden with the use of (a) [] (b) () (c) {} (d) Any of the above
i want to use only first 100 records from a file.plz tell me how to write JCL for this(for read,copy,write operations).plz give me details of all posible JCL utilities?
wht is the use of evalute verb ? how do u declare recfm in cobol and jcl ?
COBOL Snippet: Tell where the control will when the below code execute IF (A=B) CONTINUE ELSE NEXT SENTENCE PERFORM <IMP-STMT> END-IF.
Write down the divisions of cobol program?
Why we should use cursor ?
What are the differences between OS VS COBOL and VS COBOL II?
diffrence between z(2) and z9(2)
How will 128 be saved in s9 (3) comp-3 How will 12 be saved in s9 (2) comp
ID DIVISION. PROGRAM-ID. PLO. DATA DIVISION. WORKING-STORAGE SECTION. 01 VAR1 PIC 9(2). 01 VAR2 PIC X(2). PROCEDURE DIVISION. ACCEPT VAR2. MOVE VAR2 TO VAR1. STOP RUN. if i give 'PI' in var2 then what will b output of progr. any abend?????