what is subscript in cobol?give realtime example?
Answers were Sorted based on User's Feedback
it is a number of occrances of array data name. subscript is
coded in working-storage section with separate variable.
example.
01 g1.
02 ele pic x(3) occurs 10 times.
01 i pic 99.
procedure division.
perform varying i from 1 by 1 until i > 10
accept ele(i)
display ele(i)
end-perform.
in this is case i is a subscript variable
| Is This Answer Correct ? | 9 Yes | 1 No |
Answer / avr
01 g1.
02 ele pic x(3) occurs 10 times.
01 i pic 99.
procedure division.
perform varying i from 1 by 1 until i > 10
accept ele(i)
display ele(i)
end-perform.
in this is case i is a subscript variable
| Is This Answer Correct ? | 3 Yes | 0 No |
I have 2 dimensional array with having 100 elements. So how to find the 11th item in an array?
.How to add one input & one Out file in existing cobol program. how approach tell me step by step.
can we use go to statement inline-perform?
What is the difference between a binary search and a sequential search?
For rewrite, why is it mandatory that file needs to be opened?
How to get the last record in vsam file in cluster? And how can you get the ksds file records into cobol program?
What is Redefines clause?
in the TIME parameter we r giving hours r minutes
What is the Importance of GLOBAL clause According to new standards of COBOL?
What are the different data types available in COBOL?
if we display var1 then what will b displayed in below condition. 77 var1 pic s9(2) value -10. 77 var1 pic s9(2) value -11. " " " -12. " " " -13. -14 ... ... -19.
01 WS-NAME PIC X(10) OCCURES 2. by this we can get ws-name 2 times. My qustion is how can we access the second name