So given you’ve got your nice z/OS copy from a special bay of pirates and you now wanna get cracking.
The only problem is: The storage is way too small.
The Hercules doc does here a good job in emulating not only the IBM mainframe but also the uselessness of IBM documentations.
Here a quick and dirty guide on how to initialize a new DASD device from the UNIX shell, so that you don’t have to fight with the base system and so.
First you’ve got to go to your images folder and create an image.
In my case it’s located in the DASD subfolder called GNU.
The following command should give you around 6GB of storage (8000 cylinders)
dasdinit -z LOCAL.CCKD 3390-3 LOCAL 8000
Next we have to add it into our hercules.cnf which should look somehow like that.
Make sure the address (0AB5) doesn’t collide with already existing DASD lines.
0AB5 3390 $(DASD)/GNU/LOCAL.CCKD
Next we start up the mainframe (https://blog.the-leviathan.ch/?p=1361) and go into the x3270 command shell (not the one with the ncurses like selection menu)
Here we first bring the DASD offline with
Now we go into the telnet session and create a file, let’s say script.txt with the following content
//ICKDSF01 JOB (FB3),'INIT 3390 DASD',CLASS=A,MSGCLASS=H, // NOTIFY=&SYSUID,MSGLEVEL=(1,1) //* 3380/3390 INITIALIZE VOLUME //* //* VARY DEVICE ONLINE/OFFLINE AT LEAST ONCE BEFORE RUNNING //* THIS JOB, OR I/O ERROR WILL OCCUR AND NOT INITIALIZE //* //* CHANGE //* VVVV - TO CUA ADDRESS OF DASD //* NEWNNN - TO NEW DASD VOLID //* //* THEN PLACE A VVDS AT CYL 0 TRK 10-14 WITH JOB IDCDEFVV //* //STEP01 EXEC PGM=ICKDSF,REGION=8M //SYSPRINT DD SYSOUT=* //SYSIN DD * INIT - MAP /* MAP DEFECTS */ - UNIT(0AB5) /* ADDRESS */ - NOCHECK - CONTINUE - NOVERIFY /* DO NOT CHECK VOLID */ - VTOC(0,1,450) /* 8000 CYL VTOC */ - INDEX(30,1,90) /* 8000 CYL INDEX */ - OWNERID('IBMUSER') - VOLID(LOCAL) /* NEW VOLID */ //* // //*
And now comes they key part no one tells you about:
In your UNIX shell on Telnet you just pipe the content of this textfile to the z/OS command “submit”
IBMUSER:/u/ibmuser: >submit script.txt JOB JOB02860 submitted from path 'script.txt'
In case you get something like the message below, you can reply by using the REPLY command and the number with the asterisk.
Now we wait for a few minutes and after that we go back into our x3270 shell and bring the DASD back online with (Oh wonder)
Now we can define an aggregate from this volume with zfsadm and format it.
IBMUSER:/u/ibmuser: >zfsadm define -aggregate PEP.LOCAL -volume LOCAL -cyl 8000 IOEZ00248I VSAM linear dataset PEP.LOCAL successfully created. IBMUSER:/u/ibmuser: >zfsadm format PEP.LOCAL IOEZ00552I Multi-file system aggregates are restricted and support will be removed; plan to migrate. Done. PEP.LOCAL is now a zFS aggregate. IBMUSER:/u/ibmuser: >zfsadm attach PEP.LOCAL IOEZ00552I Multi-file system aggregates are restricted and support will be removed; plan to migrate. IOEZ00117I Aggregate PEP.LOCAL attached successfully IBMUSER:/u/ibmuser: >zfsadm create -filesystem PEP.LOCAL -aggregate PEP.LOCAL -size 6291456 IOEZ00099I File system PEP.LOCAL created successfully
For mounting it temporaraly you can execute the following command:
IBMUSER:/u/ibmuser: >/usr/sbin/mount -f PEP.LOCAL -t ZFS -o 'AGGRFULL(90,5)' /usr/local IBMUSER:/u/ibmuser: >
tso -t "MOUNT FILESYSTEM(PEP.LOCAL) TYPE(ZFS) MOUNTPOINT('/usr/local') MODE(RDWR)"
If you wanna add it to the auto mounted folders you’ve got to edit the mounting table in TSO. Just follow the white rabbit in the following screenies down the rabbit hole.
Now we add the TSO command from above here in the table at the end of the other mount directives.
In order to get some more newlines you go to the beginning of the number of the empty line and over type the first digit with R (for repeat) and then press enter.
Type “save” in the command field and then the command “end” (you get there by navigating there with the tab key), and as many ends as needed to come back to the top view.