This is my first time posting, so thanks all for this venue!

My cohort has been working on a script to duplicate a 10.2. oracle database using rman from target prod(different host) to auxiliary test using rman and NetBackup. (all aix) The directory structure is different on both so we use the convert commands in the run script:

clone/staging/rman_commands.lst
connect target 'sys/targetpw@hostP'
connect catalog 'rmanprod/rmanpw@rmanP'
connect auxiliary 'sys/auxpw@hostT'
run {
allocate auxiliary channel 'aux_01' type sbt;
allocate auxiliary channel 'aux_02' type sbt;
send 'NB_ORA_CLIENT=hostP.corp.dom';
set until time "to_date('24-Jun-11 10:22:00','DD-MON-YY HH24:MI:SS')";
duplicate target database to auxT nofilenamecheck;
set db_file_name_convert =
'/instP_oradata/oradata/','/instT_oradata/oradata/'
set log_file_name_convert =
'/instP_oradata/oradata/','/instT_oradata/oradata/'
release channel aux_01;
release channel aux_02;
}

but we are getting this error message:

RMAN> connect target *
2> connect catalog *
3> connect auxiliary *
4> run {
5> allocate auxiliary channel 'aux_01' type sbt;
6> allocate auxiliary channel 'aux_02' type sbt;
7>
8> send 'NB_ORA_CLIENT=hostP.corp.dom';
9> set until time "to_date('24-Jun-11 10:22:00','DD-MON-YY HH24:MI:SS')";
10> duplicate target database to auxT nofilenamecheck;
11> set db_file_name_convert
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "db_file_name_convert": expecting one of: "archivelog, auxiliary, auxname, autolocate, autobackup, backup, command, controlfile, clonename, decryption, dbid, duplex, echo, encryption, high, limit, maxcorrupt, maxseq, newname, nocfau, parallelmediarestore, rpc, snapshot, until"

I have a couple of questions:

1) these are two different hosts, but the file system names are different, should we be using nofilenamecheck?
2) when doing a cat of the spfile, even though we put the convert commands in the pfile and then created the spfile from the pfile, it doesn't show the convert commands.
3) can you use set commands in a run block for convert or should they just be in the pfile?

The basic path of what we are doing is:

create pfile with the last two commands of db_file_name_convert and log_file_name_convert

verify the password file

stop the listener (aux db)

shutdown immediate (aux db)

startup nomount with new pfile (aux db)

create spfile from new pfile (aux db)

shutdown abort (aux db)

startup (aux db)

start listener

run rman{ run block command - see above} --THIS IS WHERE WE ARE STUCK

--duplicate -- duplicate -- duplicate ---
success!

stop the listener (aux db)

shutdown immediate (aux db)

startup nomount with new pfile (aux db)

create spfile from new pfile (aux db)

shutdown abort (aux db)

startup (aux db)

start listener (aux db)

* The names and passwords have been changed to protect the innocent*