FIND FIRST OCCURRENCE OF REGEX `result_table\s*=\s*(.*);`
IN l_method_src_string
IGNORING CASE
SUBMATCHES r_script.
FIND FIRST OCCURRENCE OF REGEX `SCRIPT_ID\s*=\s*(\d+)`
IN l_method_src_string
IGNORING CASE
SUBMATCHES r_script_id.
FIND FIRST OCCURRENCE OF REGEX `WARH_ID\s*=\s*(\w+)`
IN l_method_src_string
IGNORING CASE
SUBMATCHES r_warh_id.
FIND ALL OCCURRENCES OF REGEX `SCRIPT_NAME\s*=\s*((.|\n)*)\*\/`
IN l_method_src_string
IGNORING CASE
SUBMATCHES r_script_name.
l_method_scr_string - это текст формата:
METHOD check_zmm_d85s_001 BY DATABASE PROCEDURE FOR HDB
LANGUAGE SQLSCRIPT OPTIONS READ-ONLY
USING
/bic/azmm_d85s00
.
/*
SCRIPT_ID = 1
WARH_ID = ZMM_D85S
SCRIPT_NAME = Проверка на заполненность ДСО.
*/
result_table =
select 'ERR' as result
from "/BIC/AZMM_D85S00"
where "/BIC/ZPER_DT" = to_char (add_days(current_date, -1), 'YYYYMM') || '01'
having count(*) <= 100;
ENDMETHOD.
Комментариев нет:
Отправить комментарий