Can't help you with Ocean but used to do this a lot in
cdsSpice, never could get the hang of it in bare Spectre
or Ocean.
But basically I'd make up a simple data structure (for
example, verifying trim-in range of a laser trimmed op
amp, save the best trim code from each MC iteration
using APPEND.1 and PRINT.1 MCCNT TRIMVAR,
and for subsequent runs reuse that trim-code file by
OPEN.1, LOOP X FROM 1 to 50 BY 1, READ.1 dummy TRIMV(X)
and inside each core loop TRIMVAR=TRIMV(MCCNT).
I'd imagine there is similar file I/O in Ocean but back
when that was my tools set, never did find it.
You could also manually edit the setup stuff once you
have the data in hand, declare and populate an array
to hold it and then do the same per-iteration assignment
from the data array. Maybe a little Perl / Python / ???
script (or sed -e, even) could get you from a raw data
pile and a header / footer fixed file, to something that
drops in easy (or maybe you find the file I/O handle).
reading it back to