You need at least three
job steps in your test JCL:
1) The
compilation step, running the standard COBOL compiler as a program, taking your test program text as its input, and producing the compiler listing, and compiled object code as its output.
2) The
linkage or
binder step, running the standard BINDER as a program, taking the object module from step 1 as its input, also looking into standard libraries for any external functions, combining all needed stuff together, and producing the load module of your test program as its output, along with the binder listing.
3) The
run or
go or
execute step, it runs the test load module produced in step 2, and allows it to do whatever it wants to do.
Take a look at this example for the first two steps:
https://www.ibm.com/docs/en/adfz/adffzscc/1.8?topic=eczvp-sample-jcl-compiling-enterprise-cobol-zos-version-programsThe best way is, to consult with your site administration, because many settings may be very specific to a particular company.
Often there are customized
JCL procedures combining all required JCL steps under a single
// EXEC PROC=procname JCL statement.
Javas and Pythons come and go, but JCL and SORT stay forever.