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

How can you get the ksds file records into your cobol program?

0 Answers  


How can I tell if a module is being called DYNAMICALLY or STATICALLY?

3 Answers   CTS,


what is s000 u4087 error? please give the all error codes in cobol,jcl.

0 Answers  


How to concatenation one or more string?

4 Answers   Temenos,


What is an index for tables?

2 Answers  






Suppose i want to declare a binary comp fild of 7 byte .how to write?

6 Answers   IBM,


how many subpgms we can use in a main pgm ? how do u link sub pgm to main pgm ? how can i use the parameters declared in main pgm to sub pgm ?

2 Answers   TCS,


Can we redefine the field of x(200) to less than 200?

0 Answers  


which certifications r 4 cobol,jcl,db2,cics what is format of xam n what is importance of these certifications... plz post answer only if u r sure... thanks

1 Answers  


How can i write a comp-3 variable into a sequential file should i declara the field in the file description as comp- 3?

1 Answers  


How do pass the values to the parameters in cobol

2 Answers  


IDENTIFICATION DIVISION. PROGRAM-ID. MOVEPGM. DATA DIVISION. WORKING-STORAGE SECTION. 01 WS-I PIC 9(2). PROCEDURE DIVISION. A1000-MAIN-PARA. PERFORM PARA-X WITH TEST BEFORE UNTIL WS-I= 5 STOP RUN. PARA-X. DISPLAY "BEST2". I m getting error s722,while executing the program, seems getting in loop, can anybody tell me why

3 Answers  


Categories