Code:
--begin create order record
define ord record
sono char(10)
end record
--end create order record
--begin selecting orders
display "Selecting Orders..."
insert into sonos
select distinct(sono)
from sodetl
where soladat > p_yest
and sono[5,5] not in ('E','M','N')
and sono[4,4] not in ('E')
and sono[3,5] not in ('RA4')
--end selecting orders
--begin load tmpship table
let o = "select trim(leading from sono) from sonos"
prepare ex_o from o
declare o_curs cursor for ex_o
foreach o_curs into ord.*
display ord.sono
let myord = ""
let myord = ord.sono
|_______________________^
|
| A grammatical error has been found on line 115, character 25.
| The construct is not understandable in its context.
| See error number -4373.
insert into tmpship
select indoc,apart,inlots,cpart,serln
from inbos
where indoc like myord
end foreach
--end load tmpship table
it's not letting me do anything to the ord.sono record inside the foreach loop?!?!?!