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

If a file has 1000 records.. if i have to replace the first and last characters of the file with another character. how it can be done....

1 Answers   HCL,


Write a program to concert an Indexed file into Sequential file?

1 Answers   Covansys,


What is the Purpose of Pointer in the string?

1 Answers  


The below is the declaration for a variable ws 01 ws pic 9(3). if you want to insert space how will you do that. in which level u should do it

3 Answers   ADP,


How to code fscode 10 in cobol program? Where yoy code in your pgm?give ans for the question.

2 Answers   IBM,


There are 5 fields and 1000 records in a file. Unload it into an array. Write the syntax for declaration and how will you unload it.

1 Answers  


How to use the same cobol program in Batch and CICS onlines ? Please expalin with an example. Thanks in advance.

1 Answers  


Have you used the sort in your project?for this type of questions any working on real time project give the eg. with real time scenario.

1 Answers   IBM,


What is amode(24), amode(31), rmode(24) and rmode(any) (applicable to only mvsesa enterprise server) ?

1 Answers  


What are ISOLATION LEVELS? Where do we need to specify them in compiling JCL (Exactly which statement and what is syntax for it)?

2 Answers   T systems,


how to check whether the open command of a sequential file is successful? or not?

2 Answers   CSC, IBM,


maximum of how many screens we can open in emulator

2 Answers  


Categories