Examples:

000A 2501 127.0.0.1:2501 SOCKDEV ASCII TRUNC EOF

000C 3505 localhost:1234 SOCKDEV ASCII TRUNC EOF

0012 3505 3505 SOCKDEV ASCII TRUNC EOF

0014 2501 /tmp/hercrdr.014 SOCKDEV ASCII TRUNC EOF

15.2 Submitting Jobs from Windows

The “HercRdr” program is distributed as part of Fish’s GUI package and allows you to send jobs to a
socket reader via TCP/IP. Simply enter “HercRdr” from the command line (i.e. from a “Command Prompt”
window if you are using Windows NT / 2K / XP) to submit your file(s).

The following screen print shows the help information from the HercRdr program that is displayed
whenever the program is called without parameters:

D:\HERCULES>hercrdr

Submits card file(s) to a Hercules card reader bound to a given socket:port.

Format:

HERCRDR [-nnn] [host:port] file [file...]

Where:

-nnn timeout value in seconds (1-999; default is 3)

host:port sock_spec of target reader (if not specified,

value of HERCRDR environ var is used, if set)

file file(s) to be submitted

Examples:

HERCRDR localhost:1234 fileone.txt filetwo.txt

set HERCRDR=localhost:1234

HERCRDR file3.txt file4.txt

HERCRDR override:5678 filefive.txt

HERCRDR 192.168.0.1:5678 666.txt 777.txt 888.txt 999.txt

Returns:

-1 unclassified error

0 file(s) successfully submitted

1 no route to host (bad sock_spec or connection refused)

2 timeout value exceeded while trying to connect

3 transmission error (e.g. connection prematurely closed)

4 file not found (or other file error)

Figure 352: HercRdr Help Screen

15.2.1 How to submit jobs directly from SPF/PC

If you are lucky enough to have a copy of the excellent editor SPF/PC Version4 or SPF/Pro (produced by
CTC but unfortunately no longer available), then you can submit jobs directly from your edit session. The
SUB command can be implemented by means of a REXX macro such as the following one, provided by
Volker Bandke:

/* +----------------------------- REXX -----------------------------+ */

/* */

/* Name: D:\APPS\SPFPRO\REXX\USER\SUB.SPF */

/* */

/* Type: SPF edit macro */

/* */

/* Desc: submit JCL to MVS 3.8 */

/* */

/* Creation date: 24 Aug 1999, creation time: 18:49:40 */

/* */

/* Author: (c) Volker Bandke */

/* */

/* +----------------------------------------------------------------+ */

'isredit macro (p1 p2 p3 p4 p5 p6 p7 p8 p9)'

"ISREDIT (member) = MEMBER"

"ISPEXEC CONTROL ERRORS CANCEL"

parse upper var member file '.' ext

do

'ISREDIT REPLACE' $$$$$$$$.SPF '.ZF .ZL'

ADDRESS "CMD" "HERCRDR 192.168.1.102:3505 $$$$$$$$.SPF"

zedsmsg = 'File submitted'

zedlmsg = 'The member '||member||' has been submitted to MVS'

'ispexec setmsg msg(isrz000)'

ADDRESS "CMD" "DELETE $$$$$$$$.SPF"

end

EXIT 0

Figure 353: SUBmit REXX for SPF/PC

15.3 Submitting Jobs from Unix

Submitting jobs from Unix can be done in two different ways, described in detail in the next sections:

Using a Perl script Using the netcat program

15.3.1 Using a Perl script

Malcolm Beattie has provided a simple Perl script which can submit jobs using either TCP/IP or Unix
Domain Sockets. The script is invoked using one of the following command formats:

Previous Page Next Page