Using variables in KM options (and reusing the variables in an interface, package, and so on)
There are times when
it is useful to insert a variable within a KM option and later access that variable's value within an interface or procedure. A typical use case might be to provide the primary directory path for a log
file and then add a file name to the path definition from an interface. In this recipe, we will create a log path
variable, embed it into a new option within a duplicated copy of an IKM, then create an interface that will amend the IKM option by adding a file name to the path.
How to do it...
Within your project, insert a new Variable called
PV_PATH_LOG
.Select the data type as
Alphanumeric
(if the path were to be greater than 255 characters in length, we would need to use theText
data type)Select the Keep History option as No History
Duplicate the
IKM SQL Control Append
KM and rename it toIKM SQL Control Append – with logging
.Insert a new option for the IKM called
DIRECTORY_FILE_PATH...