For more official documentation and support, you can visit the Micro Focus Support Portal .

if command -v cobver &> /dev/null; then COBVER_OUT=$(cobver 2>/dev/null) VERSION=$(echo "$COBVER_OUT" | grep -i "version" | head -1 | awk 'print $3') echo "Micro Focus COBOL Version: $VERSION" exit 0 elif [ -f "$COBDIR/bin/cob" ]; then VERSION=$(what "$COBDIR/bin/cob" 2>/dev/null | grep -i "version" | head -1 | awk 'print $4') echo "Micro Focus COBOL Version (via what): $VERSION" exit 0 else echo "ERROR: Micro Focus COBOL not found or environment not set." exit 1 fi

Micro Focus COBOL Version 8.0.0 (Build 01) Copyright (C) 1984-2021 Micro Focus

Navigate to the licensing bin: cd /var/microfocuslicensing/bin Run the administration tool: ./cesadmintool.sh

find /opt/microfocus -name "libcobrts.so" -o -name "libcobrts64.so"

This may display product names and versions, though it’s less common for simple version checks.

Another way to check the COBOL version is by verifying the version of the libcob library. Here's how:

The Micro Focus Run-Time System (RTS) shared library also contains version information. This is useful if you have only the runtime, not the full compiler.

The exact commands vary slightly, but the core principles remain the same.

echo $COBDIR echo $COBPATH echo $LD_LIBRARY_PATH | grep microfocus