Could you please post your sample data as DDL statements? I'll give you an example but right now, I don't have time to do it with all the tables. This way I can start to work directly on the problem and will identify any possible problems with datatypes.
CREATE TABLE GLCMS(
IDN char(4),
KMSO char(4),
KCVA char(4),
FSCVA char(1))
INSERT INTO GLCMS
SELECT '0099', '0001', '0007', 'N' UNION ALL
SELECT '0099', '0001', '000D', 'A' UNION ALL
SELECT '0099', '0003', '0007', 'A' UNION ALL
SELECT '0099', '0003', '000D', 'A' UNION ALL
SELECT '0099', '0009', '0007', 'A' UNION ALL
SELECT '0099', '000A', '000D', 'A'