What is a subscript ?

Answers were Sorted based on User's Feedback



What is a subscript ?..

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

What is a subscript ?..

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

What is a subscript ?..

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

Post New Answer

More COBOL Interview Questions

can we print comp 3 stmts how ?

3 Answers   Accenture, TCS,


what is filler and what is use of filler

3 Answers   Syntel,


i need the code for this program in cobol. 2 + 1 = 3 4+3=7 6+5=11 8+7=15 10+9=19

2 Answers  


what is dynamic array in cobol? what is the difference b/w array and table in cobol?

2 Answers  


if we have " ibm mainframe ",in that how to remove first and last leading space eg:"ibm mainframe" like that the answer we need

0 Answers  






Whats the difference between search & search ALL?

3 Answers   IBM,


input:- A 10 20 30 40 B 5 7 10 14 C 8 12 14 16.... output:- A = 100,B=36,C=50. Here spaces are considered between numbers. When we give input as above, the numbers should be added n displayed.So please help me out.

4 Answers  


What is LENGTH in COBOL II?

2 Answers   CSC,


What is an in line PERFORM? When would you use it? Anything else to say about it?

4 Answers  


01 text-data pic x(100). move 'xyzdbfrjjg u' to text-data. how to find the value of last index of text-data?

3 Answers   Mind Tree,


what is the advantage of using redefines instead of delaring the variables ?

5 Answers   HCL,


wht r the advantages of 77 level number ?

8 Answers   TCS,


Categories