Troubleshooting
Problem
The COBOL verbs GOBACK or STOP RUN cause a segmentation violation. This happens with DB2 or UDB.
Cause
The first program (the main) must have links to DB2. If your main program was not compiled the option -qSQL then it will not link to DB2 correctly.
Environment
DB2
Resolving The Problem
1. Use the compile option SQL on your main program.
2. Add any executable EXEC SQL statement to the main program's PROCEDURE DIVISION. The program need not execute this statement (you could locate it just after the STOP RUN or GOBACK) but it must be present.
[{"Product":{"code":"SS6SGM","label":"COBOL for AIX"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Runtime","Platform":[{"code":"PF002","label":"AIX"}],"Version":"2.0;3.1;4.1.1","Edition":"","Line of Business":{"code":"LOB17","label":"Mainframe TPS"}}]
Was this topic helpful?
Document Information
Modified date:
08 August 2018
UID
swg21250186