--------------------------------------------------------------
IPLING OS/360 (MFT) FOR DUMMIES
written by Jay Maynard, 17 Jan 2000
with additional contributions by Tony Harminc and Roger Bowler
--------------------------------------------------------------

Start Hercules in S/370 mode using the OS/360 configuration file:

hercules-370 -f os360.cnf

Connect a telnet client to port 1052:

telnet your.machine.name 1052

At the Hercules control panel, IPL from the MFTR33 volume:

ipl 150

On your telnet screen you should see:

Hercules S/370 version 1.47 at your.machine (Linux 2.2.5) device 0009
IEA218I MOD=50 ASSUMED S360
IEA101A  SPECIFY SYSTEM PARAMETERS FOR RELEASE 21.0  MFT
HHC901I Enter input for console device 0009                                                                                                                                    # the device geometry fr

Just press enter.  You should then see:

IEA217I SEREP INTERFACE ESTABLISHED
*00 IEE801D CHANGE PARTITIONS- REPLY YES/NO (,LIST)

Now enter the reply:

r 00,yes

to which you'll get:

IEE866I DEFINE COMMAND BEING PROCESSED
*00 IEE802A ENTER DEFINITION

Now, reply:

r 00,p0=(a,512k),p1=(a,512k),list,end

to give yourself two partitions you can actually run stuff in;
the default partition sizes are a bit too small...and you'll get:

 IEE804I P0=(A,524288),P1=(A,524288),
 IEE812I P 01 HAS   981480 EXCESS BYTES ADDED IN H0
 IEE805I DEFINITION COMPLETED
 IEE101A READY                                                                                                                                                                                                                                          I  

Next set the system date.  The first time you run the system, you
should format the job queue dataset with:

t date=72.024,q=(,f)

You will get:

*00 IEF423A SPECIFY JOB QUEUE PARAMETERS                                            2I P 01 HAS

to which you can reply 'U' (if in doubt, always reply 'U'!)

r 00,u

For subsequent IPLs, just set the date without the q=(,f) parameter:

t date=72.024

72 is a very good year to choose: it's bang in the middle of when
these systems were actually running, and it just happens to have the
same day-of-week mapping as 2000 (including the leap year).

Wait for the system to enter an enabled wait state, then
turn on allocation and job name/step monitoring:

mn jobnames
mn status

(None of those three commands will produce any output.)
Now, start a writer. Assuming you have a printer defined at 00E, do:

s wtr.p0,00e

to start an output writer in partition P0 on that printer.
You should see messages about the writer being started, and then:

IEF868I 00E WTR WAITING FOR WORK P00

This means that the writer has printed everything waiting for it.
You can leave it running...that's why you have two usable partitions.

To run a job, have the JCL in a file that you can point Hercules to.
Assuming you have a card reader defined at 00A, tell the emulator
where the file is, on the Hercules control panel, with:

devinit 00a <filename> ascii trunc

The ascii and trunc operands make Hercules do the Right Thing with a
Unix text file. (Leave them off if you're using an EBCDIC or binary
card deck image.) Now, start a reader task to read in the deck, back
on the OS telnet screen:

s rdr.p1,00a

Note that the reader will run in partition P1. If you start it in
P0, with the writer still running, nothing will happen until you
close the writer.  When the reader runs, you'll see messages about
the reader starting, then, at the end of the deck:

IEF161I 00A-READER CLOSED P01

The jobstream is now in the system, ready for processing.
Start an initiator to run it:

s init.p1,,,a

This will run the job in P1.

Most operator commands you're used to from MVS will work, as long as
they're OS commands and not JES2/JES3, neither of which are present
in the system.  (This is why you have to manually start the reader
for each job, among other things)  You can only do two things at
once in the starter system, since there are only two partitions, and
that's a parameter set at sysgen time.  If we can ever get an MVT
sample system sysgenned, then this restriction will go away.

