{"id":1376,"date":"2019-12-26T17:40:59","date_gmt":"2019-12-26T15:40:59","guid":{"rendered":"http:\/\/blog.the-leviathan.ch\/?p=1376"},"modified":"2020-01-13T05:26:32","modified_gmt":"2020-01-13T03:26:32","slug":"adding-dasd-storage-in-herculesz-os","status":"publish","type":"post","link":"https:\/\/blog.the-leviathan.ch\/?p=1376","title":{"rendered":"Adding DASD storage in Hercules+z\/OS"},"content":{"rendered":"\n<p>So given you&#8217;ve got your nice z\/OS copy from a special bay of pirates and you now wanna get cracking.<br \/>The only problem is: The storage is way too small.<br \/>The Hercules doc does here a good job in emulating not only the IBM mainframe but also the uselessness of IBM documentations.<br \/>Here a quick and dirty guide on how to initialize a new DASD device <strong>from the UNIX shell<\/strong>, so that you don&#8217;t have to fight with the base system and so.<\/p>\n\n\n\n<p>First you&#8217;ve got to go to your images folder and create an image.<br \/>In my case it&#8217;s located in the DASD subfolder called GNU.<\/p>\n\n\n\n<p>The following command should give you around 6GB of storage (8000 cylinders)<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>dasdinit -z LOCAL.CCKD 3390-3 LOCAL 8000<\/code><\/pre>\n\n\n\n<p>Next we have to add it into our hercules.cnf which should look somehow like that.<br \/>Make sure the address (0AB5) doesn&#8217;t collide with already existing DASD lines.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>0AB5    3390 $(DASD)\/GNU\/LOCAL.CCKD<\/code><\/pre>\n\n\n\n<p>Next we start up the mainframe (<a href=\"https:\/\/blog.the-leviathan.ch\/?p=1361\">https:\/\/blog.the-leviathan.ch\/?p=1361<\/a>) and go into the x3270 command shell (not the one with the ncurses like selection menu)<\/p>\n\n\n\n<p>Here we first bring the DASD offline with<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>V 0AB5,OFFLINE<\/code><\/pre>\n\n\n\n<p>Now we go into the telnet session and create a file, let&#8217;s say script.txt with the following content<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ICKDSF01 JOB  (FB3),'INIT 3390 DASD',CLASS=A,MSGCLASS=H,\n\/\/             NOTIFY=&amp;SYSUID,MSGLEVEL=(1,1)\n\/\/* 3380\/3390 INITIALIZE VOLUME\n\/\/*\n\/\/*   VARY DEVICE ONLINE\/OFFLINE AT LEAST ONCE BEFORE RUNNING\n\/\/*       THIS JOB, OR I\/O ERROR WILL OCCUR AND NOT INITIALIZE\n\/\/*\n\/\/*   CHANGE\n\/\/*     VVVV - TO CUA ADDRESS OF DASD\n\/\/*   NEWNNN - TO NEW DASD VOLID\n\/\/*\n\/\/*   THEN PLACE A VVDS AT CYL 0 TRK 10-14 WITH JOB IDCDEFVV\n\/\/*\n\/\/STEP01  EXEC PGM=ICKDSF,REGION=8M\n\/\/SYSPRINT  DD SYSOUT=*\n\/\/SYSIN     DD *\n INIT -\n      MAP \/* MAP DEFECTS *\/ -\n      UNIT(0AB5) \/* ADDRESS *\/ -\n      NOCHECK -\n      CONTINUE -\n      NOVERIFY \/* DO NOT CHECK VOLID *\/ -\n      VTOC(0,1,450) \/* 8000 CYL VTOC *\/ -\n      INDEX(30,1,90) \/* 8000 CYL INDEX *\/ -\n      OWNERID('IBMUSER') -\n      VOLID(LOCAL) \/*  NEW VOLID  *\/\n\/\/*\n\/\/\n\/\/*<\/code><\/pre>\n\n\n\n<p>And now comes they key part no one tells you about:<br \/>In your UNIX shell on Telnet you just pipe the content of this textfile to the z\/OS command &#8220;submit&#8221;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>IBMUSER:\/u\/ibmuser: >submit script.txt\nJOB JOB02860 submitted from path 'script.txt'<\/code><\/pre>\n\n\n\n<p>In case you get something like the message below, you can reply by using the REPLY command and the number with the asterisk.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1252\" height=\"800\" src=\"https:\/\/blog.the-leviathan.ch\/wp-content\/uploads\/2020\/01\/image.png\" alt=\"\" class=\"wp-image-1460\"\/><\/figure>\n\n\n\n<p>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)<\/p>\n\n\n\n<p><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>V 0AB5,ONLINE<\/code><\/pre>\n\n\n\n<p>Now we can define an aggregate from this volume with zfsadm and format it.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>IBMUSER:\/u\/ibmuser: >zfsadm define -aggregate PEP.LOCAL -volume LOCAL -cyl 8000\nIOEZ00248I VSAM linear dataset PEP.LOCAL successfully created.\n\nIBMUSER:\/u\/ibmuser: >zfsadm format PEP.LOCAL\nIOEZ00552I Multi-file system aggregates are restricted and support will be removed; plan to migrate.\nDone.  PEP.LOCAL is now a zFS aggregate.\n\nIBMUSER:\/u\/ibmuser: >zfsadm attach PEP.LOCAL\nIOEZ00552I Multi-file system aggregates are restricted and support will be removed; plan to migrate.\nIOEZ00117I Aggregate PEP.LOCAL attached successfully\n\nIBMUSER:\/u\/ibmuser: >zfsadm create -filesystem PEP.LOCAL -aggregate PEP.LOCAL -size 6291456\nIOEZ00099I File system PEP.LOCAL created successfully<\/code><\/pre>\n\n\n\n<p>For mounting it temporaraly you can execute the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>IBMUSER:\/u\/ibmuser: >\/usr\/sbin\/mount -f PEP.LOCAL -t ZFS -o 'AGGRFULL(90,5)' \/usr\/local\nIBMUSER:\/u\/ibmuser: ><\/code><\/pre>\n\n\n\n<p>OR<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>tso -t \"MOUNT FILESYSTEM(PEP.LOCAL) TYPE(ZFS) MOUNTPOINT('\/usr\/local') MODE(RDWR)\"<\/code><\/pre>\n\n\n\n<p>If you wanna add it to the auto mounted folders you&#8217;ve got to edit the mounting table in TSO. Just follow the white rabbit in the following screenies down the rabbit hole.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"608\" height=\"735\" src=\"https:\/\/blog.the-leviathan.ch\/wp-content\/uploads\/2019\/12\/Screenshot_20191227_165644.png\" alt=\"\" class=\"wp-image-1410\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"608\" height=\"735\" src=\"https:\/\/blog.the-leviathan.ch\/wp-content\/uploads\/2019\/12\/Screenshot_20191227_165731.png\" alt=\"\" class=\"wp-image-1412\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"608\" height=\"735\" src=\"https:\/\/blog.the-leviathan.ch\/wp-content\/uploads\/2019\/12\/Screenshot_20191227_165758.png\" alt=\"\" class=\"wp-image-1414\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"608\" height=\"735\" src=\"https:\/\/blog.the-leviathan.ch\/wp-content\/uploads\/2019\/12\/Screenshot_20191227_165829.png\" alt=\"\" class=\"wp-image-1416\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"608\" height=\"735\" src=\"https:\/\/blog.the-leviathan.ch\/wp-content\/uploads\/2019\/12\/Screenshot_20191227_165918.png\" alt=\"\" class=\"wp-image-1418\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"608\" height=\"735\" src=\"https:\/\/blog.the-leviathan.ch\/wp-content\/uploads\/2019\/12\/Screenshot_20191227_165935.png\" alt=\"\" class=\"wp-image-1419\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"608\" height=\"735\" src=\"https:\/\/blog.the-leviathan.ch\/wp-content\/uploads\/2019\/12\/Screenshot_20191227_170115.png\" alt=\"\" class=\"wp-image-1421\"\/><\/figure>\n\n\n\n<p>Now we add the TSO command from above here in the table at the end of the other mount directives.<\/p>\n\n\n\n<p>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.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"608\" height=\"735\" src=\"https:\/\/blog.the-leviathan.ch\/wp-content\/uploads\/2019\/12\/Screenshot_20191227_172645.png\" alt=\"\" class=\"wp-image-1422\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"608\" height=\"735\" src=\"https:\/\/blog.the-leviathan.ch\/wp-content\/uploads\/2019\/12\/Screenshot_20191227_172718.png\" alt=\"\" class=\"wp-image-1423\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"608\" height=\"735\" src=\"https:\/\/blog.the-leviathan.ch\/wp-content\/uploads\/2019\/12\/Screenshot_20191227_173045.png\" alt=\"\" class=\"wp-image-1424\"\/><\/figure>\n\n\n\n<p>Type &#8220;save&#8221; in the command field and then the command &#8220;end&#8221; (you get there by navigating there with the tab key), and as many ends as needed to come back to the top view.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So given you&#8217;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 &hellip; <a href=\"https:\/\/blog.the-leviathan.ch\/?p=1376\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Adding DASD storage in Hercules+z\/OS<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1376","post","type-post","status-publish","format-standard","hentry","category-daily"],"_links":{"self":[{"href":"https:\/\/blog.the-leviathan.ch\/index.php?rest_route=\/wp\/v2\/posts\/1376","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.the-leviathan.ch\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.the-leviathan.ch\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.the-leviathan.ch\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.the-leviathan.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1376"}],"version-history":[{"count":36,"href":"https:\/\/blog.the-leviathan.ch\/index.php?rest_route=\/wp\/v2\/posts\/1376\/revisions"}],"predecessor-version":[{"id":1462,"href":"https:\/\/blog.the-leviathan.ch\/index.php?rest_route=\/wp\/v2\/posts\/1376\/revisions\/1462"}],"wp:attachment":[{"href":"https:\/\/blog.the-leviathan.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1376"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.the-leviathan.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1376"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.the-leviathan.ch\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1376"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}