IBM Z and LinuxONE IBM Z

IBM Z

The enterprise platform for mission-critical applications brings next-level data privacy, security, and resiliency to your hybrid multicloud.

 View Only
  • 1.  system shutdown JCL

    Posted Fri December 24, 2021 02:51 AM
    Hi Everyone reading me,
    I am in a console Operations team, in charge of doing a weekly IPL for one of our accounts. Now a days I do almost manually using a recorded macro and that is played in  "IBM Personal Communications" emulator. But I would like to automate this process, and thought of maybe using a job to do so.

    My experience in JCL is little, could you please help me with the JCL skeleton where to put the shutdown commands for the STCs? I think the structure of the jcl should be close to the following:

    //SYSSHUT1 JOB    (0001),CLASS=F,MSGCLASS=X,MSGLEVEL=(1,1),NOTIFY=&SYSUID,REGION=0M 
    //CMMDSEQ EXEC PGM=? (which utility program?)
    //CMMD1 'P STCNAME1'
    //CMMD2 'P STCNAME2'
    ...
    //CMMDN 'P STCNAMEN' (here in the last command probably it would be the '$PJES2')
    //



    Thanks in advance,
    And hope you have a nice Xmas and even better start of 2022. Regards

    ------------------------------
    Nicolas Pablo Mulfetti
    ------------------------------


  • 2.  RE: system shutdown JCL

    Posted Fri December 24, 2021 07:30 AM
    I'm using:

    USER.PARMLIB(SHUTALL)

    000001 COMMANDPREFIX=NONE /* THIS IS THE DEFAULT VALUE */
    000002 /*--------------------------------------------------------------------*/
    000003 /* WARN TSO USERS TO LOGOFF */
    000004 /*--------------------------------------------------------------------*/
    000005 F TSO,USERMAX=0 /* DON'T ALLOW ANYONE ELSE TO LOGON RIGHT NOW! */
    000006 SEND 'PLEASE LOGOFF - THE SYSTEM WILL BE IPLED IN 2 MINUTES!!',ALL,NOW
    000007 PAUSE 5
    000008 /*--------------------------------------------------------------------*/
    000009 /* ISSUE STOP COMMANDS FOR ALL TASKS THAT WILL TAKE THEM. FOR THOSE */
    000010 /* THAT WON'T TAKE THEM, SIMPLY ISSUE CANCEL COMMANDS. */
    000011 /*--------------------------------------------------------------------*/
    000012 /*--------------------------------------------------------------------*/
    000013 /* ISSUE MODIFY COMMANDS FOR THOSE TASKS THAT USE THEM INSTEAD OF STOP*/
    000014 /*--------------------------------------------------------------------*/
    000015 /*--------------------------------------------------------------------*/
    000016 /* TRY TO WAIT LONG ENOUGH FOR ALL TO COME COMPLETELY DOWN */
    000017 /*--------------------------------------------------------------------*/
    000018 P TSO
    000019 P LLA
    000020 P IZUSVR1
    000021 SETRRS SHUTDOWN
    000022 P VLF
    000023 PAUSE 15
    000024 P TCPIP
    000025 P TN3270
    000026 P SSHD
    000027 PAUSE 5
    000028 P SDSF
    000029 PAUSE 10
    000030 Z NET,QUICK
    000031 PAUSE 10
    000032 P IZUANG1
    000033 P F
    000034 P ICSF
    000035 F OMVS,SHUTDOWN
    000036 F BPXOINIT,SHUTDOWN=FORKINIT
    000037 #STOP

    USER.PROCLIB(SHUTALL)

    000001 //SHUTALL PROC M=SHUTALL,PREFIX=NONE <== CHANGE AS REQUIRED
    000002 //VTAMAPPL EXEC PGM=VTAMAPPL,PARM='COMMANDPREFIX=&PREFIX',
    000003 // REGION=512K,TIME=1440
    000004 //PARMLIB DD DSN=USER.PARMLIB(&M),DISP=SHR
    000005 //SYSABEND DD SYSOUT=H,HOLD=YES

    After running this I issue on the console:

    $PJES2
    Z EOD

    ------------------------------
    Volker Birk
    p≡p project
    https://pEp.software
    ------------------------------



  • 3.  RE: system shutdown JCL

    Posted Thu December 30, 2021 09:03 AM
    This won't work for a normal z/OS system as these routines and programs are only available on the ADCD for PWD systems.

    Sebastian

    ------------------------------
    Sebastian Welton
    Managing Director for EMEA Support. zSystems, Linux, and Cloud
    Information Technology Company
    Darmstadt
    ------------------------------



  • 4.  RE: system shutdown JCL

    Posted Thu December 30, 2021 09:01 AM
    I personally would not do it this way as all tasks will be shutdown regardless of any dependencies which could lead to problems. The best way to do this is with an automation product such as System Automation (or even just Netview) or a freebie such as TSSO on the CBTTape:

    https://www.cbttape.org/cbtdowns.htm

    If you really want to go this way, then some good hints are available here:

    https://ruifeio.com/2016/07/20/how-to-execute-mvs-and-jes2-commands-in-batch/

    Sebastian

    ------------------------------
    Sebastian Welton
    Managing Director for EMEA Support. zSystems, Linux, and Cloud
    Information Technology Company
    Darmstadt
    ------------------------------



  • 5.  RE: system shutdown JCL

    Posted Tue January 18, 2022 06:58 PM
    Thanks Sebastian, and Volker. Just arrived from vacations, will use your help. Thanks a lot!

    ------------------------------
    Nicolas Pablo Mulfetti
    ------------------------------