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 |
What are the rules of the move verb?
what happens if parmparameter passes zero bytes to the program
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?
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?
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 ?
Write the code to count the sum of n natural numbers.
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
What is the default value of DISP parameter?
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.
IF I mention stop run in CICS what happens?
What is difference between static and dynamic call in cobol?