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

What are the rules of the move verb?

0 Answers  


what happens if parmparameter passes zero bytes to the program

0 Answers   HSBC,


I have a source program compiled with Cobol-2. The output file has a record length of 100 defined in the program but a record of 60 bytes getting written into it. i.e. The rest of 40 bytes I am not Writing anything. But it by default puts some values into the last 40 bytes. However it does not impact anything. But when Compiled the module with Enterprise Cobol the last 40 bytes were spaces as fillers. Can anyone explain?

5 Answers   Cognizant,


01 a pic s9(5) value -12345, if we disply a , the sign will overpunched with last digit but i need to get the miuns sign in the result?

7 Answers  


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,


Write the code to count the sum of n natural numbers.

0 Answers  


What is 66 level number and where it is used in real time by software developers?

2 Answers   ITC Indian Tobacco Company, TCS,


how do you reference the esds vsam file formats from cobol programs

0 Answers  


What is the default value of DISP parameter?

3 Answers   IBM,


suppose a cobol programme A calling programme B,C and D. If C undergoes some change what if A,B,C,D need to be recompiled or only C nee to be recompliled.

2 Answers   IBM,


IF I mention stop run in CICS what happens?

0 Answers   IBM,


What is difference between static and dynamic call in cobol?

0 Answers  


Categories