If the subprogram you are calling uses DB2, you need to specify this in the subprogram's properties, in order for the Mainframe Call Generator to insert additional code in the generated stub.
To set the DB2 property for the called subprograms, in the Mainframe Call Generator window, select the subprograms whose properties you want to change and:
When using Mainframe Call Generator to run a mainframe-hosted subprogram that uses DB2, you are prompted to specify the subsystem and plan to connect to.