[lockSend]
select fnc_lock_send('&1')

[getLock]
select
  l.send_no
--, s.send_param as fax_no
, s.fax_no as fax_no
--, s.doc_path
--, s.send_page
--, s.info_kind
--, s.send_hoho
, s.file_name
, s.file_image
from t_send_lock l
inner join t_send_log s on (s.send_no = l.send_no)
where l.term_id = '&1'
order by send_no
limit 1

[getProcItems]
select
  s.send_no
from t_send_log s
where s.send_sts = 2
order by send_no

[updateSts]
update t_send_log set
  send_sts = &2
--, port_no = :port_no
--, send_time = now()
, biko1 = '&4'
, upd_id = '&3'
, upd_time = now()
where send_no = &1
;
delete from t_send_lock where term_id = '&3'
;


