This article explains how to set up a Date Warp so a job can be executed outside of the MFE IDE.
Problem:
How do you set up and execute a JCL in a project off-shift with a date different than today? This is easy in debug but can you set the date warp up to get the job triggered by the Windows scheduler?
Resolution:
There are two parts to this solution. You will need some environment variables set up on the machine/server and you need a .CMD file to run the job. We have runtime tunables that can be used and there are settings for datewarp and timewarp. Set up a configuration file and the put the date and time into the cfg file so it can be picked up at runtime. Edit a file with an extension of .cfg, for example:
SET name=value
where:
name The name of the run-time tunable .
value The value to be assigned to the run-time tunable .
Possible names are 'datewarp' or 'datewarp_dynamic' and you can set values for current_day, current_year etc. in the .cfg file that will be honored at runtime. Once you have edited and saved the .cfg file, the next step is to add a Windows environment variable to let the runtime know where your .cfg file is. Go to your Windows environment tab to set this value.
SET COBCONFIG=e:\\mydir\\myconf.cfg
The set statement in the batch file sets the locations of the .cfg file. Next, set up the batch job, for example:
REM THIS will execute a batch job in a project
REM it iwl be scheduled to run
Q:
cd \\mfsync
CALL C:\\mfe\\base\\bin\\createnv.bat
echo Starting batch job
MFECL /runexe Q:\\MFUSER\\Projects31\\Run_Batch_Pilot_400\\Run_Batch_Pilot_400.MVP MFJCL.exe Q:\\MFUSER\\Projects31\\Run_Batch_Pilot_400\\DATA\\TESTSCHED.JCL /JCLVER:JES-2
exit
#EnterpriseDeveloper
#MFDS