If you declare an EXTERNAL variable in more than one compilation unit, then those declares must match. In particular, all the attributes in the two declares must match.
For example, if you declare an EXTERNAL FILE in one compilation unit with the attributes KEYED ENV( VSAM ), then you must declare it with the same attributes in any other program linked with the first.