Hi,
below is from .ksh which is working fine.
how to use it in sas grid Please.
function fn_check_batch_load
{
/sas/SASGMCU/sasgsub -stdio << SASEND
* this expects to be called with the '-stdio' flag to redirect the output;
proc sql;
connect to oracle(user=&pcdsuser orapw=&pcdspw path='@pcds');
CREATE TABLE pcrs_recent AS
SELECT
COMPARE("${SCRIPT_DATE}", max_end) AS comp_dat
FROM connection to oracle (
SELECT prcs_id,
TO_CHAR(MAX(end_ts), 'YYYYMMDD') max_end
FROM prcs_run
WHERE prcs_run_status_ref_cd = 'FNSH'
AND prcs_id = 14001
GROUP BY prcs_id
)
;
disconnect from oracle;
quit;
* dump just the data we care about;
data _null_;
set pcrs_recent;
file stdout;
put comp_dat;
run;
SASEND
} # function fn_check_batch_load
Thanks.