After migrating the TAMSTC and SJVSTC started tasks from Java 17 to Java 21, TAMSTC fails to start and abends with code U4038. The following error messages are observed in the SYSOUT:
CEE3512S An HFS load of module CRTEQCXA failed.
The system return code was 0000000135; the reason code was 0594003C.
z/os
tamz
The issue is caused by an incorrect environment variable configuration in the STDENV or JCL. Specifically, a variable intended for the CLASSPATH (which points to a file or library) was erroneously added to the LIBPATH.
The LIBPATH must contain only valid Unix System Services (USS) directories. If it contains a string that is not a directory, the Java launcher fails to load required HFS modules like CRTEQCXA.
To resolve the abend, correct the environment variable definitions for the TAMSTC task: