I am trying to run the following script from the sql plus prompt.

select 'File created '||to_char(sysdate, 'dd-Mon-YYYY hh24:mm:ss')
from dual;
target_dir varchar2(100) := 'd:\oracle\backups';
source_file varchar2(100) ;
ts_name varchar2(100);
prev_ts_name varchar2(100);
cursor mycur is
select file_name, lower(tablespace_name)
from sys.dba_data_files
where instr(file_name, 'temp') = 0
order by 2;

I get the following error messages:

ORA-00900: invalid SQL statement
source_file varchar2(100)
ORA-00900: invalid SQL statement
ts_name varchar2(100)
ORA-00900: invalid SQL statement
prev_ts_name varchar2(100)

Is it possible to run this plsql script from the sql+ prompt or does it need to be treated differently.