how to read the record randomly based on the part of the key
Posted: Tue Oct 14, 2008 12:45 pm
hi
file structure is given below
LFI ,TEXT ,1 , ,TEXT ,,1 , , ,, ,, ,, ,,KEY
SUB_NO ,TEXT ,2 , ,TEXT ,,7 , , ,, ,, ,, ,,KEY
A_LFI ,TEXT ,9 , ,TEXT ,,1 , , ,, ,, ,, ,,KEY
BUS_CAT ,TEXT ,10 , ,TEXT ,,2 , , ,, ,, ,, ,,KEY
PERCENT ,SMALL ,12 , ,ZONED ,,3 , , ,, ,, ,, ,,
D_CR ,BIG ,15 , ,PACKED ,,4 , , ,, ,, ,, ,,
D_UPD ,BIG ,19 , ,PACKED ,,4 , , ,, ,, ,, ,,
UPD_SEQ ,SMALL ,23 , ,PACKED ,,2 , , ,, ,, ,, ,,
FILLER ,TEXT ,25 , ,TEXT ,,11 , , ,, ,, ,, ,,
I have to read the sub_no from other file and then based on that sub_no i have to read the record from the above file.
can we do that?
so is there anyway to read the record based on part of the key, randomly?
file structure is given below
LFI ,TEXT ,1 , ,TEXT ,,1 , , ,, ,, ,, ,,KEY
SUB_NO ,TEXT ,2 , ,TEXT ,,7 , , ,, ,, ,, ,,KEY
A_LFI ,TEXT ,9 , ,TEXT ,,1 , , ,, ,, ,, ,,KEY
BUS_CAT ,TEXT ,10 , ,TEXT ,,2 , , ,, ,, ,, ,,KEY
PERCENT ,SMALL ,12 , ,ZONED ,,3 , , ,, ,, ,, ,,
D_CR ,BIG ,15 , ,PACKED ,,4 , , ,, ,, ,, ,,
D_UPD ,BIG ,19 , ,PACKED ,,4 , , ,, ,, ,, ,,
UPD_SEQ ,SMALL ,23 , ,PACKED ,,2 , , ,, ,, ,, ,,
FILLER ,TEXT ,25 , ,TEXT ,,11 , , ,, ,, ,, ,,
I have to read the sub_no from other file and then based on that sub_no i have to read the record from the above file.
can we do that?
so is there anyway to read the record based on part of the key, randomly?