The value must be assigned to an environment variable and the replicat must be started from the OS command line and not within GGSCI.
Start the replicat via the command line as part of the script and not calling GGSCI inside the script. If GGSCI is called to start replicat it will not recognize the runtime variables of the script. Processes started by the MGR inherit variables of the MGR process.
Here’s a sample of my simple test script that works:
#!/bin/sh export OGG_HOME=
export REP_START_DATE=`date +%m%d%y` cd $OGG_HOME $OGG_HOME/replicat paramfile $OGG_HOME/dirprm/[rep_name].prm reportfile $OGG_HOME/dirrpt/[rep_name].rpt
Here’s the corresponding param:
replicat [replicat_name] assumetargetdefs discardfile ./dirrpt/[replicat_name].dsc, purge targetdb [db name], userid [username], password [username_password] map [owner].[table_name], target [owner].[table_name], COLMAP (USEDEFAULTS , [column_name] = @GETENV ("OSVARIABLE","REP_START_DATE") ) ;