Created On:  24 March 2011

Problem:

How can I determine what Micro Focus COBOL products (if any) are installed on a UNIX or Linux machine?

Resolution:

Use a "find" command to search the machine for files named "cobver".

Subordinate to each directory where a Micro Focus COBOL product was installed on a Linux/UNIX machine, will be a file named "cobver".  It is a short text file containing version information -- "cobver" is short for "cobol version".  The file is present in all Micro Focus UNIX/Linux COBOL products, including:

Object COBOL Developer's Suite (OCDS)
Application Server for Object COBOL Developer's Suite
Server Express
Application Server for Server Express
Server for COBOL
Studio Enterprise Edition (i.e. Server Express 6.x)
Server Enterprise Edition
Visual COBOL
Enterprise Developer
COBOL Server

It is possible more than one Micro Focus COBOL product is installed on a particular UNIX or Linux machine -- in that case, more than one "cobver" file will be discovered.

The "find" command to search the machine looking for "cobver" files, and to display the contents of any such files, is as follows:

find  /  -name  cobver  -print  -exec cat {} \\;  -exec echo \\;  2>/dev/null

Since this command traverses the machine's directory structure from root down, you should run it with root credentials.   But if obtaining root credentials is not practical, it can be run successfully with the credentials of a typical user.  The phrase "2>/dev/null" at the end will discard error messages that will occur if the "find" command cannot descend into protected directories, but the COBOL directories will not be among these -- the "cobver" file and its containing directories will have read-access permissions for a typical user, so again this command can be run successfully with the credentials of a typical user if necessary.

If the machine has a large amount of disk space, and especially if it has disks remotely mounted, for example via NFS, then the above "find" command could take a very long time.  For this reason I recommend the following variation, that will avoid searching NFS mounted file systems:

find  /  -name cobver  -print  -exec cat {} \\;  -exec echo \\;  -o -fstype nfs -prune  2>/dev/null

The "find" command will display a list of any "cobver" files found, along with their contents, and with an "echo" (blank line) between each.  Here is example output:

/products/sx50-fp14/etc/cobver
cobol v5.0.00-e
PRN=RXCTR/AAK:9j.j3.50.02
PTI=ES
PTI=Fixpack50.02_14

/products/sx40sp2_wby/etc/cobver
cobol v4.0.00-e
PRN=RXCTO/AAD:9i.T4.40.03
PTI=SP2
PTI=ES

/products/9m.W4.51.01/es_cobol/etc/cobver
cobol v5.1.00-e (17519.19094)
PRN=RXCTS/AAI:9m.W4.51.01
PTI=ES

For an explanation of how to interpret the contents of the "cobver" file, including the PRN, refer to this Knowledgebase article:

http://community.microfocus.com/microfocus/cobol/net_express__server_express/w/knowledge_base/1496.how-do-i-know-which-product-i-currently-have-set-up.aspx
 
Incident #2509152