what is subscript in cobol?give realtime example?

Answers were Sorted based on User's Feedback



what is subscript in cobol?give realtime example?..

Answer / jagan kumar

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

what is subscript in cobol?give realtime example?..

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

Post New Answer

More COBOL Interview Questions

Wat is the difference between NEXT and CONTINUE statement in cobol,can any one explain with example.

11 Answers   Deloitte,


) What is the use of IGNORE?

1 Answers   IBM,


how to convert vsam table into DB2 table?

1 Answers   IBM, Wipro,


Is it possible that the redefines clause has different picture clauses compared to the one it redefined?

0 Answers  


What are decleratives in COBOL ?

1 Answers   Xansa,






i need a small 3d program using inline and outline.

0 Answers  


How can we increase the size of an existing PDS to include more no. of modules. I tried the answer posted by Jagan(TSO PDS 'pds name') but did not find it working. The answer posted by kamal i know very well. Please suggest me a answer so that we don't need to delete the existing PDS and still we can change the size as well.

10 Answers  


input:-AABBCCDDEFGHIIJ output:- ABCDEFGHIJ Here in input we hav the duplicate characters i.e repeating characters.SO we should eliminate the duplicate characters and should display the output in ascending order.

6 Answers  


)what is retrieve?

1 Answers   IBM,


how do u indetify files succesfully executed or not ?

4 Answers   TCS,


What is the difference between CONTINUE & NEXT SENTENCE ?

2 Answers  


hw to create 3 dimensional array & hw to access it?

1 Answers  


Categories