What is the different between index and subscript?
Answers were Sorted based on User's Feedback
Answer / ash
Subscript - refers to the array occurance
Index - refers to the byte position/displacement of the
occurance from the start of the array
Is This Answer Correct ? | 4 Yes | 0 No |
INDEX is Displacement position of array data name.
Subscript is No. of occurenceof array data name.
Is This Answer Correct ? | 4 Yes | 0 No |
Answer / raja
Subscript refers to the array occurrence while index is the
displacement (in no of bytes) from the beginning of the
array. An index can only be modified using PERFORM, SEARCH
& SET. Need to have index for a table in order to use
SEARCH, SEARCH ALL.
Is This Answer Correct ? | 4 Yes | 0 No |
In a COBOL program, 2 tables TABLE1 and TABLE2 are defined that are indexed by INDEX1 and INDEX2 respectively. Can we use INDEX1 with TABLE2 and INDEX2 with TABLE1?
how you will define variables length in cobol.
Where the Plan is located in CICS-DB2
i have variable record in the 5th, i want to sort from 5th filed ? how ?
What is a report item?
How to declare if emp-name = AAAAA""BBB in working-storage section. After display emp-name should print like AAAAA""BB
What is amode(24), amode(31), rmode(24) and rmode(any) (applicable to only mvsesa enterprise server) ?
if a=b how the flow will complete??? perform test through test-exit. perform activa through activa-exit. test. if a=b then next sentence else move a to c. test-exit. exit. activa. -- -- activa-exit. exit.
is it possible to rename 01 level?
if i am reading a file with some 50000 records and moving to a DB2 table and suddenly the program abends in between, is there anyway i could restart from the exact record at which the job failed once the program restarts.
I have File 1 occurs 5 times with Employee-ID,Employee-Name,Employee-Dept (EEE and MECH). I have File 2 occurs 10 times with Employee-ID,Employee-Name,Employee-Dept (EEE,CIVIL,CHEMICAL and MECH). In FIle 1 and FIle 2 , for matching Employee-DEPT (Only MECH) , we need to move entire records from file1 to file 2. We should not use 2D array. Your help is needed here.
what are the steps to sort in a cobol program?