Hercules, JCL, MVS38J, Utility

Submitting JCL to MVS 3.8J

Preface

(updated  2020-01-22)

JCL (Job Control Language) decks are used to submit JOBs via a reader device or an online edit session for batch processing on the public domain OS, MVS 3.8J (MVS will be used to mean MVS 3.8J in this post).

As a MVS 3.8J hobbyist / enthusiast, the previous statement is elementary and unequivocal.

The purpose of this post is to share some JCL submission methods used with MVS 3.8J executing under Hercules on Windows. Similar methods can be applied with Linux and/or MAC host OS systems.

1) Edit Session Copy-Paste and Submit

Using a 3270 edit-session (REVIEW, RPF or other editor), simply copy-paste fragments of JCL into the edit session. When completed, review JCL and submit to MVS using the SUB command!

2) Transfer and Submit

Using a 3270 emulator, transfer the JCL (via IND$FILE behind the scenes) ascii text file to a PDS member or sequential file to the host (MVS). When transfer completes, open an edit-session to review dataset containing JCL and submit to MVS using the SUB command!

3) Submit to MVS reader device

Using any ascii text editor (Notepad, Notepad ++, nano, SPF/PC, SPFLite, etc.) on your local device, review and save the target JCL text file (e.g. jcl.txt).

For those who ‘grew up’ in the legacy era, this method simulates feeding a card deck into the card hopper on a card reader attached to the mainframe (MVS).

Locate a reader device configured on your system for the appropriate JCL submission transport. Most TK3 and TK4- systems include several reader devices.

Referring to the configuration snippet below, device 010C is configured as a MVS reader with attributes (3505 reader device, ASCII data, truncate records greater than 80 bytes, eof assumed after last card read):

.
.
TK4- v8 default configuration from /conf/tk4-.cnf

# .-----------------------------Device number
# |    .------------------------Device type
# |    |   .--------------------File name
# |    |   |
# V    V   V
#--- ---- --------------------
#
# unit record devices
#
0002 3211 prt/prt002.txt ${TK4CRLF}
000E 1403 prt/prt00e.txt ${TK4CRLF}
000C 3505 ${RDRPORT:=3505} sockdev ascii trunc eof
000D 3525 pch/pch00d.txt ascii
0480 3420 *
010C 3505 jcl/dummy eof ascii trunc
010D 3525 pch/pch10d.txt ascii
000F 1403 prt/prt00f.txt ${TK4CRLF}
030E 1403 log/hardcopy.log ${TK4CRLF}
.
.

Note: configuration content may differ for your system.

Make note of the current device definition for later reinstatement.

Submit JCL (from local device to MVS) using the following Hercules console command:

DEVINIT 010C device-location/jcl.txt eof ascii trunc

JOB should appear on the MVS console when submitted for execution.

Reset the reader device to the original definition using the Hercules console command:

DEVINIT 010C jcl/dummy eof ascii trunc

4) Submit using sockets reader – HERCRDR

Using any ascii text editor (Notepad, Notepad ++, nano, SPF/PC, SPFLite, etc.) on your local device, review and save the target JCL text file.

On your local device, use HERCRDR, utility from SoftDevLabs, to submit JCL to MVS guest via a TCP/IP socket.

Referring to the configuration snippet below, device 000C is configured as a TCP/IP sockets reader (using port 3505, ASCII data, truncate records greater than 80 bytes, eof assumed after last card read):

.
.
TK4- v8 default configuration from /conf/tk4-.cnf

# .-----------------------------Device number
# |    .------------------------Device type
# |    |   .--------------------File name
# |    |   |
# V    V   V
#--- ---- --------------------
#
# unit record devices
#
0002 3211 prt/prt002.txt ${TK4CRLF}
000E 1403 prt/prt00e.txt ${TK4CRLF}
000C 3505 ${RDRPORT:=3505} sockdev ascii trunc eof
000D 3525 pch/pch00d.txt ascii
0480 3420 *
010C 3505 jcl/dummy eof ascii trunc
010D 3525 pch/pch10d.txt ascii
000F 1403 prt/prt00f.txt ${TK4CRLF}
030E 1403 log/hardcopy.log ${TK4CRLF}
.
.

Submit JCL text file to MVS from your host OS terminal window using the command:

HERCRDR localhost:3505 device-location/jcl.txt

More information about HERCRDR can be found at http://www.softdevlabs.com/index.html

5) Submit using sockets reader – NCAT

Using any ascii text editor (Notepad, Notepad ++, nano, SPF/PC, SPFLite, etc.) on your local device, review and save the target JCL text file.

On your local device, use NCAT (Windows NETCAT equivalent) utility from NMAP.ORG, to submit JCL to MVS guest via a TCP/IP socket.

Referring to the configuration snippet below, device 000C is configured as a TCP/IP sockets reader (using port 3505, ASCII data, truncate records greater than 80 bytes, eof assumed after last card read):

.
.
TK4- v8 default configuration from /conf/tk4-.cnf

# .-----------------------------Device number
# |    .------------------------Device type
# |    |   .--------------------File name
# |    |   |
# V    V   V
#--- ---- --------------------
#
# unit record devices
#
0002 3211 prt/prt002.txt ${TK4CRLF}
000E 1403 prt/prt00e.txt ${TK4CRLF}
000C 3505 ${RDRPORT:=3505} sockdev ascii trunc eof
000D 3525 pch/pch00d.txt ascii
0480 3420 *
010C 3505 jcl/dummy eof ascii trunc
010D 3525 pch/pch10d.txt ascii
000F 1403 prt/prt00f.txt ${TK4CRLF}
030E 1403 log/hardcopy.log ${TK4CRLF}
.
.

Submit JCL text file to MVS from your host OS terminal window using the command:

ncat localhost 3505 < device-location/jcl.txt

More information about NCAT for Windows or MAC OS can be found at https://nmap.org/download.html.

For Unix-type systems, use the NETCAT command with the same syntax:

netcat localhost 3505 < device-location/jcl.txt


Closing

Whether a JCL submission situation calls for using a 3270 emulator, Hercules console or TCP/IP sockets, all of the above methods are viable regardless of originating platform. That is, transferring a file (JCL) from a host OS (Windows, Linux, MacOS) to guest OS (<MVS) or within (TSO SUB) the guest OS (MVS).

The use of TCP/IP sockets facilitates the use of various utilities whose solution is driven by the user (developer) and host OS.

For example, Windows, Linux or MAC OS users can install and use NETCAT to transfer JCL to a TCP/IP sockets reader on MVS.

HercRdr is a Windows utility to transfer JCL to a TCP/IP sockets reader on MVS.

Submitting JOBS from 3270 emulator is a given!

Hopefully, this information provides an ‘oh, yea!’ moment and/or confirms some the listed methods.

Of course, others may exist… Do you have others? How creative are you?

Have fun!
Larry Belmontes

Leave a Reply

Your email address will not be published. Required fields are marked *


CAPTCHA Image
Reload Image

This site uses Akismet to reduce spam. Learn how your comment data is processed.