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 |
what is the minimum number of lines a Cobol program should have to successfully compile and run
What is file status 92?
What is different between variable length and fixed length?
can i use multiple when statements in search & search all ? justify ur answer?
What will happen if we generate GDG (+2) version without generating (+1) version?
what is difference bt COND, REGION & TIME parameters at JOB & EXEC. give an exp.
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
Can JUSTIFIED be used for all the data types?
Describe the difference between subscripting and indexing ?
what will happen if i give program name and member name as different? program runs successful or w'll abend?
What is redefines clause in COBOL?
which generation language is cobol