Saturday, August 7, 2021

PLSQL in Shell

 sqlplus -s /nolog  <<ENDFTP

connect ${FCP_LOGIN}

set serveroutput on

whenever sqlerror exit FAILURE


BEGIN


declare

lv_return_msg VARCHAR2(500);

result boolean;

begin

result := GL_CMNPKG.FTP('AP_PFR_FTP','$source_file',lv_return_msg,'$val');

dbms_output.put_line(lv_return_msg);

end;


END;

/

ENDFTP


RC="$?"

No comments:

Post a Comment