Some commands you can enter:
   d n     - display jobs in queue
   d a     - display active jobs
   d r     - display outstanding replies
   d u     - display units (aka I/O devices)

If you're a neat freak like me (at least when it comes to OSes), you
can shut the system down cleanly by stopping the writer:

p 00e
IEF301I 00E WTR CLOSED P00
IEF404I WTR      ENDED      P00

and then halt the system:

z eod
IEA000I 150,CMD,A4,0E00,,,MFTR33,
IEA000I 150,,,,8000000000000001,000000000000
IEA000I 151,CMD,A4,0E00,,,WORK01,
IEA000I 151,,,,8000000000000001,000000000000
IEE334I HALT     EOD SUCCESSFUL

(The IEA000I messages are because Hercules doesn't emulate a diagnostic
counter read on the emulated 3330.  It's harmless.  You'll see one pair
of messages for each DASD volume you have in the system.)


--------------------------------------------------------------
HOW TO PERMANENTLY MOUNT A REMOVABLE VOLUME
written by Jay Maynard, 02 Feb 2000
--------------------------------------------------------------
To get a removable volume, such as a 3330 (or 2314, or 2311), marked
reserved (RSERV in the D U display) to make the system decide not to
unmount it, if it's online at IPL (as it will always be in Hercules),
you must:

1) Vary the volume offline:
    V cuu,OFFLINE
2) Start something: a job, a reader, a writer, some other started
   task.  This is why nearly every MVS shop (and, I presume, earlier
   ones as well) had a started task named X: to have a nice easy
   fast something to start to get offline processing done easily.)
   The expected response, among the other output from the something
   you started, is:
IEF281I cuu   NOW OFF-LINE           P00
IEA000I cuu,CMD,A4,0E00,,,volser, P00
IEA000I cuu,,,,8000000000000001,000000000000 P00
   (The IEA000I I/O error messages are harmless...wonder how hard
    it'd be to dummy up a diagnostic read CCW handler for CKD DASD.)
3) Mount the volume with:
    M cuu,VOL=(SL,volser),USE={PUBLIC|PRIVATE|STORAGE}
   (PUBLIC means that scratch datasets will be placed there
    preferentially; PRIVATE means that only datasets explicitly placed
    on that volume will go there; STORAGE means that new non-temporary
    datasets will be allocated there. In general, it's best to have
    two or three PUBLICs, at least one STORAGE, and the rest
    PRIVATE...but this is one thing that varies quite a bit from one
    shop to the next.)
4) Start something else. See step 2. The expected response, among
   the other output from the something you started, is:
IEF279I cuu   NOW MOUNTED            P00
5) Vary the volume online:
    V cuu,ONLINE
   This time you don't have to start anything...you'll be immediately
   greeted with:
IEE302I cuu     ONLINE


--------------------------------------------------------------
A LESS PAINFUL WAY TO MOUNT VOLUMES IN MFT
written by Charles "Dutch" Owen, 03 Feb 2000
--------------------------------------------------------------
This worked for me:  the first time I got the mount request for
DLIB01  The "M" Message I responded:

   M 152,VOL=(SL,DLIB01)

...It swallowed this without complaint and never asked to mount
DLIB01 again for the rest of the sysgen stage 2 ... and a D U
shows DLIB01 marked private/reserved.


--------------------------------------------------------------
HOW TO CREATE THE MOUNT ATTRIBUTE TABLE IN SYS1.PARMLIB
written by Bradley S Schmidt, 02 Feb 2000
--------------------------------------------------------------
The VATLSTxx equivalent was called PRESRES.

The format of each record is:

vvvvvvmuddddp

vvvvvv - volser
m - mount attribute 0=permanent/resident 1=reserved
u - use attribute 0=storage 1=public 2=private
dddd - device type (2314, 3330, etc)
p - "priority" N=don't issue mount message

The code which handles this member is in /srclibs/ci505/IEFPRES.txt


