Can someone explain what should be happening and the best recommendation on handling this process better. I am scanning a table with 7 plus million records. I would like to decipher only records that begin with particular NSN's and insert those tables into my prod table. Code is listed as:
************
sele fed_temp
scan for SUBSTR(NSN,1,2) = '23' ;
.or. SUBSTR(NSN,1,2) = '24' .or. SUBSTR(NSN,1,2) = '25' ;
.or. SUBSTR(NSN,1,2) = '26';
.or. SUBSTR(NSN,1,2) = '28' ;
.or. SUBSTR(NSN,1,2) = '29' .or. SUBSTR(NSN,1,2) = '30' ;
.or. SUBSTR(NSN,1,2) = '31' .or. SUBSTR(NSN,1,2) = '39' ;
.or. SUBSTR(NSN,1,2) = '40' .or. SUBSTR(NSN,1,2) = '41' ;
.or. SUBSTR(NSN,1,2) = '42' .or. SUBSTR(NSN,1,2) = '49' ;
.or. SUBSTR(NSN,1,2) = '51' .or. SUBSTR(NSN,1,2) = '52' ;
.or. SUBSTR(NSN,1,2) = '53' .or. SUBSTR(NSN,1,2) = '58' ;
.or. SUBSTR(NSN,1,2) = '59' .or. SUBSTR(NSN,1,2) = '62' ;
.or. SUBSTR(NSN,1,2) = '60' .or. SUBSTR(NSN,1,2) = '61' ;
.or. SUBSTR(NSN,1,2) = '63' .or. SUBSTR(NSN,1,2) = '67' ;
.or. SUBSTR(NSN,1,2) = '68' .or. SUBSTR(NSN,1,2) = '69' ;
.or. SUBSTR(NSN,1,2) = '70' .or. SUBSTR(NSN,1,2) = '72' ;
.or. SUBSTR(NSN,1,2) = '71' .or. SUBSTR(NSN,1,2) = '73'
scatter memvar
sele prod_table
insert into prod_table from memvar memo
sele fed_temp
endscan
Can anyone: 1.) explain what exactly the record pointer is doing by doing the scan this way
2.) Recommend a better way to cipher through 7 million records and get only the 1 or 2 million that i want....
Thanks in Advance.
J. Turner