Hi All
This is my 1st post so be gentle, I have a databse file which Ive built which is basically a excel spreadsheet which holds Weight & Miles with corresponding cost value for our transport
Miles
tonnes 10 15 20 25 30 .....
.5 17.5 18.25 19.00 22.00 25.00 <---Cost value
1 17.50 18.25 19.00 22.00 25.00
1.5 17.06 17.79 18.53 21.45 24.38
2 16.63 17.34 18.05 20.90 23.75
....
Down to 25 tonnes & across to 450 miles
Anyone know whats the best way to code this in RPG, I tried to do a setgt & readp but get odd results, Im sure im missing something obvious but am stuck.
As far as i can see its a 2d array but not sure how best to access, I want to go to the nearest higher value, ie if 1.8 tonnes & 24 miles it should find 23.75 as a cost.
Any help would be greatly appreciated.
Tony
...
This is my 1st post so be gentle, I have a databse file which Ive built which is basically a excel spreadsheet which holds Weight & Miles with corresponding cost value for our transport
Miles
tonnes 10 15 20 25 30 .....
.5 17.5 18.25 19.00 22.00 25.00 <---Cost value
1 17.50 18.25 19.00 22.00 25.00
1.5 17.06 17.79 18.53 21.45 24.38
2 16.63 17.34 18.05 20.90 23.75
....
Down to 25 tonnes & across to 450 miles
Anyone know whats the best way to code this in RPG, I tried to do a setgt & readp but get odd results, Im sure im missing something obvious but am stuck.
As far as i can see its a 2d array but not sure how best to access, I want to go to the nearest higher value, ie if 1.8 tonnes & 24 miles it should find 23.75 as a cost.
Any help would be greatly appreciated.
Tony
...
Comment