You can use a sequence, which is like an indentity column, but is not tied to any one table.
create sequence <sequence-name>; (run only once)
When you insert data into tables, it looks like this:
Insert into table_A values (nextval for <sequence-name>, current_timestamp, etc, etc,);
Insert into table_B values (nextval for <sequence-name>, 'Y', 24, current_date, etc, etc,);
Whether or not this is a good idea has nothing to do with DB2, it is more related to your database design. It is not considered to be 3rd normal form, but there may be some reason to use it in some limited cases.