There are a number of API calls that you can call from a COBOL program to carry out JCL-type tasks.
MFJCTLBP MFJCTLBP is the JCL control block interface API which enables the retrieval of information related to the JCL control block
or the DD control block parameters.
MFJZABND MFJZABND abends the current job step with a system or user abend.
MFJZLOG MFJZLOG writes a message to the syslog and/or the joblog.