what is subscript in cobol?give realtime example?
Answers were Sorted based on User's Feedback
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 |
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 |
What will happen if we move SPACES to numeric field and ZEROES to alphabetic field?
What will happen if you code GO BACK instead of STOP RUN in a stand alone COBOL program ?
8 Answers Arigo Infotech, IBM,
what is srange and nosrange pls reply to ths question ?
consider the following piece of code 01 GROSS-PAY 05 BASIC-PAY PIC 9(5) 05 ALLOWENCES PIC 9(3) if BASIC-PAY has a value 1000 and ALLOWENCES has a value of 250,what will be displayed by the statement DISPLAY GROSS-PAY a.1250 b.01000250 c.01250 d.1.250
Can the OCCURS clause be at the 01 level?
What is normalisation?
What is the maximum length of a field you can define using COMP-3?
4 Answers Complex System, Infosys,
What are the pertinent COBOL
I got user abend U4038 while compiling my runjcl.. can anyone help me?
Whats the use of Examine command? can someone help me?
How do you code Cobol to access a parameter that has been defined in JCL?
can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there