What is the difference between a subscript and an index in
a table definition?
Answers were Sorted based on User's Feedback
Answer / mftech
Subscript is the occurance number in the arrary of element.
Fr e.g., an array has only one itme that repeats for 20
times, in order to refer to 10th itme in this array, you
can say ITEM(20). This '20' can be replaced by a WS
variable having value = 20.
Index: It is the displacement from the begining. if you
remember, when we use Index in a loop, then we do not code
Move 2 to WS-INDEX. We have to code. We need to set the
index to zero and then increament.
| Is This Answer Correct ? | 7 Yes | 0 No |
Answer / satheesh gova
subscript specifies the no of occurances of a table or
array where as index specifies the displacement of a
table,subscript is working storage variable but index is not
working storage section variable,by using arithematic
operations we can increment and decrement the value of
subscript,but by using SET verb we can get it in index.
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / srinu
Subscript is the occurance number in the arrary of element.
Fr e.g., an array has only one itme that repeats for 20
times, in order to refer to 10th itme in this array, you
can say ITEM(20). This '20' can be replaced by a WS
variable having value = 20.
Index: It is the displacement from the begining. if you
remember, when we use Index in a loop, then we do not code
Move 2 to WS-INDEX. We have to code. We need to set the
index to zero and then increament.
| Is This Answer Correct ? | 2 Yes | 0 No |
PERFORM ACCUMULATE-TOTALS VARYING A FROM 1 BY 2 UNTIL A >2 AFTER B FROM1 BY 1 UNTIL B>2 AFTER C FROM 2 BY -1 UNTIL C<2 How many times the paragraph ACCUMULATE-TOTALS would be exicuted?
Have you code any new programs in COBOL ? What is the functionality of the programs?
i declare a Table as OCCURS 2000 TIMES.If the input file has more than 2000 records will the COBOL program fail?
I have 100 records in a file.. i want to sort the records from 5 to 5o... give the syntax...
How can you add a particular field/coloumn in copybook?
wht is the diff b/w if and evaluate stmts ?
example for sub strings ? and refernce modifications whit output pls
0 Answers College School Exams Tests, IBM,
Can anybody give me example of subscript and index
Wat is the difference between NEXT and CONTINUE statement in cobol,can any one explain with example.
The following entries appear in the WORKING-STORAGE SECTION: 01 DATE-TODAY. 05 YY PIC XX VALUE "90". 05 MM PIC XX VALUE "12". 05 DD PIC XX VALUE :31". 01 DATE-EDIT PIC XX/XX/XX. MOVE DATE-TODAY TO DATE-EDIT. (a) 901231 (b) 90/12/31 (c) 31/12/90 (d) 311290
What are the pertinent COBOL commands?
what is level 66 means??