With the Gen 8.6 UNIX/Linux CSE starting the CSE iefmd is a manual process.
One thing to note is that the launch directory where the iefmd is started from determines where the user directories are created during CSE usage i.e. it is that launch directory that is used to create the USERID sub-directories when model work is done.
When the CSE is started on Windows using the service CSESvcMD subsequent USERID directories are always created under the directory pointed to by the environment variable IEF_WORKINGDIR which is where the CSE iefmd log files are also already stored.
This article covers how to create a script to ensure that similar behaviour occurs on UNIX/Linux for the iefmd startup.
Assuming the CSE is installed into the default directory /opt/Gen/CSE.
A script /opt/Gen/CSE/cse/cfg/cse.sh is created at CSE configuration time and sets all required environment variables to start the CSE including IEF_CONFIGDIR (/opt/Gen/CSE/cse/cfg) and IEF_WORKINGDIR (/opt/Gen/CSE/cse/logs).
The startup script below can be created in any directory but to keep all configuration files together it is suggested that it is also created in the configuration directory /opt/Gen/CSE/cse/cfg. The suggested name for the script is startmd.sh and the contents are as follows:
=====#!/bin/bash
. /opt/Gen/CSE/cse/cfg/cse.sh
# Check iefmd is not already running.
if pgrep -x "iefmd" > /dev/null
then
echo "The CSE iefmd is already running"
exit
else
# Assuming it already exists backup the directory IEF_WORKINGDIR to keep a backup copy of log files and recreate it.
if [ -d "$IEF_WORKINGDIR" ]; then
mv $IEF_WORKINGDIR "$IEF_WORKINGDIR"_$(date +"%b%d-%Y-%H%M%S")
fi
mkdir $IEF_WORKINGDIR
# Also need to cd to the IEF_WORKINGDIR directory to ensure each user directory (e.g. ENCYADMN) is created there.
# Otherwise whatever is the current directory when iefmd is executed will end up being where the user directory is created.
cd $IEF_WORKINGDIR
$IEFCSGEN/iefmd /mdini=$IEF_CONFIGDIR/iefmd.ini /mderr=$IEF_WORKINGDIR/iefmd.log &
fi
=====
The relevant Gen 8.6 documentation references have now been updated to reflect the above advice e.g. Start a CSE on UNIX or Linux
Related knowledge hub article: Gen 8.6 Linux CSE knowledge hub