最近几天我正在尝试解决这个问题,但不知道该怎么做。我正在尝试从列表中获取 3 条记录。如果有任何 Informix 4GL 专家,我需要一些帮助。
declare s_curs cursor for
SELECT * FROM crcharge
WHERE chargenum IN
(SELECT shtwrd_no FROM crbookid WHERE crbookid.book_no = rpt.book_no)
let chgkey_count = 1
FOREACH s_curs into z_charge.*
let t_col = 15
if chgkey_count <= 3 then
let chgkey_count = chgkey_count + 1
let chgkey_count = t_chgkey
let scratch = z_charge.chgkey
let rpt.chgkey = scratch
call make_charge_section(scratch) returning rpt.chgkey
print
column 1, ESC, "&a15.5R",ESC,"&a12C", rpt.chgkey #t_col+2 ,
end if
END FOREACH