How do I generate a disc id tag?

I use Disc ID in folder name to identify folders. If I try a freedb lookup, it will obviously calculate the ID, but -- it seems -- that unless the disc is in freedb, it won't write it to tag.

Is there any action which will generate the value AND tag it?

No. There is no action in Mp3tag, but a "Tag Sources" dialog, which may help.

You can use the dialog "Mp3tag/Tag Sources/freedb (Local)" and push the radio button "determine from inserted Audio CD". One of the following dialog windows displays the calculated DISCID.
The DISCID then should be stored into the tag-field DISCID as given in the dialog along with the other track related data.
The DISCID value can also be copied to the clipboard, without permitting the dialog, and can be copied to anywhere else.
To calculate a proper DISCID or CDDBID you need the original CD (physical medium or disk image).

There is an example of the algorithm in Java language:
http://www.cs.princeton.edu/introcs/51data/CDDB.java.html

As I understand and know it ... the so called DISCID ... is not unique and someone can not rely on it as an identifier.

DD.20100902.1935.CEST

Right. Then I'll resort to my old solution: Hit the Freedb button and read the error message (where the ID is displayed).

And yes, there are ID collisions all over: http://nntp.gnus.org/circus/notes/cddb.html

If you only need a simple tool for calculating the CDDBID, then you may try this one VBCDRip6 exe.
VB6_CD_Ripper.zip (99.6 KB)

DD.20100904.1950.CEST

VB6_CD_Ripper.zip (99.6 KB)