How to display the index.(displacement from an array)

Answers were Sorted based on User's Feedback



How to display the index.(displacement from an array)..

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

How to display the index.(displacement from an array)..

Answer / sreeji

we cant display index variable. we can display subscript

Is This Answer Correct ?    13 Yes 7 No

How to display the index.(displacement from an array)..

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

How to display the index.(displacement from an array)..

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

Post New Answer

More COBOL Interview Questions

1)what is the maximum limit for occurs? Eg: 01 A PIC X(10) OCCURS N TIME. What is the max value for N?

11 Answers   Wipro,


how we rectify soc7 and soc4 errors in project?

1 Answers   Anaxis, TCS,


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

3 Answers   TCS,


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?

7 Answers   CTS,


wht is the use of evalute verb ? how do u declare recfm in cobol and jcl ?

2 Answers   EDS,






COBOL Snippet: Tell where the control will when the below code execute IF (A=B) CONTINUE ELSE NEXT SENTENCE PERFORM <IMP-STMT> END-IF.

7 Answers   HCL,


Write down the divisions of cobol program?

0 Answers  


Why we should use cursor ?

3 Answers  


What are the differences between OS VS COBOL and VS COBOL II?

1 Answers   IBM,


diffrence between z(2) and z9(2)

4 Answers   Cap Gemini,


How will 128 be saved in s9 (3) comp-3 How will 12 be saved in s9 (2) comp

3 Answers   CTS,


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?????

6 Answers   TCS,


Categories