diff --git a/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCode.C b/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCode.C
index 0e92a02440333590377b077d723c8bf50e43a2d6..422d0687a6265a2e077585727059c55a439aa4e1 100644
--- a/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCode.C
+++ b/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCode.C
@@ -31,6 +31,7 @@ License
 #include "OSspecific.H"
 #include "etcFiles.H"
 #include "dictionary.H"
+#include "foamVersion.H"
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
@@ -81,7 +82,7 @@ void Foam::dynamicCode::checkSecurity
             << "    allowSystemOperations 1" << nl << nl
             << "to the InfoSwitches setting in the system controlDict." << nl
             << "The system controlDict is any of" << nl << nl
-            << "    ~/.OpenFOAM/" << OPENFOAM << "/controlDict" << nl
+            << "    ~/.OpenFOAM/" << foamVersion::api << "/controlDict" << nl
             << "    ~/.OpenFOAM/controlDict" << nl
             << "    $WM_PROJECT_DIR/etc/controlDict" << nl << endl
             << exit(FatalIOError);
diff --git a/src/OpenFOAM/global/argList/argList.C b/src/OpenFOAM/global/argList/argList.C
index e74e2eca524847b8c42c888de86dcdaa50005f5c..cfda839e665472d2be6f6663358d1b9de39e6e65 100644
--- a/src/OpenFOAM/global/argList/argList.C
+++ b/src/OpenFOAM/global/argList/argList.C
@@ -1539,11 +1539,7 @@ void Foam::argList::displayDoc(bool source) const
     CStringList command(stringOps::splitSpace(docBrowser));
 
     Info
-        << "OpenFOAM"
-        #if OPENFOAM
-        << ' ' << OPENFOAM
-        #endif
-        << " documentation:" << nl
+        << "OpenFOAM " << foamVersion::api << " documentation:" << nl
         << "    " << command << nl << endl;
 
     Foam::system(command, true);
diff --git a/src/functionObjects/utilities/systemCall/systemCall.C b/src/functionObjects/utilities/systemCall/systemCall.C
index 26d19cd5587332d20b47bd37b9d5bea17066d4af..0b19fda5e363502890b87f7ac3e3f025ba3daff2 100644
--- a/src/functionObjects/utilities/systemCall/systemCall.C
+++ b/src/functionObjects/utilities/systemCall/systemCall.C
@@ -26,6 +26,7 @@ License
 #include "systemCall.H"
 #include "Time.H"
 #include "dynamicCode.H"
+#include "foamVersion.H"
 #include "addToRunTimeSelectionTable.H"
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@@ -127,7 +128,7 @@ bool Foam::functionObjects::systemCall::read(const dictionary& dict)
             << "    allowSystemOperations 1" << nl << nl
             << "to the InfoSwitches setting in the system controlDict." << nl
             << "The system controlDict is any of" << nl << nl
-            << "    ~/.OpenFOAM/" << OPENFOAM << "/controlDict" << nl
+            << "    ~/.OpenFOAM/" << foamVersion::api << "/controlDict" << nl
             << "    ~/.OpenFOAM/controlDict" << nl
             << "    $WM_PROJECT_DIR/etc/controlDict" << nl << endl
             << exit(FatalError);