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------------------------------
Original Message:
Sent: Fri December 24, 2021 02:50 AM
From: Nicolas Pablo Mulfetti
Subject: system shutdown JCL
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
------------------------------