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

Study the DATA DIVISION entries and the three PROCEDURE DIVISION entries given below: 01 END-OF-FILE-SWITCH PIC XXX. 88 NO-MORE-RECS VALUE "YES". 88 MORE-RECS VALUE "NO". (i) READ SAMPLE-FILE AT END MOVE "YES" TO NO-MORE-RECS. (ii) IF NO-MORE-RECS = "YES" GO TO LAST-PARA. (iii) IF NO-MORE-RECS GO TO LAST-PARA. Which are wrong? (a) (i) and (ii) (b) (ii) and (iii) (c) (i) and (iii) (d) all

5 Answers   TCS,


how we rectify soc4 and soc7 error in project(need real time answer)? please reply

3 Answers   HCL, Wipro,


Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?

0 Answers  


In CICS/VSAM every file that is accessed should be defined in FCT. we have CICS READ, WRITE, BROWSE commands for VSAM files. How does it work with DB2 tables. It know it has to do with the plan. Please expain with examples.

1 Answers  


What are the different types of condition in cobol and write their forms.

0 Answers  






What is the maximum length of a field you can define using COMP-3 in COBOL?

1 Answers   UGC Corporation,


I have a occurs for 100 times but it has executed 101 time what could be the reason?

4 Answers  


i Want All cobol ERROR codes?

4 Answers   HCL, IBM,


If a sub program is called from mainprogram.I have opened cursor in main program and Fetch the result in subprogram ,Is it possible ?If yes please tell me the reason.

1 Answers  


What is the difference between performing a SECTION and a PARAGRAPH?

5 Answers   Accenture, Patni,


what is difference between cobol and cobol/400

1 Answers   HCL,


How to delete the records of a dataset through cobol programme?We should not use jcl utilitities like IDCAMS.

2 Answers  


Categories