{"id":118,"date":"2011-11-02T11:29:10","date_gmt":"2011-11-02T16:29:10","guid":{"rendered":"http:\/\/tommysprinkle.com\/txxos\/?p=118"},"modified":"2021-04-17T18:29:59","modified_gmt":"2021-04-17T23:29:59","slug":"hercules-setup-and-ipl","status":"publish","type":"post","link":"https:\/\/tommysprinkle.com\/txxos\/?p=118","title":{"rendered":"Hercules Setup and IPL"},"content":{"rendered":"<p>First we need to create a Hercules configuration file. \u00a0I used the configuration file for my MVS system and stripped almost everything out.<\/p>\n<pre>#\r\n# Configuration file for Hercules CARD80 Stand Alone IPL Program\r\n#\r\n\r\nCPUSERIAL 068068\r\nCPUMODEL 0158\r\nARCHMODE S\/370\r\nMAINSIZE 2\r\nCNSLPORT 8270\r\nNUMCPU 1\r\n#\r\n\r\n000C 3505 card80.ipl\r\n000E 1403 card80.txt<\/pre>\n<p>There are only a few critical lines in the conf file. \u00a0We must set ARCHMODE to S\/370. \u00a0We can set MAINSIZE to just about anything since we only use a very small amount of man memory. \u00a0I set CNSLPORT to 8270 since my Hercules system running MVS uses 3270 as the console port.<\/p>\n<p>We only need to define two devices, our card reader and a printer. \u00a0The card reader is defined at the standard \u00a0address for a reader X&#8217;00C&#8217; and the printer at X&#8217;00E&#8217;. \u00a0The address of the printer must match what we coded in our program we will IPL. \u00a0The reader is associated with the file created when we punched the output from our program running on MVS. \u00a0It contains our standalone IPL deck and some data cards. \u00a0The printer is associated with a file that will receive the output from the printer.<\/p>\n<p>Now we can fire up Hercules and try to IPL.<\/p>\n<pre>&gt; hercules -f .\/card80.conf &gt; .\/card80.log<\/pre>\n<p>This will start up a Hercules instance and use our card80.conf file for the configuration. Console messages will be saved in the file card80.log.<\/p>\n<pre>17:39:58 Hercules Version 3.06\r\n17:39:58 (c)Copyright 1999-2009 by Roger Bowler, Jan Jaeger, and others\r\n17:39:58 Built on Nov 19 2009 at 14:40:57\r\n17:39:58 Build information:\r\n17:39:58   Modes: S\/370 ESA\/390 z\/Arch\r\n17:39:58   Max CPU Engines: 8\r\n17:39:58   Using setresuid() for setting privileges\r\n17:39:58   Dynamic loading support\r\n17:39:58   Using shared libraries\r\n17:39:58   No External GUI support\r\n17:39:58   HTTP Server support\r\n17:39:58   Regular Expressions support\r\n17:39:58   Automatic Operator support\r\n17:39:58   National Language Support\r\n17:39:58   Machine dependent assists: cmpxchg1 cmpxchg4 cmpxchg8 fetch_dw store_dw multi_byte\r\n17:39:58 Running on mvs Linux-2.6.13-15-default.#1 Tue Sep 13 14:56:15 UTC 2005 i686 UP\r\n17:39:58 HHCHD018I Loadable module directory is \/usr\/local\/lib\/hercules\r\n17:39:58 Crypto module loaded (c) Copyright Bernard van der Helm, 2003-2009\r\n17:39:58   Active: Message Security Assist\r\n17:39:58           Message Security Assist Extension 1\r\n17:39:58           Message Security Assist Extension 2\r\n17:39:58 HHCHT001I HTTP listener thread started: tid=40968BB0, pid=4423\r\n17:39:58 HHCHT013I Using HTTPROOT directory \"\/usr\/local\/share\/hercules\/\"\r\n17:39:58 HHCHT006I Waiting for HTTP requests on port 8555\r\n17:39:58 HHCCF065I Hercules: tid=4062CDC0, pid=4423, pgid=4422, priority=0\r\n17:39:58 HHCTT002I Timer thread started: tid=41B79BB0, pid=4423, priority=0\r\n17:39:58 HHCCP002I CPU0000 thread started: tid=41A78BB0, pid=4423, priority=15\r\n17:39:58 HHCCP003I CPU0000 architecture mode S\/370\r\n17:39:58 HHCPN001I Control panel thread started: tid=4062CDC0, pid=4423\r\n17:39:58 HHCAO001I Hercules Automatic Operator thread started;\r\n17:39:58           tid=41F0BBB0, pri=0, pid=4423<\/pre>\n<p>Now we can issue the IPL command to Hercules &#8211; IPL 00C<\/p>\n<pre>17:40:01 ipl 00c\r\n17:40:01 HHCCP048I 000C:CCW=020004C2 00000050=&gt;F1F0405A 5A5A5A5A 5A5A5A5A 5A5A5A5A 10 !!!!!!!!!!!!!\r\n17:40:01 HHCCP075I 000C:Stat=0E40 Count=0050 =&gt;F1F0405A 5A5A5A5A 5A5A5A5A 5A5A5A5A 10 !!!!!!!!!!!!!\r\n17:40:01 HHCCP076I 000C:Sense=40100000 00000000 00000000 00000000 00000000 00000000\r\n17:40:01 HHCCP077I 000C:Sense=INTREQ MSG\r\n17:40:01 HHCCP011I CPU0000: Disabled wait state\r\n17:40:01           PSW=00020000 80000E40<\/pre>\n<p>If all goes well our IPL deck will load into memory and begin execution. The next message we receive is an exceptional condition on the card reader. We can see the CCW &#8220;020004C2 00000050&#8221; which is an attempt to read 80 (x&#8217;50&#8217;) bytes of data. A Channel Status of X&#8217;0E40&#8242; with a residual count of 80 is returned. (The data F1F0405A5A&#8230; is what is in our I\/O buffer left over from the last successful read operation.) The CSW indicates: Channel End, Device End, Unit Check, and Incorrect Length. The Unit Check is our clue that there are no more cards in the reader (we hit end-of-file).<\/p>\n<p>We also see that the CPU has entered a Disabled Wait State with a PSW of &#8220;00020000 80000E40&#8221;. \u00a0This is a PSW with the Wait Bit set to one. \u00a0The low order value (normally containing the instruction address) is used as a Wait Code to communicate back with the operator. \u00a0Our stand alone program simply moved the CSW status into the wait PSW giving us a wait code of x&#8217;0E40&#8242;.<\/p>\n<p>From these messages we have determined we achieved the expected results and therefore Hercules can now be shut down.<\/p>\n<p>Looking at our printer file (card80.txt) we can verify the results of execution.<\/p>\n<pre>01 *****************************************************************************\r\n02 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\r\n03 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\r\n04 #############################################################################\r\n05 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\r\n06 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\r\n07 -----------------------------------------------------------------------------\r\n08 (((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((\r\n09 )))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\r\n10 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!<\/pre>\n<p>All ten data cards have been read from the card reader and then printed on our printer.<\/p>\n<p><a title=\"Absolute Object Deck Loader\" href=\"http:\/\/tommysprinkle.com\/txxos\/?p=123\">[Next &#8211; Absolute Object Deck Loader]<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>First we need to create a Hercules configuration file. \u00a0I used the configuration file for my MVS system and stripped almost everything out. # # Configuration file for Hercules CARD80 Stand Alone IPL Program # CPUSERIAL 068068 CPUMODEL 0158 ARCHMODE &hellip; <a href=\"https:\/\/tommysprinkle.com\/txxos\/?p=118\">Continue reading <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":"template-page-builder-no-sidebar.php","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[1],"tags":[],"class_list":["post-118","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1CPQT-1U","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/tommysprinkle.com\/txxos\/index.php?rest_route=\/wp\/v2\/posts\/118","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tommysprinkle.com\/txxos\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tommysprinkle.com\/txxos\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tommysprinkle.com\/txxos\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tommysprinkle.com\/txxos\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=118"}],"version-history":[{"count":4,"href":"https:\/\/tommysprinkle.com\/txxos\/index.php?rest_route=\/wp\/v2\/posts\/118\/revisions"}],"predecessor-version":[{"id":120,"href":"https:\/\/tommysprinkle.com\/txxos\/index.php?rest_route=\/wp\/v2\/posts\/118\/revisions\/120"}],"wp:attachment":[{"href":"https:\/\/tommysprinkle.com\/txxos\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=118"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tommysprinkle.com\/txxos\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=118"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tommysprinkle.com\/txxos\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=118"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}