If your tables are all using InnoDB then you can get a snapshot of the master with minimal locking using

schemata="one two three"
mysqldump --opt --no-data --routines --skip-triggers \
  --databases $schemata >schema__all.sql
mysqldump --opt --no-create-info --skip-routines --triggers \
  --flush-logs --single-transaction --master-data=2 \
  --databases $schemata >data__all.sql

Otherwise, if you have some non-transactional tables (eg MyISAM) then omit single-transaction and use table locking.
A comment in the dump file will tell you what settings to use for master.info but you’d be able to guess it anyway (thanks to flush-logs).

change master to master_log_file='..', master_log_pos=..  # probably 107

In /tmp/a.sql put


then run it using

. oramon
rman target / @/tmp/a.sql >/tmp/b.sql

then edit /tmp/b.sql with your new values, adding “QUIT;” as a new last line.

rman target / @/tmp/b.sql
rman target / @/tmp/a.sql

and check the output is what you wanted.