-------------------------------------------------------------------------------- -- -- File name: getplusparm.sql -- Purpose: get sqlplus parameter value (such linesize, pagesize, sqlcode, -- etc) into a sqlplus define variable -- -- Author: Tanel Poder -- Copyright: (c) http://www.tanelpoder.com -- -- Usage: @getplusparm [full-param-name] [def-variable-name] -- -- Example: @getplusparm linesize myVar -- def myVar -- -------------------------------------------------------------------------------- set termout off def _tmpfile=getplusparm spool &_tmpfile..tmp show &1 spool off spool &_tmpfile..chg prompt c/&1/def &2/ prompt c/&2 /&2=/ spool off get &_tmpfile..tmp nolist @&_tmpfile..chg save file &_tmpfile..set replace @&_tmpfile..set set termout on