What is a subscript ?
Answers were Sorted based on User's Feedback
Answer / santosh khot
Subcript is a working storage variable which gives the
occurance value of variable. Its main use is to access the
array elements.
| Is This Answer Correct ? | 4 Yes | 1 No |
Answer / b.rajesh
Number of occurrences of an element is known as subscript.
For storing of data we use the concept of SUBSCRIPT.
EX:-
WORKING-STORAGE SECTION.
01 section
02 marks pic 9(2) occurs 3 times.
77 I pic p(1).
PROCEDURE DIVISION.
move 1 to I.
perform until I > 3
accept marks(I)
add 1 to I
end-perform.
Here we declare the marks(I) : I is called as subscript.
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / ananta
Subcript : it is occurences of same type of records.
Ex-1.
01 arry.
02 a pic x(5) occures 5 times.
03 i pic 9.
ex-2.
01 rec-1.
02 rec1 pic x(5).
02 rec2 pic x(5).
02 rec3 pic x(5).
02 rec4 pic x(5).
02 rec5 pic x(5).
these 2 example shows that ex-2 can be writen in the form
of subcript .it make fast proccessing by usin g less I/o
sources.
| Is This Answer Correct ? | 1 Yes | 1 No |
Extract only those records from a PS file which are having word 'TEXT' in the records using COBOL? The word TEXT is not present in a particular position in all the records.
What is an in line PERFORM? When would you use it? Anything else to say about it?
How do you define a variable of COMP-1? COMP-2?
what is the maximum error code in mainframe
Hi................... I have records like this aaaa cccc bbbb And i want output like this bbbb cccc aaaa How can it possible ?. Note:Please make sure records are in unsorted order. somebody plzzz help me.
What are the different forms of EVALUATE statement?
what are the steps to sort in a cobol program?
01 a pic 9(6) value is 123456 01 b pic 9(3) move a to b wht will be the value ?
IF I mention stop run in CICS what happens?
what is a load module ?
I have a variable account-number declared as comp-3, s9(10) comp-3 in a file. How do i find a particular account number say 123456 in that file?
Under which scenario you would go for a static call as opposed to dynamic call?