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

01 A pic 9(100) find record length of it

6 Answers   TCS,


What is the file organization clause ?

2 Answers  


What is Redefines clause?

8 Answers  


what is scope terminator

2 Answers   IBM,


What compiler option would you use for dynamic linking?

2 Answers  






input= ,,,, mainframe training ,,, hyderabad .... location.... output1=$ mainframe training in hyderabad location$ output2=**** mainframe training in hyderabad location ****. In this pgn when we give input considering the spaces the output is displayed in this format.Like in the place of ,,,, $ should be displayed likewise.So please helpmeout.

0 Answers  


write a program to eliminate duplicate records in a input file and send them to output file.

2 Answers   IBM,


01rec1. 05 a pic 999v99 value 123.12 05 b pic 99v9 value 45.9 02 rec2. 05 x pic 999v99 05 y pic 99v99 05 z pic x(3) value 'abc' if rec1 is moved to rec2 then what is the value of rec2?

5 Answers   Amdocs,


Explain the configuration section of a cobol program with examples of syntax.

0 Answers  


Why we are using comp and comp-3 in real time projects?

4 Answers   IBM,


how we sort two input files based on a common column and giving one o/p file please send me the coding logic?

0 Answers   Valtech,


Can the OCCURS clause be at the 01 level?

8 Answers   Oracle,


Categories