クラウド上でのメインフレーム開発環境構築 - (8) ADCD IPL, Shutdown補足

# はじめに
ADCDで提供されるDASDイメージをそのまま使ってIPLする場合、Netviewによる制御が色々と行われているようです。IPL時にどのような仕組みで各サブシステムの制御が行われているのかという辺りを紐解いていきたいと思います。また、シャットダウンに関する仕組みも組み込まれているので、その辺りも追ってみます。
ここでは、ZD&T V12.0.5付属の2019年11月レベルのADCD(z/OS V2.4)について記載します。

## 関連記事
[クラウド上でのメインフレーム開発環境構築 - (1) 仮想サーバー作成](https://qiita.com/tomotagwork/items/3b0c918c37ccf54a9ce8)
[クラウド上でのメインフレーム開発環境構築 - (2) ZD&T管理サーバーのインストール](https://qiita.com/tomotagwork/items/c6f52fd6e4aadbde3275)
[クラウド上でのメインフレーム開発環境構築 - (3) ライセンス管理](https://qiita.com/tomotagwork/items/319475bcc924989260ef)
[クラウド上でのメインフレーム開発環境構築 - (4) ZD&Tインスタンス作成概要(ADCD)](https://qiita.com/tomotagwork/items/d14d35d3ab3c35c07545)
[クラウド上でのメインフレーム開発環境構築 - (5) ZD&Tインスタンス作成詳説(ADCD)](https://qiita.com/tomotagwork/items/b00934969af680a30392)
[クラウド上でのメインフレーム開発環境構築 - (6) DeviceMapファイル補足](https://qiita.com/tomotagwork/items/fa3f9099e125806c410e)
[クラウド上でのメインフレーム開発環境構築 - (7) ネットワーク構成補足](https://qiita.com/tomotagwork/items/369367bae3d3cd3c8a15)
[クラウド上でのメインフレーム開発環境構築 - (8) ADCD IPL, Shutdown補足](https://qiita.com/tomotagwork/items/61b26ee8e25a605442ab)
[クラウド上でのメインフレーム開発環境構築 - (9) DASD管理補足](https://qiita.com/tomotagwork/items/a863c57be2902b8943d0)
[クラウド上でのメインフレーム開発環境構築 - (10)既存ZD&Tからイメージ作成](https://qiita.com/tomotagwork/items/d7ce2fc489a9e3fa08e2)

# 起動コマンド
ZD&T EEではインスタンスを起動するためのシェル・スクリプトが用意されていますが、内部的にはLinux上で以下のようなコマンドが発行されることになります。

IBM Z 起動コマンド(PowerONのイメージ)
`awsstart /mnt/ibmsys1/zdt/volumes/aprof1 --clean`
これで、指定したDeviceMapファイルを使用してIBM Zエミュレーターが起動します。

IPLコマンド
`ipl a80 parm 0a82au`

補足:
0A80: IPLデバイス・アドレス / NUCLEUSが入っているDASD(SYSRES)のアドレス
0A82: IODFデバイス・アドレス / IODF, LOADxxを含むDASDのアドレス
AU: LOADPARM / LOADxxのサフィックス

さて、ADCD提供のメタデータファイル(ADCDTOOLS.XML)を振り返ってみると...

```xml:ADCDTOOLS.XML抜粋
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<adcd version="2.0">
        <name>z/OS V2.4 Nov 2019</name>
        <rsu>1909</rsu>
        <timestamp>2020-01-20T00:00:00.000Z</timestamp>
        <restore_dataset>true</restore_dataset>
        <zsystem_information>
                <zos_version>z/OS 02.04.00.0</zos_version>
                <load_suffix>AU</load_suffix>
                <iodf_address>0A82</iodf_address>
                <ipl_device_number>0A80</ipl_device_number>
...
                <ipl_dataset>SYS1.IPLPARM</ipl_dataset>
                <ipl_volume>A4SYS1</ipl_volume>
...
        <subsystems>
                <subsystem sysres="true">
                        <name>z/OS - 2.4</name>
                        <volumes>
                                <volume>
                                        <name>A4RES1</name>
                                        <compress>ZPD</compress>
                                        <size>8539292672</size>
                                </volume>
                                <volume>
                                        <name>A4RES2</name>
                                        <size>8539292672</size>
                                </volume>
                                <volume>
                                        <name>A4SYS1</name>
                                        <size>8539292672</size>
                                </volume>
...
```

これを元にDeviceMapファイルは以下のように作成されています。

```xxx:/mnt/ibmsys1/zdt/volumes/aprof1抜粋
...
[manager]
name    awsckd  0001
device  0A83    3390    3390    /mnt/ibmsys1/zdt/volumes/A4PAGA
device  0A82    3390    3390    /mnt/ibmsys1/zdt/volumes/A4SYS1
device  0A84    3390    3390    /mnt/ibmsys1/zdt/volumes/A4PAGB
device  0A85    3390    3390    /mnt/ibmsys1/zdt/volumes/SARES1
device  0A86    3390    3390    /mnt/ibmsys1/zdt/volumes/A4DBAR
device  0A87    3390    3390    /mnt/ibmsys1/zdt/volumes/A4USR1
device  0A88    3390    3390    /mnt/ibmsys1/zdt/volumes/A4PAGC
device  0A89    3390    3390    /mnt/ibmsys1/zdt/volumes/A4PRD4
device  0A8A    3390    3390    /mnt/ibmsys1/zdt/volumes/A4PRD3
device  0A8B    3390    3390    /mnt/ibmsys1/zdt/volumes/A4DIS2
device  0A8C    3390    3390    /mnt/ibmsys1/zdt/volumes/A4USS1
device  0A8D    3390    3390    /mnt/ibmsys1/zdt/volumes/A4USS2
device  0A8E    3390    3390    /mnt/ibmsys1/zdt/volumes/A4DIS1
device  0A8F    3390    3390    /mnt/ibmsys1/zdt/volumes/A4DIS3
device  0A90    3390    3390    /mnt/ibmsys1/zdt/volumes/A4DBC2
device  0A91    3390    3390    /mnt/ibmsys1/zdt/volumes/A4DBC1
device  0A81    3390    3390    /mnt/ibmsys1/zdt/volumes/A4RES2
device  0A92    3390    3390    /mnt/ibmsys1/zdt/volumes/A4CFG1
device  0A93    3390    3390    /mnt/ibmsys1/zdt/volumes/A4PRD1
device  0A94    3390    3390    /mnt/ibmsys1/zdt/volumes/A4PRD2
device  0A95    3390    3390    /mnt/ibmsys1/zdt/volumes/A4C551
device  0A80    3390    3390    /mnt/ibmsys1/zdt/volumes/A4RES1
device  0A96    3390    3390    /mnt/ibmsys1/zdt/volumes/A4ZCX1
device  0300    3390    3390    /mnt/ibmsys1/zdt/volumes/ZDTDPY
...
```

注意するのは以下の2行です。
`device  0A80    3390    3390    /mnt/ibmsys1/zdt/volumes/A4RES1`
`device  0A82    3390    3390    /mnt/ibmsys1/zdt/volumes/A4SYS1`

ADCDではA4RES1がIPLデバイス、A4SYS1がIODFデバイスとして提供されているので、それらを指定してIPLしている、ということになります。

# IPLのステップを辿る
上の起動コマンドでIPLした場合にどのような定義体が参照されているのか、気になる所を中心に見ていきます。
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/132331/fc47c1d9-1800-0e61-cecf-ad1f69535720.png)


## LOADxx

0A82(A4SYS1)にあるSYSx.IPLPARMからLOADAUが探索されます。

```xxx:SYS1.IPLPARM(LOADAU)
IODF     99 SYS1                                             
INITSQA  0000M 0008M                                         
SYSCAT   A4SYS1113CCATALOG.Z24A.MASTER                       
SYSPARM  AU                                                  
IEASYM   00                                                  
NUCLST   00                                                  
PARMLIB  USER.Z24A.PARMLIB                            A4CFG1 
PARMLIB  FEU.Z24A.PARMLIB                             A4CFG1 
PARMLIB  ADCD.Z24A.PARMLIB                            A4SYS1 
PARMLIB  SYS1.PARMLIB                                 A4RES1 
NUCLEUS  1                                                   
SYSPLEX  ADCDPL 
```

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/132331/a7169a8e-8a9e-ac77-696b-cac7c38f8f94.png)

PARMLIBの探索順序はUSER.Z24A.xxxのものが最上位に指定されているます。以下のようにデータセットも存在しますが、いずれもメンバーは空っぽです。カスタマイズしたい場合はUSER.Z24A.xxxにメンバーを配置すればそちらが優先的に使われるので、このような構成になっているものと思われます。(後のJES2関連の節で記載していますが、PROCLIBについても同様です。)

```
DSLIST - Data Sets Matching USER                                   Row 1 of 18
                                                                              
Command - Enter "/" to select action                        Tracks %Used   XT 
------------------------------------------------------------------------------
         USER.Z24A.CIDTABL                                     150    1     1 
         USER.Z24A.CLIST                                       150    1     1 
         USER.Z24A.HELP                                        150    1     1 
         USER.Z24A.ISPLLIB                                     300    1     1 
         USER.Z24A.ISPMLIB                                     150    1     1 
         USER.Z24A.ISPPLIB                                     150    1     1 
         USER.Z24A.ISPSLIB                                     150    1     1 
         USER.Z24A.ISPTLIB                                     150    1     1 
         USER.Z24A.LINKLIB                                     300    1     1 
         USER.Z24A.LPALIB                                      300    1     1 
         USER.Z24A.MSGENU                                       30    3     1 
         USER.Z24A.PARMLIB                                     150    1     1 
         USER.Z24A.PROCLIB                                     150    2     1 
         USER.Z24A.STCJOBS                                     150    1     1 
         USER.Z24A.SYSEXEC                                     150    1     1 
         USER.Z24A.TCPPARMS                                     30    1     1 
         USER.Z24A.VTAMLIB                                     300    1     1 
         USER.Z24A.VTAMLST                                     150    1     1 
```


## IEASYMxx

各種変数定義など。

```xxx:FEU.Z24A.PARMLIB(IEASYM00)
SYSDEF  SYSNAME(S0W1)                    
        SYSCLONE(1A)                     
        SYMDEF(&UNIXVER='Z24A')          
        SYMDEF(&SYSVER='Z24A')           
        SYMDEF(&ADCDLVL='ADCD24A')       
        SYMDEF(&SYSP1.='A4PRD1')         
        SYMDEF(&SYSP2.='A4PRD2')         
        SYMDEF(&SYSP3.='A4PRD3')         
        SYMDEF(&SYSR2.='A4RES2')         
        SYMDEF(&SYSS1.='A4SYS1')         
        SYMDEF(&SYSC1.='A4CFG1')         
        SYMDEF(&CNMDOMN='CNM01')         
        SYMDEF(&CNMTCPN='TCPIP')         
        SYMDEF(&CNMNETID='NETD')         
        SYMDEF(&JES2STR_='(COLD,NOREQ)') 
```

## IEASYSxx

各PARMLIBの設定

```xxx:FEU.Z24A.PARMLIB(IEASYSAU)
CLOCK=00,                     SELECT CLOCK00                               
AUTOR=(00,DT),                                                             
CLPA,                                                                      
IZU=NO,                                                                    
CMB=(UNITR,COMM,GRAPH,CHRDR), ADDITIONAL CMB ENTRIES                       
CMD=AU,                                                                    
CON=(00,NOJES3),              SELECT CONSOL00                              
COUPLE=00,                    RRS                                          
CSA=(3000,400000),            CSA RANGE                                    
DIAG=00,                      SELECT DIAG00, DIAGNOSTIC COMMANDS           
DUMP=DASD,                    PLACE SVC DUMPS ON DASD DEVICES              
FIX=00,                       SELECT IEAFIX00, FIX MODULES SPECIFIED       
GRS=NONE,                     NO COORDINATION OF GRS REQUESTS              
HZSPROC=*NONE,                                                             
ILMMODE=NONE,                 EXPLICITLY DISABLE LICENSE MANAGER           
LNKAUTH=LNKLST,               AUTHORIZE LNKLST00, APFTAB IS ALTERNATE      
LOGCLS=L,                     WILL NOT BE PRINTED BY DEFAULT               
LOGLMT=999999,                MAX WTL MESSAGES QUEUED, MUST BE 6 DIGITS    
LOGREC=SYS1.&SYSNAME..LOGREC, ERROR RECORDING                              
LPA=AU,                       SELECT LPALSTCI                              
MAXUSER=250,                  SYS TASKS PLUS INITS PLUS TSOUSERS           
MLPA=DI,                      DI FOR IMS                                   
MSTRJCL=00,                   SELECT MSTJCLEX, MASTER JCL                  
OMVS=AU,                      SELECT BPXPRM00 AND BPXPRMFS                 
OPI=YES,                      ALLOW OPERATOR OVERRIDE                      
PAGE=(SYS1.&SYSNAME..PLPA.PAGE,                                            
      SYS1.&SYSNAME..COMMON.PAGE,                                          
      SYS1.&SYSNAME..LOCALA.PAGE,                                          
      SYS1.&SYSNAME..LOCALB.PAGE,                                          
      SYS1.&SYSNAME..LOCALC.PAGE,L),                                       
PAK=00,                       SELECT IEAPAK00                              
PLEXCFG=ANY,                  RRS                                          
PROG=(AU),                    PROG                                         
REAL=128,                     ALLOWS 2 64K OR 1 128K JOB TO RUN V=R        
RSU=0,                        NO RECONFIG STORAGE UNITS                    
RSVNONR=100,                  RESERVED ASVT ENTRIES                   
RSVSTRT=5,                    RESERVED ASVT ENTRIES                   
SCH=(WA,AL),                       SELECT SCHEDXX                     
SMF=00,                       SELECT SMFPRM00, SMF PARAMETERS         
SQA=(15,64),                  SQA SIZE APPROX 640K                    
SSN=DB,                       SELECT IEFSSNDB FOR ALL PRODUCTS        
PROD=(00,01,DB),                 PLEASE NOTE IFAPRD01                 
SVC=AL,                       SELECT IEASVC00, USER SVCS              
VAL=00,                       SELECT VATLST00                         
VIODSN=SYS1.&SYSNAME..STGINDEX,   VIO DS                              
VRREGN=64                     DEFAULT REAL-STORAGE REGION SIZE        
```

## MSTJCLxx
```xxx:ADCD.Z24A.PARMLIB(MSTJCL00)
//MSTJCL00 JOB MSGLEVEL=(1,1),TIME=1440              
//         EXEC PGM=IEEMB860,DPRTY=(15,15)           
//STCINRDR DD SYSOUT=(A,INTRDR)                      
//TSOINRDR DD SYSOUT=(A,INTRDR)                      
//IEFPDSI  DD DSN=USER.&SYSVER..PROCLIB,DISP=SHR     
//         DD DSN=FEU.&SYSVER..PROCLIB,DISP=SHR      
//         DD DSN=ADCD.&SYSVER..PROCLIB,DISP=SHR     
//         DD DSN=SYS1.PROCLIB,DISP=SHR              
//SYSUADS  DD DSN=SYS1.UADS,DISP=SHR                 
//SYSLBC   DD DSN=SYS1.BRODCAST,DISP=SHR             
```


## LPALSTxx

```xxx:FEU.Z24A.PARMLIB(LPALSTAU)
USER.&SYSVER..LPALIB(A4CFG1),   
FEU.&SYSVER..LPALIB(A4CFG1),    
ADCD.&SYSVER..LPALIB,           
EQAE10.SEQALPA(A4PRD1),         
SYS1.LPALIB,                    
SYS1.SERBLPA,                   
FAN140.SEAGLPA(A4PRD1),         
ISF.SISFLPA,                    
SYS1.SBDTLPA,                   
CEE.SCEELPA,                    
ISP.SISPLPA,                    
TCPIP.SEZALPA,                  
SYS1.SORTLPA,                   
SYS1.SDWWDLPA,                  
SYS1.SICELPA,                   
*CICS55*                        
 DFH550.CICS.SDFHLPA(A4C551),   
*CICS54*                        
*DFH540.CICS.SDFHLPA(A4C541),   
**                              
AUT410.SINGMOD3(A4PRD1),        
NET621.SCNMLPA1(A4PRD3),        
FELE10.SFEKLPA(A4PRD1)          
```

ここは、ZD&Tインスタンス作成のプロセスの中で、指定したミドルウェアに合わせて更新されています。ここでは、ADCDパッケージの中からCICS TS V5.5を使用するよう選択していたので、CICS TS V5.5関連のLPAの指定が追加(コメントアウト解除)されています。

## BPXPRMxx

<details><summary>FEU.Z24A.PARMLIB(BPXPRMAU)</summary><div>

```xxx:FEU.Z24A.PARMLIB(BPXPRMAU)
MAXASSIZE(2147483647)
MAXPROCSYS(1200)
MAXPROCUSER(32767)
MAXUIDS(400)
MAXFILEPROC(65535)
MAXPTYS(800)
MAXTHREADTASKS(32768)
MAXTHREADS(20000)
MAXSHAREPAGES(32768000)
MAXCPUTIME(7200)
SUPERUSER(OMVSKERN)
CTRACE(CTIBPX00)
RESOLVER_PROC(RESOLVER)
IPCMSGQBYTES(20971520)

VERSION('&UNIXVER.')
SYSPLEX(YES)

FILESYSTYPE TYPE(HFS)
            ENTRYPOINT(GFUAINIT)
FILESYSTYPE TYPE(UDS) ENTRYPOINT(BPXTUINT)

 FILESYSTYPE TYPE(AUTOMNT) ENTRYPOINT(BPXTAMD)
 FILESYSTYPE TYPE(ZFS) ENTRYPOINT(IOEFSCM) ASNAME(ZFS)
 FILESYSTYPE TYPE(NFS)
           ENTRYPOINT(GFSCINIT)
           ASNAME(NFSC)

FILESYSTYPE TYPE(INET) ENTRYPOINT(EZBPFINI)

SUBFILESYSTYPE NAME(TCPIP)
       TYPE(INET)
       ENTRYPOINT(EZBPFINI)

NETWORK DOMAINNAME(AF_INET)
        DOMAINNUMBER(2)
        MAXSOCKETS(64000)
        TYPE(INET)
        INADDRANYPORT(5555)
        INADDRANYCOUNT(1000)

NETWORK DOMAINNAME(AF_UNIX)
        DOMAINNUMBER(1)
        MAXSOCKETS(2000)
        TYPE(UDS)

ROOT     FILESYSTEM('ZFS.&SYSPLEX..ROOT')
         TYPE(ZFS)
         MODE(RDWR)

MOUNT    FILESYSTEM('ZFS.&SYSNAME..SYSTEM')
         TYPE(ZFS)
         MODE(RDWR) UNMOUNT
         MOUNTPOINT('/&SYSNAME.')

MOUNT    FILESYSTEM('ZFS.&SYSVER..VERSION')
         TYPE(ZFS)
         MODE(RDWR)
         MOUNTPOINT('/$VERSION')

MOUNT    FILESYSTEM('ZFS.&SYSVER..CNJ')
         TYPE(ZFS)
         MODE(READ) NOAUTOMOVE
         MOUNTPOINT('/usr/lpp/IBM/cnj')

MOUNT    FILESYSTEM('ZFS.&SYSVER..ZCX')
         TYPE(ZFS)
         MODE(READ) NOAUTOMOVE
         MOUNTPOINT('/usr/lpp/zcx_zos')

MOUNT    FILESYSTEM('ZFS.&SYSVER..ZEDC')
         TYPE(ZFS)
         MODE(READ) NOAUTOMOVE
         MOUNTPOINT('/usr/lpp/encryptionfacility')

MOUNT    FILESYSTEM('ZFS.&SYSVER..FONTS')
          TYPE(ZFS)
          MODE(READ) NOAUTOMOVE
          MOUNTPOINT('/usr/lpp/fonts')

MOUNT    FILESYSTEM('ZFS.&SYSVER..WLP')
         TYPE(ZFS)
         MODE(RDWR) NOAUTOMOVE
         MOUNTPOINT('/usr/lpp/liberty_zos')

MOUNT    FILESYSTEM('ZFS.&SYSNAME..DEV')
         TYPE(ZFS)
         MODE(RDWR) NOAUTOMOVE
         MOUNTPOINT('/&SYSNAME./dev')

MOUNT    FILESYSTEM('ZFS.&SYSNAME..VAR')
         TYPE(ZFS)
         MODE(RDWR) NOAUTOMOVE
         MOUNTPOINT('/&SYSNAME./var')

MOUNT    FILESYSTEM('ZFS.&SYSNAME..VARWBEM')
         TYPE(ZFS)
         MODE(RDWR) NOAUTOMOVE       /* DFT=AUTOMOVE TO FIX HC MSG*/
         MOUNTPOINT('/&SYSNAME./var/wbem')

MOUNT    FILESYSTEM('ZFS.&SYSNAME..ETC')
         TYPE(ZFS)
         MODE(RDWR) NOAUTOMOVE
         MOUNTPOINT('/&SYSNAME./etc')

MOUNT    FILESYSTEM('ZFS.&SYSNAME..TMP')
         TYPE(ZFS)
         MODE(RDWR) NOAUTOMOVE
         MOUNTPOINT('/&SYSNAME./tmp')

MOUNT    FILESYSTEM('ZFS.&SYSNAME..USR.MAIL')
         TYPE(ZFS)
         MODE(RDWR) NOAUTOMOVE
         MOUNTPOINT('/&SYSNAME./var/mail')

MOUNT    FILESYSTEM('ZFS.USERS')
         TYPE(ZFS)
         MODE(RDWR) NOAUTOMOVE
         MOUNTPOINT('/u')

MOUNT    FILESYSTEM('ZFS.&SYSNAME..WEB')
         MOUNTPOINT('/web')
         TYPE(ZFS) MODE(RDWR)

MOUNT    FILESYSTEM('ZFS.&SYSNAME..WEB.CONFIG.ZFS')
         MOUNTPOINT('/web/httpd1')
         TYPE(ZFS) MODE(RDWR)

/**************************************************************/
/* COBOL + PLI + MQ 8.0 + MQ 9.0 Mounts                       */
/************************************************ *************/

MOUNT  FILESYSTEM('IGY630.ZFS')
       MOUNTPOINT('/usr/lpp/IBM/cobol/igyv6r3')
       TYPE(ZFS) MODE(READ)

MOUNT  FILESYSTEM('IEL530.ZFS')
       MOUNTPOINT('/usr/lpp/IBM/pli/v5r3')
       TYPE(ZFS) MODE(READ)

MOUNT    FILESYSTEM('CSQ911.ZFS')
         TYPE(ZFS)
         MODE(READ)
         MOUNTPOINT('/usr/lpp/mqm/V9R1M1')
/***************************************************************/
/* Java 7.1 Mounts */
/***************************************************************/

MOUNT    FILESYSTEM('JVA710.ZFS')
          TYPE(HFS)
          MODE(RDWR)
          MOUNTPOINT('/usr/lpp/java/J7.1')

MOUNT    FILESYSTEM('JVB710.ZFS')
          TYPE(HFS)
          MODE(RDWR)
          MOUNTPOINT('/usr/lpp/java/J7.1_64')

/***************************************************************/
/* Java 8.0 Mounts */
/***************************************************************/

MOUNT    FILESYSTEM('JVA800.ZFS')
          TYPE(HFS)
          MODE(RDWR)
          MOUNTPOINT('/usr/lpp/java/J8.0')

MOUNT    FILESYSTEM('JVB800.ZFS')
          TYPE(HFS)
          MODE(RDWR)
          MOUNTPOINT('/usr/lpp/java/J8.0_64')

/***************************************************************/
/* UCD  7.0.0 Mounts */
/***************************************************************/
MOUNT    FILESYSTEM('BUZ702.ZFS')
         TYPE(ZFS)
         MODE(READ)
         MOUNTPOINT('/usr/lpp/IBM/ucd/v7.0.2')

MOUNT    FILESYSTEM('BUZ702.&SYSNAME..CONFIG.ZFS')
         TYPE(ZFS)
         MODE(RDWR)
         MOUNTPOINT('/apps/ucd/v7.0.2')

/***************************************************************/
/* SWIFT 4.0.1 MOUNT */
/***************************************************************/
MOUNT    FILESYSTEM('SWIFT401.ZFS')
         TYPE(ZFS)
         MODE(READ)
         MOUNTPOINT('/apps/swift/v4.0.1')

/***************************************************************/
/* ZDT  12.0.1 Mount */
/***************************************************************/
MOUNT    FILESYSTEM('FEUC05.ZFS')
         TYPE(ZFS)
         MODE(RDWR)
         MOUNTPOINT('/usr/lpp/IBM/zdt/')

/***************************************************************/
/* z/OS Connect EE 3.0 */
/***************************************************************/
MOUNT FILESYSTEM('BAQ300.BASE.ZFS')
      TYPE(ZFS)
      MODE(READ)
      MOUNTPOINT('/usr/lpp/IBM/zosconnect')

MOUNT FILESYSTEM('BAQ300.REL.ZFS')
        TYPE(ZFS)
        MODE(READ)
        MOUNTPOINT('/usr/lpp/IBM/zosconnect/v3r0')

MOUNT FILESYSTEM('ZFS.&SYSNAME..ZOS.CONNECT')
        TYPE(ZFS)
        MODE(RDWR) NOAUTOMOVE
        MOUNTPOINT('/var/zosconnect')

MOUNT    FILESYSTEM('IZU.SIZUUSRD')
         MOUNTPOINT('/var/zosmf')
         TYPE(ZFS)
         MODE(RDWR) NOAUTOMOVE

MOUNT    FILESYSTEM('FELE10.IDZ.ZFS')
         TYPE(ZFS)
         MODE(READ) NOAUTOMOVE
         MOUNTPOINT('/usr/lpp/IBM/idz')

MOUNT    FILESYSTEM('FELE10.UTIL.ZFS')
         TYPE(ZFS)
         MODE(READ) NOAUTOMOVE
         MOUNTPOINT('/usr/lpp/IBM/idzutil')

MOUNT    FILESYSTEM('FEK320.HALG320.ZFS')
         TYPE(ZFS)
         MODE(READ)
         MOUNTPOINT('/usr/lpp/IBM/zexpl')

MOUNT    FILESYSTEM('FEK320.S0W1.HALG320.ETC.ZFS')
         TYPE(ZFS)
         MODE(RDWR)
         MOUNTPOINT('/etc/zexpl')

MOUNT    FILESYSTEM('FEK320.S0W1.HALG320.VAR.ZFS')
         TYPE(ZFS)
         MODE(RDWR)
         MOUNTPOINT('/var/zexpl')

MOUNT    FILESYSTEM('FELE10.S0W1.VAR.IDZ.ZFS')
         TYPE(ZFS)
         MODE(RDWR) NOAUTOMOVE
         MOUNTPOINT('/var/idz')

/***************************************************************/
/* RTC  6.0.6 Mounts */
/***************************************************************/

MOUNT    FILESYSTEM('BLZ606.ZFS')
         TYPE(ZFS)
         MODE(READ)
         MOUNTPOINT('/usr/lpp/jazz/v6.0.6')

MOUNT    FILESYSTEM('BLZ606.&SYSNAME..CONFIG.ZFS')
         TYPE(ZFS)
         MODE(RDWR)
         MOUNTPOINT('/apps/jazz/v6.0.6')

MOUNT    FILESYSTEM('BGZ100.ZFS')
         TYPE(ZFS)
         MODE(READ)
         MOUNTPOINT('/usr/lpp/IBM/dbb')

MOUNT    FILESYSTEM('BGZ100.ETC.DBB.ZFS')
         TYPE(ZFS)
         MODE(RDWR) NOAUTOMOVE
         MOUNTPOINT('/etc/dbb')

/**********************************************************/
MOUNT    FILESYSTEM('DFH550.ZFS')
         TYPE(ZFS)
         MODE(READ)
         MOUNTPOINT('/usr/lpp/cicsts/cicsts55')
MOUNT    FILESYSTEM('DFH550.JVMPROFS.ZFS')
         TYPE(ZFS)
         MODE(RDWR)
         MOUNTPOINT('/usr/lpp/cicsts/cicsts55/JVMProfiles')
MOUNT    FILESYSTEM('DFH550.SAMPLES.ZFS')
         TYPE(ZFS)
         MODE(RDWR)
         MOUNTPOINT('/usr/lpp/cicsts/cicsts55/samples')

/**********************************************************/
MOUNT    FILESYSTEM('DFH540.ZFS')
         TYPE(ZFS)
         MODE(READ)
         MOUNTPOINT('/usr/lpp/cicsts/cicsts54')
MOUNT    FILESYSTEM('DFH540.JVMPROFS.ZFS')
         TYPE(ZFS)
         MODE(RDWR)
         MOUNTPOINT('/usr/lpp/cicsts/cicsts54/JVMProfiles')
MOUNT    FILESYSTEM('DFH540.SAMPLES.ZFS')
         TYPE(ZFS)
         MODE(RDWR)
         MOUNTPOINT('/usr/lpp/cicsts/cicsts54/samples')
MOUNT    FILESYSTEM('DFH540.SDFHMOBZ')
         TYPE(ZFS)
         MODE(READ)
         MOUNTPOINT('/usr/lpp/cicsts/mobilefp')
MOUNT    FILESYSTEM('DFH540.SDFHSAMZ')
         TYPE(ZFS)
         MODE(READ)
         MOUNTPOINT('/usr/lpp/cicsts/samlfp')
MOUNT    FILESYSTEM('DFH540.SDFHPHPZ')
         TYPE(ZFS)
         MODE(READ)
         MOUNTPOINT('/usr/lpp/cicsts/phpfp')

MOUNT    FILESYSTEM('DSNC10.SDSNAZFS')
         TYPE(ZFS)
         MODE(RDWR)
         MOUNTPOINT('/usr/lpp/db2c10/base')

MOUNT    FILESYSTEM('DSNC10.SDSNJCC')
         TYPE(ZFS)
         MODE(RDWR)
         MOUNTPOINT('/usr/lpp/db2c10/jdbc')

MOUNT    FILESYSTEM('DSNC10.SDSNMQLS')
         TYPE(ZFS)
         MODE(RDWR)
         MOUNTPOINT('/usr/lpp/db2c10/mql')

MOUNT    FILESYSTEM('DSNC10.SDSNWORF')
         TYPE(ZFS)
         MODE(RDWR)
         MOUNTPOINT('/usr/lpp/db2c10/worf')

MOUNT    FILESYSTEM('DSNC10.SJVAZFS')
         TYPE(ZFS)
         MODE(RDWR) NOAUTOMOVE
         MOUNTPOINT('/u/dbcg')

MOUNT    FILESYSTEM('DSNC10.ZCONADP.ZFS')
         TYPE(ZFS) MODE(READ) PARM('AGGRGROW')
         MOUNTPOINT('/usr/lpp/db2adapter/v12')

MOUNT    FILESYSTEM('DSNB10.SDSNAZFS')
         TYPE(ZFS)
         MODE(RDWR)
         MOUNTPOINT('/usr/lpp/db2b10/base')

MOUNT    FILESYSTEM('DSNB10.SDSNJCC')
         TYPE(ZFS)
         MODE(RDWR)
         MOUNTPOINT('/usr/lpp/db2b10/jdbc')

MOUNT    FILESYSTEM('DSNB10.SDSNMQLS')
         TYPE(ZFS)
         MODE(RDWR)
         MOUNTPOINT('/usr/lpp/db2b10/mql')

MOUNT    FILESYSTEM('DSNB10.SDSNWORF')
         TYPE(ZFS)
         MODE(RDWR)
         MOUNTPOINT('/usr/lpp/db2b10/worf')

MOUNT    FILESYSTEM('DSNB10.SJVAZFS')
         TYPE(ZFS)
         MODE(RDWR) NOAUTOMOVE
         MOUNTPOINT('/u/dbbg')

MOUNT    FILESYSTEM('DSNB10.ZCONADP.ZFS')
         TYPE(ZFS) MODE(READ) PARM('AGGRGROW')
         MOUNTPOINT('/usr/lpp/db2adapter/v11')

/*****************************************************************/

MOUNT    FILESYSTEM('DFSF10.SDFSZFS')
         TYPE(ZFS)
         MODE(READ)
         MOUNTPOINT('/usr/lpp/ims/ims15')

/********************************************************/

MOUNT    FILESYSTEM('DFSE10.SDFSZFS')
         TYPE(ZFS)
         MODE(READ)
         MOUNTPOINT('/usr/lpp/ims/ims14')

/********************************************************/

MOUNT    FILESYSTEM('ROCKET.ZFS')
         MOUNTPOINT('/rsusr')
         TYPE(ZFS)  MODE(READ)

/********************************************************/
/* ---------------------------------------------------------------- */
/* Repository             for IBM WebSphere Application Server V9.0 */
/* ---------------------------------------------------------------- */
 MOUNT    FILESYSTEM('WAS900.REPOSTRY.HBBO900.ZFS')
 MOUNTPOINT(
 '/usr/lpp/InstallationManagerRepository/zWebSphere/V9R0/HBBO900')
          TYPE(ZFS) MODE(READ)
/* ---------------------------------------------------------------- */
/* Application Server    for IBM WebSphere Application Server V9.0  */
/* ---------------------------------------------------------------- */
 MOUNT    FILESYSTEM('WAS900.PCODE.SBBOZFS')
          MOUNTPOINT('/usr/lpp/zWebSphere/V9R0')
          TYPE(ZFS) MODE(READ)
/* ---------------------------------------------------------------- */
/* IBM HTTP Server        for IBM WebSphere Application Server V9.0 */
/* ---------------------------------------------------------------- */
 MOUNT    FILESYSTEM('WAS900.PCODE.SHAPZFS')
          MOUNTPOINT('/usr/lpp/IHSA/V9R0')
          TYPE(ZFS) MODE(READ)
/* ---------------------------------------------------------------- */
/* Web Server Plug-ins    for IBM WebSphere Application Server V9.0 */
/* ---------------------------------------------------------------- */
 MOUNT    FILESYSTEM('WAS900.PCODE.SIWOZFS')
          MOUNTPOINT('/usr/lpp/zWebSphere_Plugins/V9R0')
          TYPE(ZFS) MODE(READ)
/* ---------------------------------------------------------------- */
/* Liberty Profile        for IBM WebSphere Application Server V9.0 */
/* ---------------------------------------------------------------- */
 MOUNT    FILESYSTEM('WAS900.PCODE.ZLIBERTY.ZFS')
          MOUNTPOINT('/usr/lpp/zLiberty/V9R0')
          TYPE(ZFS) MODE(READ)
/* ---------------------------------------------------------------- */
/* Base for Configuration for IBM WebSphere Application Server V9.0 */
/* NOTE: !!!!! MOUNT FIRST !!!!! and ALWAYS READ_WRITE              */
/* ---------------------------------------------------------------- */
 MOUNT    FILESYSTEM('WAS900.S0W1.XACELL.ZFS')
          MOUNTPOINT('/wascfg/v9r0/xacell')
          TYPE(ZFS) MODE(RDWR) PARM('AGGRGROW')
/* ---------------------------------------------------------------- */
/* Liberty Profile Sample for IBM WebSphere Application Server V9.0 */
/* ---------------------------------------------------------------- */
 MOUNT    FILESYSTEM('WAS900.S0W1.XACELL.WLP.ZFS')
          MOUNTPOINT('/wascfg/v9r0/xacell/wlp')
          TYPE(ZFS) MODE(RDWR) PARM('AGGRGROW')
/* ---------------------------------------------------------------- */
/* Deployment Manager 1   for IBM WebSphere Application Server V9.0 */
/* ---------------------------------------------------------------- */
 MOUNT    FILESYSTEM('WAS900.S0W1.XACELL.XADMNODE.CONFIG.ZFS')
          MOUNTPOINT('/wascfg/v9r0/xacell/xadmnode')
          TYPE(ZFS) MODE(RDWR) PARM('AGGRGROW')
/* ---------------------------------------------------------------- */
/* Application Server 1   for IBM WebSphere Application Server V9.0 */
/* ---------------------------------------------------------------- */
 MOUNT    FILESYSTEM('WAS900.S0W1.XACELL.XANODE1.CONFIG.ZFS')
          MOUNTPOINT('/wascfg/v9r0/xacell/xanode1')
          TYPE(ZFS) MODE(RDWR) PARM('AGGRGROW')
/* ---------------------------------------------------------------- */
```
</div></details>

## COMMNDxx

IPL時に実行されるコマンド

```xxx:FEU.Z24A.PARMLIB(COMMNDAU)
COM='S CNMPSSI,SUB=MSTR'                         
COM='S CNMPROC,SUB=MSTR'                         
COM='S EZAZSSI,P=S0W1'                           
COM='DD ADD,VOL=A4SYS1'                          
COM='DD NAME=SYS1.&SYSNAME..&SYSVER..DMP&SEQ'    
COM='DD ALLOC=ACTIVE'                 
```

# IPL時のNetviewによる制御フロー

さて、IPLで参照される主な定義を見て気ましたが、COMMNDxxでは、Netview(CNMPSSI, SNMPROC)、および、TCP/IPの前提のサブシステム(EZAZSSI)しか起動していません。JES2すら起動していないのはびっくりです。どうやらこれら以外のサブシステムは全てNetviewで自動起動するよう管理されているようです。
参考: [ZD&T のための NetView の自動化](https://www.ibm.com/support/knowledgecenter/ja/SSTQBD_12.0.5/com.ibm.zsys.rdt.guide.adcd.doc/topics/netview_auto.html)

ここではその辺りを紐解いていきます。
(以前のADCDではVTAMAPPLという謎のプログラムを使って各サブシステムの起動/停止をコントロールしていましたが、最近のADCDはNetviewで管理するよう変更されているようです。)

参考: [NetView 初期設定の準備](https://www.ibm.com/support/knowledgecenter/ja/SSZJDU_6.2.0/com.ibm.itnetviewforzos.doc_6.2/dqa_sam_prepnvinit.htm)
上の記述によると、JES2やVTAMより前にNetviewを起動させることができるようです。起動時オプションにSUB=MSTRが指定されているのはこの辺の対応のためですね。ここは細かく追っていきませんがJES2, VTAM辺りもNetviewで制御できる構成になっているようです。

CNMPROCの起動プロシージャーを見てみます。

```xxx:ADCD.Z24A.PROCLIB(CNMPROC)抜粋
//CNMPROC  PROC Q1='NETVIEW',  ** USER DSN HIGH LEVEL QUALIFIER
//*
//       DOMAIN=CNM01,         ** NETVIEW DOMAIN NAME
//       DOMAINPW='',          ** NETVIEW DOMAIN PASSWORD
//       PROG=DSIMNT,          ** PGM USED TO START NETVIEW
//       SQ1='NET621',         ** SYSTEM DSN HIGH LEVEL QUALIFIER
//       REXX='FAN140',        ** REXX DSN HIGH LEVEL QUALIFIER
//       VQ1=NETVIEW,          ** HIGH LVL DSN QUALIFIER-VSAM DSNS
//       TQ1=NETVIEW,          ** SEQUENTIAL DSN HIGH LEVEL QUALIFIER
//       SOUTA='*',            ** DEFAULT PRINTED OUTPUT CLASS
//       REG=98304,            ** REGION SIZE(IN K) FOR NETVIEW
//       BFSZ=24,              ** BUFFER SIZE(IN K)
//       SLSZ=200,             **
//       SUBSYM='',            ** NETVIEW SYMBOLIC SUBSTITUTION SWITCH
//       NV2I='NM',
//       TRSIZE=4000
//**********************************************************************
//*
//NETVIEW  EXEC PGM=&PROG,TIME=1440,
//         REGION=&REG.K,
//         PARM=(&BFSZ.K,&SLSZ,
//           '&DOMAIN','&DOMAINPW','&ARM','&SUBSYM','&NV2I','&TRSIZE'),
//         DPRTY=(13,13)
//*
//STEPLIB  DD   DSN=&SQ1..SAQNLINK,DISP=SHR
//         DD   DSN=&SQ1..CNMLINK,DISP=SHR
//***************************************************************
//DSICLD   DD   DSN=&Q1..&DOMAIN..CNMCLST,DISP=SHR
//         DD   DSN=&SQ1..SAQNCLST,DISP=SHR
//         DD   DSN=&SQ1..CNMCLST,DISP=SHR
//         DD   DSN=&SQ1..CNMSAMP,DISP=SHR
//*        DD   DSN=SYS1.PROCLIB,DISP=SHR
//DSIOPEN  DD   DSN=&Q1..&DOMAIN..SDSIOPEN,DISP=SHR
//         DD   DSN=&SQ1..SDSIOPEN,DISP=SHR
//DSIPARM  DD   DSN=&Q1..&DOMAIN..DSIPARM,DISP=SHR
//         DD   DSN=&SQ1..SAQNPARM,DISP=SHR
//         DD   DSN=&SQ1..DSIPARM,DISP=SHR
//DSILIST  DD   DSN=&Q1..&DOMAIN..DSILIST,DISP=SHR
//DSIASRC  DD   DSN=&Q1..&DOMAIN..DSIASRC,DISP=SHR
//DSIARPT  DD   DSN=&Q1..&DOMAIN..DSIARPT,DISP=SHR
//DSIVTAM  DD   DSN=&Q1..&DOMAIN..VTAMLST,DISP=SHR
//*        DD   DSN=SYS1.VTAMLST,DISP=SHR
//DSIPRF   DD   DSN=&Q1..&DOMAIN..DSIPRF,DISP=SHR
//         DD   DSN=&SQ1..DSIPRF,DISP=SHR
//DSIMSG   DD   DSN=&SQ1..SDSIMSG1,DISP=SHR
//*
//BNJPNL1  DD   DSN=&SQ1..BNJPNL1,DISP=SHR
//BNJPNL2  DD   DSN=&SQ1..BNJPNL2,DISP=SHR
//*
//* USER HELP DATA SET (PANELS)
//CNMPNL1  DD   DSN=&Q1..&DOMAIN..CNMPNL1,DISP=SHR
//         DD   DSN=&SQ1..CNMPNL1,DISP=SHR
//* NETVIEW LOG DATA SETS
//*
...
```

自動起動の制御はCNMSTYLEというメンバーで制御できそうです。

参考:
[CNMSTYLE メンバーの更新](https://www.ibm.com/support/knowledgecenter/ja/SSZJDU_6.2.0/com.ibm.itnetviewforzos.doc_6.2/inq_grsnv_updcnmstyle.htm)
[NetView プログラムの始動時に自動的にコマンドの実行を指定](https://www.ibm.com/support/knowledgecenter/ja/SSZJDU_6.2.0/com.ibm.itnetviewforzos.doc_6.2/inq_grsnv_cauto.htm)

DSIPARM DDに指定してあるデータセット以下のCNMSTYLEというメンバーを確認します。

```xxx:NETVIEW.CNM01.DSIPARM(CNMSTYLE)
...
SECOPTS.OPERSEC = NETVPW 
...
************************************************************************ 
*                 General use Include                                  * 
*  This dummy include is provided for any use you may find for it.     * 
*  For example, you might use this member to do customization that     * 
*  is more specific for a particular system or group of systems        * 
*  OR include statements here that use Data REXX logic.                * 
************************************************************************ 
%INCLUDE C&NV2I.STGEN                                                    
```

末尾に指定してあるINCLUDEに指定してあるメンバー(CMNSTGEN)を確認します。

```xxx:NETVIEW.CNM01.DSIPARM(CNMSTGEN)
*UTOTASK.&SIDSMF.CONSOLE=&SIDSMF     
auxInitCmd.A = EXCMD AUTO1 NTVINIT   
```

`EXCMD AUTO1 NTVINIT`というのが自動で実行されることになります。(AUTO1はオペレーターID, NTVINITはNetviewコマンド)

参考:
[EXCMD (NCCF)](https://www.ibm.com/support/knowledgecenter/ja/SSZJDU_6.2.0/com.ibm.itnetviewforzos.doc_6.2/dqc_excmd.htm)
[NetView オペレーターの定義](https://www.ibm.com/support/knowledgecenter/ja/SSZJDU_6.2.0/com.ibm.itnetviewforzos.doc_6.2/ina_nsf_opid.htm)
[自動タスク用のオペレーター ID の定義](https://www.ibm.com/support/knowledgecenter/ja/SSZJDU_6.2.0/com.ibm.itnetviewforzos.doc_6.2/dzl_aus_deoat.htm)
[NetView プログラムを使用したパスワード許可](https://www.ibm.com/support/knowledgecenter/ja/SSZJDU_6.2.0/com.ibm.itnetviewforzos.doc_6.2/dzl_opr_netvpswd.htm)

AUTO1というオペレーターIDについて確認しておきます。
DSIPARM DDに指定してあるデータセット以下のDSIOPFメンバーを確認します。

```xxx:NET621.DSIPARM(DSIOPF)
...
*---------------------------------------------------------------------*  
* Include legacy operator definitions.                                *  
*---------------------------------------------------------------------*  
%INCLUDE DSIOPFAU                                                        
...
```

INCLUDEで指定されているDSIOPFAUメンバーをみると、AUTO1が定義されていました。

```xxx:NET621.DSIPARM(DSIOPFAU)
AUTO1        OPERATOR    PASSWORD=*NONE*  
             PROFILEN    DSIPROFC         
AUTO2        OPERATOR    PASSWORD=*NONE*  
             PROFILEN    DSIPROFG         
```

EXCMDで実行されているNTVINITを確認します。これはCNMCLIST以下にREXXとして提供されていました。

```xxx:NETVIEW.CNM01.CNMCLST(NTVINIT)
/* REXX */                                                                    
/* LICENSED MATERIAL - PROPERTY OF IBM                                     */ 
/*  C) COPYRIGHT IBM CORP. 2019,2020 - ALL RIGHTS RESERVED.                */ 
/*  US GOVERNMENT USERS RESTRICTED RIGHTS - USE, DUPLICATION OR DISCLOSURE */ 
/*  RESTRICTED BY GSA ADP SCHEDULE CONTRACT WITH IBM CORP.                 */ 
                                                                              
                                                                              
/* BELOW WILL PREVENT DB2 ETC FROM STARTING */                                
/*GLBVARS = "$GL"||DOMAIN() */                                                
                                                                              
  GLBVARS = "GLB"||DOMAIN()                                                   
                                                                              
  'WTO NETVIEW IS SETTING GLOBAL VARIABLES AND COMMENCING'                    
  'WTO POST IPL SUBSYSTEM STARTUPS.'                                          
  INTERPRET CALL GLBVARS IPL                                                  
  'MVS MN JOBNAMES,T'                                                         
  CALL STARTUPS                                                               
  CALL DSPSTAT                                                                
  CALL STARTSYS                                                               
  CALL $TIMERS                                                                
                                                                              
EXIT                                                                          
```

どうやらNetview起動時にこのNTVINITというREXXが呼ばれるらしいことまで辿れました。
このNTVINITから実行される処理を見ていきます。

## 各サブシステムの登録

`INTERPRET CALL GLBVARS IPL`
DOMAIN()はここではCNM01なので、GLBVARSはGLBCNM01を意味します。DSICLD DDに指定されているデータセット以下からGLBCNM01が探索されて、以下のメンバーが実行されます。

<details><summary><font color="blue">NETVIEW.CNM01.CNMCLST(GLBCNM01)</font></summary><div>

```
/* REXX */
/* LICENSED MATERIAL - PROPERTY OF IBM                                     */
/*  C) COPYRIGHT IBM CORP. 2019,2020 - ALL RIGHTS RESERVED.                */
/*  US GOVERNMENT USERS RESTRICTED RIGHTS - USE, DUPLICATION OR DISCLOSURE */
/*  RESTRICTED BY GSA ADP SCHEDULE CONTRACT WITH IBM CORP.                 */

/* THIS EXEC WILL SET ALL THE INTERNAL */
/* GLOBAL VARIABLES USED TO CONTROL    */
/* SYSTEM STARTUP/SHUTDOWN/DISPLAY     */
/*                                     */
/* THIS EXEC IS GENERATED ..           */
/* DO NOT ALTER IT MANUALLY            */

ARG STATUS
SYSSTR = 'SY'||SUBSTR(DOMAIN(),LENGTH(DOMAIN()),1)
SYSCHR = SUBSTR(DOMAIN(),LENGTH(DOMAIN()),1)

X = 0
/*** ASCH START ***/

X = X + 1

VARNAME = SYSSTR||TASK.X
INTERPRET SYSSTR||TASK.X ' = "ASCH"'
'GLOBALV PUTC 'VARNAME

VARNAME = 'ASCH'
ASCH = X
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STRT.X
INTERPRET SYSSTR||STRT.X ' = "MVS S ASCH,SUB=MSTR"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DESC.X
INTERPRET SYSSTR||DESC.X ' = "APPC SCHEDULER"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STOP.X
INTERPRET SYSSTR||STOP.X ' = "MVS C ASCH"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||PARN.X
INTERPRET SYSSTR||PARN.X ' = "MVS"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STAT.X
INTERPRET SYSSTR||STAT.X ' = "NOSTART"'
IF STATUS <> '' THEN
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DWNL.X
INTERPRET SYSSTR||DWNL.X ' = "2"'
'GLOBALV PUTC 'VARNAME

/*** ASCH END ***/



/*** BLZBFA START ***/

X = X + 1

VARNAME = SYSSTR||TASK.X
INTERPRET SYSSTR||TASK.X ' = "BLZBFA"'
'GLOBALV PUTC 'VARNAME

VARNAME = 'BLZBFA'
BLZBFA = X
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STRT.X
INTERPRET SYSSTR||STRT.X ' = "MVS S BLZBFA"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DESC.X
INTERPRET SYSSTR||DESC.X ' = "RTC BUILD ABENT"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STOP.X
INTERPRET SYSSTR||STOP.X ' = "MVS C BLZBFA"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||PARN.X
INTERPRET SYSSTR||PARN.X ' = "TN3270"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STAT.X
INTERPRET SYSSTR||STAT.X ' = "NOSTART"'
IF STATUS <> '' THEN
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DWNL.X
INTERPRET SYSSTR||DWNL.X ' = "5"'
'GLOBALV PUTC 'VARNAME

/*** BLZBFA END ***/



/*** BLZISPFD START ***/

X = X + 1

VARNAME = SYSSTR||TASK.X
INTERPRET SYSSTR||TASK.X ' = "BLZISPFD"'
'GLOBALV PUTC 'VARNAME

VARNAME = 'BLZISPFD'
BLZISPFD = X
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DESC.X
INTERPRET SYSSTR||DESC.X ' = "RTC ISPF DAEMON"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STRT.X
INTERPRET SYSSTR||STRT.X ' = "MVS S BLZISPFD"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STOP.X
INTERPRET SYSSTR||STOP.X ' = "MVS S BLZISPFS"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||PARN.X
INTERPRET SYSSTR||PARN.X ' = "BLZBFA"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STAT.X
INTERPRET SYSSTR||STAT.X ' = "NOSTART"'
IF STATUS <> '' THEN
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DWNL.X
INTERPRET SYSSTR||DWNL.X ' = "6"'
'GLOBALV PUTC 'VARNAME

/*** BLZISPFD END ***/



/*** BUZAGNT START ***/

X = X + 1

VARNAME = SYSSTR||TASK.X
INTERPRET SYSSTR||TASK.X ' = "BUZAGNT"'
'GLOBALV PUTC 'VARNAME

VARNAME = 'BUZAGNT'
BUZAGNT = X
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DESC.X
INTERPRET SYSSTR||DESC.X ' = "URBAN CODE AGENT"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STRT.X
INTERPRET SYSSTR||STRT.X ' = "MVS S BUZAGNT"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STOP.X
INTERPRET SYSSTR||STOP.X ' = "MVS S BUZAGNTC"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||PARN.X
INTERPRET SYSSTR||PARN.X ' = "BLZISPFD"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STAT.X
INTERPRET SYSSTR||STAT.X ' = "NOSTART"'
IF STATUS <> '' THEN
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DWNL.X
INTERPRET SYSSTR||DWNL.X ' = "6"'
'GLOBALV PUTC 'VARNAME

/*** BUZAGNT END ***/



/*** CFZCIM START ***/

X = X + 1

VARNAME = SYSSTR||TASK.X
INTERPRET SYSSTR||TASK.X ' = "CFZCIM"'
'GLOBALV PUTC 'VARNAME

VARNAME = 'CFZCIM'
CFZCIM = X
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DESC.X
INTERPRET SYSSTR||DESC.X ' = "Z/OS CIM SERVER"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STRT.X
INTERPRET SYSSTR||STRT.X ' = "MVS S CFZCIM"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STOP.X
INTERPRET SYSSTR||STOP.X ' = "MVS P CFZCIM"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||PARN.X
INTERPRET SYSSTR||PARN.X ' = "TCPIP"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STAT.X
INTERPRET SYSSTR||STAT.X ' = '
IF STATUS <> '' THEN
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DWNL.X
INTERPRET SYSSTR||DWNL.X ' = "5"'
'GLOBALV PUTC 'VARNAME

/*** CFZCIM END ***/



/*** CICSTS55 START ***/

X = X + 1

VARNAME = SYSSTR||TASK.X
INTERPRET SYSSTR||TASK.X ' = "CICSTS55"'
'GLOBALV PUTC 'VARNAME

VARNAME = 'CICSTS55'
CICSTS55 = X
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DESC.X
INTERPRET SYSSTR||DESC.X ' = "CICS VERSION 5.5"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STRT.X
INTERPRET SYSSTR||STRT.X ' = "MVS S CICSTS55"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STOP.X
INTERPRET SYSSTR||STOP.X ' = "MVS F CICSTS55,CEMT P SHUT"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||PARN.X
INTERPRET SYSSTR||PARN.X ' = "TCPIP,RRS"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STAT.X
INTERPRET SYSSTR||STAT.X ' = "NOSTART"'
IF STATUS <> '' THEN
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DWNL.X
INTERPRET SYSSTR||DWNL.X ' = "6"'
'GLOBALV PUTC 'VARNAME

/*** CICSTS55 END ***/



/*** CICSTS54 START ***/

X = X + 1

VARNAME = SYSSTR||TASK.X
INTERPRET SYSSTR||TASK.X ' = "CICSTS54"'
'GLOBALV PUTC 'VARNAME

VARNAME = 'CICSTS54'
CICSTS54 = X
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DESC.X
INTERPRET SYSSTR||DESC.X ' = "CICS VERSION 5.4"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STRT.X
INTERPRET SYSSTR||STRT.X ' = "MVS S CICSTS54"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STOP.X
INTERPRET SYSSTR||STOP.X ' = "MVS F CICSTS54,CEMT P SHUT"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||PARN.X
INTERPRET SYSSTR||PARN.X ' = "TCPIP,RRS"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STAT.X
INTERPRET SYSSTR||STAT.X ' = "NOSTART"'
IF STATUS <> '' THEN
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DWNL.X
INTERPRET SYSSTR||DWNL.X ' = "6"'
'GLOBALV PUTC 'VARNAME

/*** CICSTS54 END ***/



/*** CSF START ***/

X = X + 1

VARNAME = SYSSTR||TASK.X
INTERPRET SYSSTR||TASK.X ' = "CSF"'
'GLOBALV PUTC 'VARNAME

VARNAME = 'CSF'
CSF = X
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DESC.X
INTERPRET SYSSTR||DESC.X ' = "CRYPTOGRAPHIC SERVICES"'
'GLOBALV PUTC 'VARNAME X

VARNAME = SYSSTR||STRT.X
INTERPRET SYSSTR||STRT.X ' = "MVS S CSF"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STOP.X
INTERPRET SYSSTR||STOP.X ' = "MVS P CSF"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||PARN.X
INTERPRET SYSSTR||PARN.X ' = "JES2"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STAT.X
INTERPRET SYSSTR||STAT.X ' = 'STATUS
IF STATUS <> '' THEN
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DWNL.X
INTERPRET SYSSTR||DWNL.X ' = "4"'
'GLOBALV PUTC 'VARNAME

/*** CSF END ***/



/*** CSQ9CHIN START ***/

X = X + 1

VARNAME = SYSSTR||TASK.X
INTERPRET SYSSTR||TASK.X ' = "CSQ9CHIN"'
'GLOBALV PUTC 'VARNAME

VARNAME = 'CSQ9CHIN'
CSQ9CHIN = X
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DESC.X
INTERPRET SYSSTR||DESC.X ' = "MQSERIES CHANNEL INITIATOR"'
'GLOBALV PUTC 'VARNAME X

VARNAME = SYSSTR||STRT.X
INTERPRET SYSSTR||STRT.X ' = "MVS %CSQ9 START CHINIT"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STOP.X
INTERPRET SYSSTR||STOP.X ' = "MVS %CSQ9 STOP CHINIT"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||PARN.X
INTERPRET SYSSTR||PARN.X ' = "CSQ9MSTR"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STAT.X
INTERPRET SYSSTR||STAT.X ' = "NOSTART"'
IF STATUS <> '' THEN
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DWNL.X
INTERPRET SYSSTR||DWNL.X ' = "5"'
'GLOBALV PUTC 'VARNAME

/*** CSQ9CHIN END ***/



/*** CSQ9MSTR START ***/

X = X + 1

VARNAME = SYSSTR||TASK.X
INTERPRET SYSSTR||TASK.X ' = "CSQ9MSTR"'
'GLOBALV PUTC 'VARNAME

VARNAME = 'CSQ9MSTR'
CSQ9MSTR = X
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DESC.X
INTERPRET SYSSTR||DESC.X ' = "MQSERIES MASTER"'
'GLOBALV PUTC 'VARNAME X

VARNAME = SYSSTR||STRT.X
INTERPRET SYSSTR||STRT.X ' = "MVS %CSQ9 START QMGR"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STOP.X
INTERPRET SYSSTR||STOP.X ' = "MVS %CSQ9 STOP QMGR"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||PARN.X
INTERPRET SYSSTR||PARN.X ' = "TCPIP,RRS"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STAT.X
INTERPRET SYSSTR||STAT.X ' = "NOSTART"'
IF STATUS <> '' THEN
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DWNL.X
INTERPRET SYSSTR||DWNL.X ' = "5"'
'GLOBALV PUTC 'VARNAME

/*** CSQ9MSTR END ***/



/*** DBBGMSTR START ***/

X = X + 1

VARNAME = SYSSTR||TASK.X
INTERPRET SYSSTR||TASK.X ' = "DBBGMSTR"'
'GLOBALV PUTC 'VARNAME

VARNAME = 'DBBGMSTR'
DBBGMSTR = X
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DESC.X
INTERPRET SYSSTR||DESC.X ' = "DB2 VERSION 11"'
'GLOBALV PUTC 'VARNAME X

VARNAME = SYSSTR||STRT.X
INTERPRET SYSSTR||STRT.X ' = "MVS -DBBG START DB2"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STOP.X
INTERPRET SYSSTR||STOP.X ' = "MVS -DBBG STOP DB2"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||PARN.X
INTERPRET SYSSTR||PARN.X ' = "TCPIP,RRS"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STAT.X
INTERPRET SYSSTR||STAT.X ' = "NOSTART"'
IF STATUS <> '' THEN
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DWNL.X
INTERPRET SYSSTR||DWNL.X ' = "6"'
'GLOBALV PUTC 'VARNAME

/*** DBBGMSTR END ***/



/*** DBCGMSTR START ***/

X = X + 1

VARNAME = SYSSTR||TASK.X
INTERPRET SYSSTR||TASK.X ' = "DBCGMSTR"'
'GLOBALV PUTC 'VARNAME

VARNAME = 'DBCGMSTR'
DBCGMSTR = X
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DESC.X
INTERPRET SYSSTR||DESC.X ' = "DB2 VERSION 12"'
'GLOBALV PUTC 'VARNAME X

VARNAME = SYSSTR||STRT.X
INTERPRET SYSSTR||STRT.X ' = "MVS -DBCG START DB2"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STOP.X
INTERPRET SYSSTR||STOP.X ' = "MVS -DBCG STOP DB2"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||PARN.X
INTERPRET SYSSTR||PARN.X ' = "TCPIP,RRS"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STAT.X
INTERPRET SYSSTR||STAT.X ' = "NOSTART"'
IF STATUS <> '' THEN
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DWNL.X
INTERPRET SYSSTR||DWNL.X ' = "6"'
'GLOBALV PUTC 'VARNAME

/*** DBCGMSTR END ***/



/*** DLF START ***/

X = X + 1

VARNAME = SYSSTR||TASK.X
INTERPRET SYSSTR||TASK.X ' = "DLF"'
'GLOBALV PUTC 'VARNAME

VARNAME = 'DLF'
DLF = X
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DESC.X
INTERPRET SYSSTR||DESC.X ' = "Z/OS DATA LOOKASIDE FACILITY"'
'GLOBALV PUTC 'VARNAME X

VARNAME = SYSSTR||STRT.X
INTERPRET SYSSTR||STRT.X ' = "MVS S DLF,SUB=MSTR"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STOP.X
INTERPRET SYSSTR||STOP.X ' = "MVS P DLF"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||PARN.X
INTERPRET SYSSTR||PARN.X ' = "MVS"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STAT.X
INTERPRET SYSSTR||STAT.X ' = 'STATUS
IF STATUS <> '' THEN
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DWNL.X
INTERPRET SYSSTR||DWNL.X ' = "1"'
'GLOBALV PUTC 'VARNAME

/*** DLF END ***/



/*** HTTPD1 START ***/

X = X + 1

VARNAME = SYSSTR||TASK.X
INTERPRET SYSSTR||TASK.X ' = "HTTPD1"'
'GLOBALV PUTC 'VARNAME

VARNAME = 'HTTPD1'
HTTPD1 = X
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DESC.X
INTERPRET SYSSTR||DESC.X ' = "Z/OS HTTP SERVER"'
'GLOBALV PUTC 'VARNAME X

VARNAME = SYSSTR||STRT.X
INTERPRET SYSSTR||STRT.X ' = "MVS S HTTPD1"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STOP.X
INTERPRET SYSSTR||STOP.X ' = "MVS S HTTPD1,ACTION=''stop''"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||PARN.X
INTERPRET SYSSTR||PARN.X ' = "TCPIP"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STAT.X
INTERPRET SYSSTR||STAT.X ' = "NOSTART"'
IF STATUS <> '' THEN
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DWNL.X
INTERPRET SYSSTR||DWNL.X ' = "4"'
'GLOBALV PUTC 'VARNAME

/*** HTTPD1 END ***/



/*** HZSPROC START ***/

X = X + 1

VARNAME = SYSSTR||TASK.X
INTERPRET SYSSTR||TASK.X ' = "HZSPROC"'
'GLOBALV PUTC 'VARNAME

VARNAME = 'HZSPROC'
HZSPROC = X
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DESC.X
INTERPRET SYSSTR||DESC.X ' = "Z/OS HEALTH CHECKER"'
'GLOBALV PUTC 'VARNAME X

VARNAME = SYSSTR||STRT.X
INTERPRET SYSSTR||STRT.X ' = "MVS S HZSPROC"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STOP.X
INTERPRET SYSSTR||STOP.X ' = "MVS P HZSPROC"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||PARN.X
INTERPRET SYSSTR||PARN.X ' = "TCPIP"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STAT.X
INTERPRET SYSSTR||STAT.X ' = 'STATUS
IF STATUS <> '' THEN
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DWNL.X
INTERPRET SYSSTR||DWNL.X ' = "5"'
'GLOBALV PUTC 'VARNAME

/*** HZSPROC END ***/



/*** IMS14CR1 START ***/

X = X + 1

VARNAME = SYSSTR||TASK.X
INTERPRET SYSSTR||TASK.X ' = "IMS14CR1"'
'GLOBALV PUTC 'VARNAME

VARNAME = 'IMS14CR1'
IMS14CR1 = X
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DESC.X
INTERPRET SYSSTR||DESC.X ' = "IMS VERSION 14"'
'GLOBALV PUTC 'VARNAME X

VARNAME = SYSSTR||STRT.X
INTERPRET SYSSTR||STRT.X ' = "MVS S IMS14CR1"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STOP.X
INTERPRET SYSSTR||STOP.X ' = "IMSSTOP IMS14CR1"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||PARN.X
INTERPRET SYSSTR||PARN.X ' = "IMS14RL1,RRS"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STAT.X
INTERPRET SYSSTR||STAT.X ' = "NOSTART"'
IF STATUS <> '' THEN
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DWNL.X
INTERPRET SYSSTR||DWNL.X ' = "6"'
'GLOBALV PUTC 'VARNAME

/*** IMS14CR1 END ***/



/*** IMS14RL1 START ***/

X = X + 1

VARNAME = SYSSTR||TASK.X
INTERPRET SYSSTR||TASK.X ' = "IMS14RL1"'
'GLOBALV PUTC 'VARNAME

VARNAME = 'IMS14RL1'
IMS14RL1 = X
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DESC.X
INTERPRET SYSSTR||DESC.X ' = "IMS VERSION 14 IRLM"'
'GLOBALV PUTC 'VARNAME X

VARNAME = SYSSTR||STRT.X
INTERPRET SYSSTR||STRT.X ' = "MVS S IMS14RL1"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STOP.X
INTERPRET SYSSTR||STOP.X ' = "MVS P IMS14RL1"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||PARN.X
INTERPRET SYSSTR||PARN.X ' = "TCPIP"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STAT.X
INTERPRET SYSSTR||STAT.X ' = "NOSTART"'
IF STATUS <> '' THEN
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DWNL.X
INTERPRET SYSSTR||DWNL.X ' = "6"'
'GLOBALV PUTC 'VARNAME

/*** IMS14RL1 END ***/



/*** IMS15CR1 START ***/

X = X + 1

VARNAME = SYSSTR||TASK.X
INTERPRET SYSSTR||TASK.X ' = "IMS15CR1"'
'GLOBALV PUTC 'VARNAME

VARNAME = 'IMS15CR1'
IMS15CR1 = X
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DESC.X
INTERPRET SYSSTR||DESC.X ' = "IMS VERSION 15"'
'GLOBALV PUTC 'VARNAME X

VARNAME = SYSSTR||STRT.X
INTERPRET SYSSTR||STRT.X ' = "MVS S IMS15CR1"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STOP.X
INTERPRET SYSSTR||STOP.X ' = "IMSSTOP IMS15CR1"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||PARN.X
INTERPRET SYSSTR||PARN.X ' = "IMS15RL1,RRS"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STAT.X
INTERPRET SYSSTR||STAT.X ' = "NOSTART"'
IF STATUS <> '' THEN
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DWNL.X
INTERPRET SYSSTR||DWNL.X ' = "6"'
'GLOBALV PUTC 'VARNAME

/*** IMS15CR1 END ***/



/*** IMS15RL1 START ***/

X = X + 1

VARNAME = SYSSTR||TASK.X
INTERPRET SYSSTR||TASK.X ' = "IMS15RL1"'
'GLOBALV PUTC 'VARNAME

VARNAME = 'IMS15RL1'
IMS15RL1 = X
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DESC.X
INTERPRET SYSSTR||DESC.X ' = "IMS VERSION 15 IRLM"'
'GLOBALV PUTC 'VARNAME X

VARNAME = SYSSTR||STRT.X
INTERPRET SYSSTR||STRT.X ' = "MVS S IMS15RL1"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STOP.X
INTERPRET SYSSTR||STOP.X ' = "MVS P IMS15RL1"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||PARN.X
INTERPRET SYSSTR||PARN.X ' = "TCPIP"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STAT.X
INTERPRET SYSSTR||STAT.X ' = "NOSTART"'
IF STATUS <> '' THEN
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DWNL.X
INTERPRET SYSSTR||DWNL.X ' = "6"'
'GLOBALV PUTC 'VARNAME

/*** IMS15RL1 END ***/



/*** IZUANG1 START ***/

X = X + 1

VARNAME = SYSSTR||TASK.X
INTERPRET SYSSTR||TASK.X ' = "IZUANG1"'
'GLOBALV PUTC 'VARNAME

VARNAME = 'IZUANG1'
IZUANG1 = X
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DESC.X
INTERPRET SYSSTR||DESC.X ' = "Z/OSMF ANGEL SERVICE"'
'GLOBALV PUTC 'VARNAME X

VARNAME = SYSSTR||STRT.X
INTERPRET SYSSTR||STRT.X ' = "MVS S IZUANG1"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STOP.X
INTERPRET SYSSTR||STOP.X ' = "MVS P IZUANG1"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||PARN.X
INTERPRET SYSSTR||PARN.X ' = "TCPIP"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STAT.X
INTERPRET SYSSTR||STAT.X ' = "NOSTART"'
IF STATUS <> '' THEN
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DWNL.X
INTERPRET SYSSTR||DWNL.X ' = "6"'
'GLOBALV PUTC 'VARNAME

/*** IZUANG1 END ***/



/*** IZUSVR1 START ***/

X = X + 1

VARNAME = SYSSTR||TASK.X
INTERPRET SYSSTR||TASK.X ' = "IZUSVR1"'
'GLOBALV PUTC 'VARNAME

VARNAME = 'IZUSVR1'
IZUSVR1 = X
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DESC.X
INTERPRET SYSSTR||DESC.X ' = "Z/OSMF SERVER"'
'GLOBALV PUTC 'VARNAME X

VARNAME = SYSSTR||STRT.X
INTERPRET SYSSTR||STRT.X ' = "MVS S IZUSVR1"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STOP.X
INTERPRET SYSSTR||STOP.X ' = "MVS P IZUSVR1"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||PARN.X
INTERPRET SYSSTR||PARN.X ' = "TCPIP,IZUANG1"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STAT.X
INTERPRET SYSSTR||STAT.X ' = "NOSTART"'
IF STATUS <> '' THEN
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DWNL.X
INTERPRET SYSSTR||DWNL.X ' = "6"'
'GLOBALV PUTC 'VARNAME

/*** IZUSVR1 END ***/



/*** JES2 START ***/

X = X + 1

VARNAME = SYSSTR||TASK.X
INTERPRET SYSSTR||TASK.X ' = "JES2"'
'GLOBALV PUTC 'VARNAME

VARNAME = 'JES2'
JES2 = X
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STRT.X
INTERPRET SYSSTR||STRT.X ' = "MVS S JES2,SUB=MSTR,PARM=&JES2STR_"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DESC.X
INTERPRET SYSSTR||DESC.X ' = "Z/OS JOB ENTRY SUBSYSTEM"'
'GLOBALV PUTC 'VARNAME X

VARNAME = SYSSTR||STOP.X
INTERPRET SYSSTR||STOP.X ' = "@STOPJES"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||PARN.X
INTERPRET SYSSTR||PARN.X ' = "MVS,LLA,VLF"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STAT.X
INTERPRET SYSSTR||STAT.X ' = 'STATUS
IF STATUS <> '' THEN
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DWNL.X
INTERPRET SYSSTR||DWNL.X ' = "1"'
'GLOBALV PUTC 'VARNAME

/*** JES2 END ***/



/*** JMON START ***/

X = X + 1

VARNAME = SYSSTR||TASK.X
INTERPRET SYSSTR||TASK.X ' = "JMON"'
'GLOBALV PUTC 'VARNAME

VARNAME = 'JMON'
JMON = X
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DESC.X
INTERPRET SYSSTR||DESC.X ' = "Z/OS EXPLOROR JES MONITOR"'
'GLOBALV PUTC 'VARNAME X

VARNAME = SYSSTR||STRT.X
INTERPRET SYSSTR||STRT.X ' = "MVS S JMON"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STOP.X
INTERPRET SYSSTR||STOP.X ' = "MVS P JMON"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||PARN.X
INTERPRET SYSSTR||PARN.X ' = "TCPIP"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STAT.X
INTERPRET SYSSTR||STAT.X ' = "NOSTART"'
IF STATUS <> '' THEN
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DWNL.X
INTERPRET SYSSTR||DWNL.X ' = "5"'
'GLOBALV PUTC 'VARNAME

/*** JMON END ***/



/*** LLA START ***/

X = X + 1

VARNAME = SYSSTR||TASK.X
INTERPRET SYSSTR||TASK.X ' = "LLA"'
'GLOBALV PUTC 'VARNAME

VARNAME = 'LLA'
LLA = X
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DESC.X
INTERPRET SYSSTR||DESC.X ' = "Z/OS LIBRARY LOOKASIDE"'
'GLOBALV PUTC 'VARNAME X

VARNAME = SYSSTR||STRT.X
INTERPRET SYSSTR||STRT.X ' = "MVS S LLA,SUB=MSTR"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STOP.X
INTERPRET SYSSTR||STOP.X ' = "MVS P LLA"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||PARN.X
INTERPRET SYSSTR||PARN.X ' = "VLF"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STAT.X
INTERPRET SYSSTR||STAT.X ' = 'STATUS
IF STATUS <> '' THEN
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DWNL.X
INTERPRET SYSSTR||DWNL.X ' = "1"'
'GLOBALV PUTC 'VARNAME

/*** LLA END ***/



/*** MVS START ***/

X = X + 1

VARNAME = SYSSTR||TASK.X
INTERPRET SYSSTR||TASK.X ' = "MVS"'
'GLOBALV PUTC 'VARNAME

VARNAME = 'MVS'
MVS = X
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STRT.X
INTERPRET SYSSTR||STRT.X ' = '
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DESC.X
INTERPRET SYSSTR||DESC.X ' = "MVS DUMMY TASK"'
'GLOBALV PUTC 'VARNAME X

VARNAME = SYSSTR||STOP.X
INTERPRET SYSSTR||STOP.X ' = "SHUTSYS"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||PARN.X
INTERPRET SYSSTR||PARN.X ' = "NULL"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STAT.X
INTERPRET SYSSTR||STAT.X ' = "UP"'
IF STATUS <> '' THEN
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DWNL.X
INTERPRET SYSSTR||DWNL.X ' = "0"'
'GLOBALV PUTC 'VARNAME

/*** MVS END ***/



/*** NFSS START ***/

X = X + 1

VARNAME = SYSSTR||TASK.X
INTERPRET SYSSTR||TASK.X ' = "NFSS"'
'GLOBALV PUTC 'VARNAME

VARNAME = 'NFSS'
NFSS = X
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STRT.X
INTERPRET SYSSTR||STRT.X ' = "MVS S NFSS"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DESC.X
INTERPRET SYSSTR||DESC.X ' = "Z/OS NFS SERVER"'
'GLOBALV PUTC 'VARNAME X

VARNAME = SYSSTR||STOP.X
INTERPRET SYSSTR||STOP.X ' = "MVS P NFSS"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||PARN.X
INTERPRET SYSSTR||PARN.X ' = "TCPIP"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STAT.X
INTERPRET SYSSTR||STAT.X ' = "NOSTART"'
IF STATUS <> '' THEN
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DWNL.X
INTERPRET SYSSTR||DWNL.X ' = "4"'
'GLOBALV PUTC 'VARNAME

/*** NFSS END ***/



/*** SSHD START ***/

X = X + 1

VARNAME = SYSSTR||TASK.X
INTERPRET SYSSTR||TASK.X ' = "SSHD"'
'GLOBALV PUTC 'VARNAME

VARNAME = 'SSHD'
SSHD = X
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STRT.X
INTERPRET SYSSTR||STRT.X ' = "MVS S SSHD"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DESC.X
INTERPRET SYSSTR||DESC.X ' = "TCP/IP SSH SERVER"'
'GLOBALV PUTC 'VARNAME X

VARNAME = SYSSTR||STOP.X
INTERPRET SYSSTR||STOP.X ' = "MVS C SSHD3"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||PARN.X
INTERPRET SYSSTR||PARN.X ' = "TCPIP"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STAT.X
INTERPRET SYSSTR||STAT.X ' = 'STATUS
IF STATUS <> '' THEN
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DWNL.X
INTERPRET SYSSTR||DWNL.X ' = "4"'
'GLOBALV PUTC 'VARNAME

/*** SSHD END ***/



/*** OMVS START ***/

X = X + 1

VARNAME = SYSSTR||TASK.X
INTERPRET SYSSTR||TASK.X ' = "OMVS"'
'GLOBALV PUTC 'VARNAME

VARNAME = 'OMVS'
OMVS = X
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STRT.X
INTERPRET SYSSTR||STRT.X ' = '
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DESC.X
INTERPRET SYSSTR||DESC.X ' = "Z/OS OPEN MVS SERVER"'
'GLOBALV PUTC 'VARNAME X

VARNAME = SYSSTR||STOP.X
INTERPRET SYSSTR||STOP.X ' = "F OMVS,SHUTDOWN"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||PARN.X
INTERPRET SYSSTR||PARN.X ' = "JES2"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STAT.X
INTERPRET SYSSTR||STAT.X ' = "DOWN"'
IF STATUS <> '' THEN
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DWNL.X
INTERPRET SYSSTR||DWNL.X ' = "2"'
'GLOBALV PUTC 'VARNAME

/*** OMVS END ***/



/*** RRS START ***/

X = X + 1

VARNAME = SYSSTR||TASK.X
INTERPRET SYSSTR||TASK.X ' = "RRS"'
'GLOBALV PUTC 'VARNAME

VARNAME = 'RRS'
RRS = X
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DESC.X
INTERPRET SYSSTR||DESC.X ' = "Z/OS RECOVERY SERVICES"'
'GLOBALV PUTC 'VARNAME X

VARNAME = SYSSTR||STRT.X
INTERPRET SYSSTR||STRT.X ' = "MVS S RRS,SUB=MSTR,GNAME=&SYSNAME"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STOP.X
INTERPRET SYSSTR||STOP.X ' = "MVS SETRRS SHUTDOWN"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||PARN.X
INTERPRET SYSSTR||PARN.X ' = "MVS"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STAT.X
INTERPRET SYSSTR||STAT.X ' = 'STATUS
IF STATUS <> '' THEN
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DWNL.X
INTERPRET SYSSTR||DWNL.X ' = "2"'
'GLOBALV PUTC 'VARNAME

/*** RRS END ***/



/*** RSED START ***/

X = X + 1

VARNAME = SYSSTR||TASK.X
INTERPRET SYSSTR||TASK.X ' = "RSED"'
'GLOBALV PUTC 'VARNAME

VARNAME = 'RSED'
RSED = X
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DESC.X
INTERPRET SYSSTR||DESC.X ' = "Z/OS EXPLORER SERVER"'
'GLOBALV PUTC 'VARNAME X

VARNAME = SYSSTR||STRT.X
INTERPRET SYSSTR||STRT.X ' = "MVS S RSED"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STOP.X
INTERPRET SYSSTR||STOP.X ' = "MVS P RSED"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||PARN.X
INTERPRET SYSSTR||PARN.X ' = "TCPIP"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STAT.X
INTERPRET SYSSTR||STAT.X ' = "NOSTART"'
IF STATUS <> '' THEN
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DWNL.X
INTERPRET SYSSTR||DWNL.X ' = "5"'
'GLOBALV PUTC 'VARNAME

/*** RSED END ***/



/*** SDSF START ***/

X = X + 1

VARNAME = SYSSTR||TASK.X
INTERPRET SYSSTR||TASK.X ' = "SDSF"'
'GLOBALV PUTC 'VARNAME

VARNAME = 'SDSF'
SDSF = X
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DESC.X
INTERPRET SYSSTR||DESC.X ' = "Z/OS SYSTEM DISPLAY/SEARCH"'
'GLOBALV PUTC 'VARNAME X

VARNAME = SYSSTR||STRT.X
INTERPRET SYSSTR||STRT.X ' = "MVS S SDSF"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STOP.X
INTERPRET SYSSTR||STOP.X ' = "MVS P SDSF"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||PARN.X
INTERPRET SYSSTR||PARN.X ' = "JES2"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STAT.X
INTERPRET SYSSTR||STAT.X ' = 'STATUS
IF STATUS <> '' THEN
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DWNL.X
INTERPRET SYSSTR||DWNL.X ' = "5"'
'GLOBALV PUTC 'VARNAME

/*** SDSF END ***/



/*** TCPIP START ***/

X = X + 1

VARNAME = SYSSTR||TASK.X
INTERPRET SYSSTR||TASK.X ' = "TCPIP"'
'GLOBALV PUTC 'VARNAME

VARNAME = 'TCPIP'
TCPIP = X
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DESC.X
INTERPRET SYSSTR||DESC.X ' = "Z/OS TCPIP SERVER"'
'GLOBALV PUTC 'VARNAME X

VARNAME = SYSSTR||STRT.X
INTERPRET SYSSTR||STRT.X ' = "MVS S TCPIP"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STOP.X
INTERPRET SYSSTR||STOP.X ' = "MVS P TCPIP"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||PARN.X
INTERPRET SYSSTR||PARN.X ' = "VTAM"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STAT.X
INTERPRET SYSSTR||STAT.X ' = 'STATUS
IF STATUS <> '' THEN
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DWNL.X
INTERPRET SYSSTR||DWNL.X ' = "3"'
'GLOBALV PUTC 'VARNAME

/*** TCPIP END ***/



/*** TN3270 START ***/

X = X + 1

VARNAME = SYSSTR||TASK.X
INTERPRET SYSSTR||TASK.X ' = "TN3270"'
'GLOBALV PUTC 'VARNAME

VARNAME = 'TN3270'
TN3270 = X
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DESC.X
INTERPRET SYSSTR||DESC.X ' = "TELNET 3270 SERVER"'
'GLOBALV PUTC 'VARNAME X

VARNAME = SYSSTR||STRT.X
INTERPRET SYSSTR||STRT.X ' = "MVS S TN3270"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STOP.X
INTERPRET SYSSTR||STOP.X ' = "MVS P TN3270"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||PARN.X
INTERPRET SYSSTR||PARN.X ' = "TCPIP"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STAT.X
INTERPRET SYSSTR||STAT.X ' = 'STATUS
IF STATUS <> '' THEN
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DWNL.X
INTERPRET SYSSTR||DWNL.X ' = "4"'
'GLOBALV PUTC 'VARNAME

/*** TN3270 END ***/



/*** TSO START ***/

X = X + 1

VARNAME = SYSSTR||TASK.X
INTERPRET SYSSTR||TASK.X ' = "TSO"'
'GLOBALV PUTC 'VARNAME

VARNAME = 'TSO'
TSO = X
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DESC.X
INTERPRET SYSSTR||DESC.X ' = "TIME SHARING OPTION"'
'GLOBALV PUTC 'VARNAME X

VARNAME = SYSSTR||STRT.X
INTERPRET SYSSTR||STRT.X ' = "MVS S TSO"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STOP.X
INTERPRET SYSSTR||STOP.X ' = "MVS P TSO"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||PARN.X
INTERPRET SYSSTR||PARN.X ' = "TN3270"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STAT.X
INTERPRET SYSSTR||STAT.X ' = 'STATUS
IF STATUS <> '' THEN
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DWNL.X
INTERPRET SYSSTR||DWNL.X ' = "5"'
'GLOBALV PUTC 'VARNAME

/*** TSO END ***/



/*** VLF START ***/

X = X + 1

VARNAME = SYSSTR||TASK.X
INTERPRET SYSSTR||TASK.X ' = "VLF"'
'GLOBALV PUTC 'VARNAME

VARNAME = 'VLF'
VLF = X
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DESC.X
INTERPRET SYSSTR||DESC.X ' = "Z/OS VIRUTAL LOOKASIDE"'
'GLOBALV PUTC 'VARNAME X

VARNAME = SYSSTR||STRT.X
INTERPRET SYSSTR||STRT.X ' = "MVS S VLF,SUB=MSTR"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STOP.X
INTERPRET SYSSTR||STOP.X ' = "MVS P VLF"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||PARN.X
INTERPRET SYSSTR||PARN.X ' = "MVS"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STAT.X
INTERPRET SYSSTR||STAT.X ' = 'STATUS
IF STATUS <> '' THEN
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DWNL.X
INTERPRET SYSSTR||DWNL.X ' = "1"'
'GLOBALV PUTC 'VARNAME

/*** VLF END ***/



/*** VTAM START ***/

X = X + 1

VARNAME = SYSSTR||TASK.X
INTERPRET SYSSTR||TASK.X ' = "VTAM"'
'GLOBALV PUTC 'VARNAME

VARNAME = 'VTAM'
VTAM = X
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DESC.X
INTERPRET SYSSTR||DESC.X ' = "VIRTUAL TELCOM ACCESS METHOD"'
'GLOBALV PUTC 'VARNAME X

VARNAME = SYSSTR||STRT.X
INTERPRET SYSSTR||STRT.X ' = "MVS S VTAM"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STOP.X
INTERPRET SYSSTR||STOP.X ' = "MVS Z NET,QUICK"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||PARN.X
INTERPRET SYSSTR||PARN.X ' = "JES2,RRS"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STAT.X
INTERPRET SYSSTR||STAT.X ' = 'STATUS
IF STATUS <> '' THEN
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DWNL.X
INTERPRET SYSSTR||DWNL.X ' = "2"'
'GLOBALV PUTC 'VARNAME

/*** VTAM END ***/



/*** ZOSCSRV START ***/

X = X + 1

VARNAME = SYSSTR||TASK.X
INTERPRET SYSSTR||TASK.X ' = "ZOSCSRV"'
'GLOBALV PUTC 'VARNAME

VARNAME = 'ZOSCSRV'
ZOSCSRV = X
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DESC.X
INTERPRET SYSSTR||DESC.X ' = "Z/OS CONNECT SERVER"'
'GLOBALV PUTC 'VARNAME X

VARNAME = SYSSTR||STRT.X
INTERPRET SYSSTR||STRT.X ' = "MVS S ZOSCSRV"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STOP.X
INTERPRET SYSSTR||STOP.X ' = "MVS P ZOSCSRV"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||PARN.X
INTERPRET SYSSTR||PARN.X ' = "TCPIP"'
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||STAT.X
INTERPRET SYSSTR||STAT.X ' = "NOSTART"'
IF STATUS <> '' THEN
'GLOBALV PUTC 'VARNAME

VARNAME = SYSSTR||DWNL.X
INTERPRET SYSSTR||DWNL.X ' = "6"'
'GLOBALV PUTC 'VARNAME

/*** ZOSCSRV END ***/



/***** TOTAL TASK COUNTER *****/
VARNAME = SYSSTR||'TASKS'
INTERPRET VARNAME '= X'
'GLOBALV PUTC 'VARNAME
```

</div></details>

ここではNetviewで管理する各サブシステムのタスク名や起動/停止コマンド、自動起動の有無などを定義しています。

【補足】各タスクは以下のような情報を登録しています。
TASK: タスク名
DESC: タスク名に関する説明
STRT: 起動コマンド
STOP: 停止コマンド
PARN: 依存関係のある親のタスク(Parents)
※PARNにはカンマ区切りで3つまでタスク名を指定可能(詳細は後述のGETPARN参照)
STAT: ステータス(NOSTART, COMPLETE, UP, DOWN, IPL)
DWNL: ???

## 自動起動するミドルウェアのステータス更新
`CALL STARTUPS`

ZD&Tインスタンスをデプロイする際に、一部のミドルウェアは選択できるようになっています。今回の例では、CICS TS V5.5, Db2 V12を選択しているのでその選択されたコンポーネントのみ自動起動するようになっています。それを制御しているのがSTARTUPSというREXXです。ZD&Tインスタンス生成時にSTARTUP#というメンバーをテンプレートとしてSTARTUPSというメンバーを作成しているようです。

<details><summary><font color="blue">NETVIEW.CNM01.CNMCLST(STARTUPS)</font></summary><div>


```xxx:NETVIEW.CNM01.CNMCLST(STARTUPS)
/* REXX */
/* LICENSED MATERIAL - PROPERTY OF IBM                                     */
/*  C) COPYRIGHT IBM CORP. 2019,2020 - ALL RIGHTS RESERVED.                */
/*  US GOVERNMENT USERS RESTRICTED RIGHTS - USE, DUPLICATION OR DISCLOSURE */
/*  RESTRICTED BY GSA ADP SCHEDULE CONTRACT WITH IBM CORP.                 */

TASK.1 = "BLZBFA NOSTART"
TASK.2 = "BLZISPFD NOSTART"
TASK.3 = "BUZAGNT NOSTART"
TASK.4 = "CICSTS55 IPL"
TASK.5 = "CICSTS54 NOSTART"
TASK.6 = "CSQ9CHIN NOSTART"
TASK.7 = "CSQ9MSTR NOSTART"
TASK.8 = "DBBGMSTR NOSTART"
TASK.9 = "DBCGMSTR IPL"
TASK.10 = "HTTPD1 NOSTART"
TASK.11 = "IMS14CR1 NOSTART"
TASK.12 = "IMS14RL1 NOSTART"
TASK.13 = "IMS15CR1 NOSTART"
TASK.14 = "IMS15RL1 NOSTART"
TASK.15 = "IZUANG1 NOSTART"
TASK.16 = "IZUSVR1 NOSTART"
TASK.17 = "JMON NOSTART"
TASK.18 = "NFSS NOSTART"
TASK.19 = "RSED NOSTART"
TASK.20 = "ZOSCSRV NOSTART"
TASK.0 = 20

DO LP = 1 TO TASK.0

  PARSE VAR TASK.LP TASKNAME TASKSTAT JUNK
  CALL SETSTAT TASKNAME TASKSTAT

END

EXIT
```

</div></details>

ここでは、CICSTS55(CICS TS V5.5)、および、DBCGMSTR(Db2 V12)のステータスをIPLに変更し、IPL時に自動起動するようにしています。



## サブシステム起動
`CALL STARTSYS`
実際にサブシステムの起動処理を制御しているのがSTARTSYSというREXXです。

<details><summary><font color="blue">NETVIEW.CNM01.CNMCLST(STARTSYS)</font></summary><div>

```xxx:NETVIEW.CNM01.CNMCLST(STARTSYS)
/* REXX */
/* LICENSED MATERIAL - PROPERTY OF IBM                                     */
/*  C) COPYRIGHT IBM CORP. 2019,2020 - ALL RIGHTS RESERVED.                */
/*  US GOVERNMENT USERS RESTRICTED RIGHTS - USE, DUPLICATION OR DISCLOSURE */
/*  RESTRICTED BY GSA ADP SCHEDULE CONTRACT WITH IBM CORP.                 */

  SYSSTR = 'SY'||SUBSTR(DOMAIN(),LENGTH(DOMAIN()),1)

  VARNAME = SYSSTR||'TASKS'
  'GLOBALV GETC 'VARNAME
  TOT_TASKS = VALUE(VARNAME)

  TASKREMAIN = 'NO'

  DO TASKNO = 1 TO TOT_TASKS

    STRTCMD = SYSSTR||'STRT.'TASKNO
    TASKNAME = SYSSTR||'TASK.'TASKNO
    TASKSTAT = SYSSTR||'STAT.'TASKNO
    STARTCNT = SYSSTR||"SCNT."TASKNO

    'GLOBALV GETC 'STRTCMD TASKNAME TASKSTAT STARTCNT
    TASKNAME = VALUE(TASKNAME)
    STRTCMD  = VALUE(STRTCMD)
    TASKSTAT = VALUE(TASKSTAT)
    STARTCNT = VALUE(STARTCNT)

    IF TASKSTAT ^= 'DOWN' | STARTCNT = '1' THEN ITERATE

    TASKREMAIN = 'YES'

    CALL GETPARN TASKNAME
    PARCHEK = RESULT

    IF PARCHEK = 'UP' THEN
    DO
      CALL CHKSTAT TASKNAME
      SAY RESULT
      IF RESULT = 'DOWN' THEN
      DO
        VARNAME = SYSSTR||"SCNT."TASKNO
        INTERPRET VARNAME ' = "1"'
        'GLOBALV PUTC 'VARNAME
        CALL SETSTAT TASKNAME STARTING
        STRTCMD
      END
    END

  END


  IF TASKREMAIN = 'YES' THEN
  'AFTER 00:00:03,ROUTE=AUTO2,ID=STARTSYS,STARTSYS'
  ELSE
  DO
    WTO.DESC = '0100010000000000'
    WTO.MCSFLAG  = '00000000'
    WTO 'ALL DEFINED SUBSYSTEMS HAVE BEEN STARTED'
     DSPSTAT
  END


EXIT
```

</div></details>

処理内容を少し補足すると、このREXXではざっくり以下のような処理を行っています。

- 登録されているタスクについてそれぞれ以下を実施。
    - 当該タスクと依存関係のある親タスクが稼働しているかチェックし(`CALL GETPARN TASKNAME`)、稼働していれば次に進む
    - 当該タスクのステータスをチェックし(`CALL CHKSTAT TASKNAME`)、"DOWN"状態だったらステータスを"STARTING"に変更し(`CALL SETSTAT TASKNAME STARTING`)、起動コマンドを実行(`STRTCMD`)
        - CHKSTATでは、"NOSTATRT"のものは起動しない、実際の稼働状況確認のためにDISPLAYコマンドで判定する(起動していればUP, していなければDOWNにステータス変更)、といった処理を実施
- 全てのタスクが稼働するまで、自分自身を3秒後に再起動する処理を繰り返す(`'AFTER 00:00:03,ROUTE=AUTO2,ID=STARTSYS,STARTSYS'`)


参考:

<details><summary><font color="blue">NETVIEW.CNM01.CNMCLST(GETPARN)</font></summary><div>

```xxx:NETVIEW.CNM01.CNMCLST(GETPARN)
/* REXX */
/* LICENSED MATERIAL - PROPERTY OF IBM                                     */
/*  C) COPYRIGHT IBM CORP. 2019,2020 - ALL RIGHTS RESERVED.                */
/*  US GOVERNMENT USERS RESTRICTED RIGHTS - USE, DUPLICATION OR DISCLOSURE */
/*  RESTRICTED BY GSA ADP SCHEDULE CONTRACT WITH IBM CORP.                 */

  SYSSTR = 'SY'||SUBSTR(DOMAIN(),LENGTH(DOMAIN()),1)

  ARG TASKNAME

  'GLOBALV GETC 'TASKNAME

  TASKNO = VALUE(TASKNAME)

  VARNAME = SYSSTR||'TASK.'||TASKNO
  'GLOBALV GETC 'VARNAME

  VARNAM1 = SYSSTR||'PARN.'TASKNO

  'GLOBALV GETC 'VARNAM1

  PARENTS = VALUE(VARNAM1)

  PARSE VAR PARENTS PARNAM1","PARNAM2","PARNAM3

  PARCHEK = 'UP'
  DO PARLOOP = 1 TO 3
    PARNAME = VALUE(PARNAM||PARLOOP)
    IF PARNAME = '' THEN LEAVE
    'GLOBALV GETC 'PARNAME
    PARTASKNO = VALUE(PARNAME)

    PARSTAT = SYSSTR||'STAT.'||PARTASKNO
    'GLOBALV GETC 'PARSTAT
    PARSTAT = VALUE(PARSTAT)
    IF PARSTAT <> 'UP' & PARSTAT <> 'COMPLETE' THEN
      PARCHEK = 'FAIL'
  END

RETURN PARCHEK
```

</div></details>



<details><summary><font color="blue">NETVIEW.CNM01.CNMCLST(CHKSTAT)</font></summary><div>


```xxx:NETVIEW.CNM01.CNMCLST(CHKSTAT)
/* REXX */
/* LICENSED MATERIAL - PROPERTY OF IBM                                     */
/*  C) COPYRIGHT IBM CORP. 2019,2020 - ALL RIGHTS RESERVED.                */
/*  US GOVERNMENT USERS RESTRICTED RIGHTS - USE, DUPLICATION OR DISCLOSURE */
/*  RESTRICTED BY GSA ADP SCHEDULE CONTRACT WITH IBM CORP.                 */

  SYSSTR = 'SY'||SUBSTR(DOMAIN(),LENGTH(DOMAIN()),1)

  ARG TASKNAME

  IF TASKNAME = 'MVS' THEN EXIT

  'GLOBALV GETC 'TASKNAME
  TASKNUM = VALUE(TASKNAME)
  VARNAME = SYSSTR||'STAT.'TASKNUM
  CURSTAT = VALUE(VARNAME)
  IF CURSTAT = 'NOSTART' THEN
  DO
     SAY 'TASK STATUS IS NOSTART .. EXITING'
     STATUS = 'NOSTART'
     RETURN STATUS
  END
  IF TASKNUM = ' ' THEN EXIT

  'TRAP AND SUPPRESS MESSAGES CNZ4106I'
  'MVS D A,'TASKNAME
  'WAIT 5 SECONDS FOR MESSAGES'

  SELECT
    WHEN EVENT() = 'M' THEN
    DO
       'MSGREAD'
       'GETMLINE LINE' 4
       PARSE VAR LINE V1 V2 V3 .
       IF V2 V3 = 'NOT FOUND' THEN
       DO
         SAY TASKNAME' NOT FOUND ... SETTING STATUS TO DOWN'
         VARNAME = SYSSTR||'STAT.'TASKNUM
         INTERPRET VARNAME '= DOWN'
         'GLOBALV PUTC 'VARNAME
         STATUS = 'DOWN'
       END
       ELSE
       DO
         SAY TASKNAME' FOUND ACTIVE .. SETTING STATUS TO UP'
         VARNAME = SYSSTR||'STAT.'TASKNUM
         INTERPRET VARNAME '= UP'
         'GLOBALV PUTC 'VARNAME
         STATUS = 'ACTIVE'
       END
    END
    OTHERWISE
  END

  'TRAP NO MESSAGES'
  'FLUSHQ'


RETURN STATUS
```

</div></details>


<details><summary><font color="blue">NETVIEW.CNM01.CNMCLST(SETSTAT)</font></summary><div>


```xxx:NETVIEW.CNM01.CNMCLST(SETSTAT)
/* REXX */
/* LICENSED MATERIAL - PROPERTY OF IBM                                     */
/*  C) COPYRIGHT IBM CORP. 2019,2020 - ALL RIGHTS RESERVED.                */
/*  US GOVERNMENT USERS RESTRICTED RIGHTS - USE, DUPLICATION OR DISCLOSURE */
/*  RESTRICTED BY GSA ADP SCHEDULE CONTRACT WITH IBM CORP.                 */

/* GENERIC TASK UP */

  SYSSTR = 'SY'||SUBSTR(DOMAIN(),LENGTH(DOMAIN()),1)

  ARG TASKNAME STATUS

  'GLOBALV GETC 'TASKNAME
  TASKNO = VALUE(TASKNAME)

  VARNAME = SYSSTR||'STAT.'||TASKNO
  INTERPRET VARNAME ' = 'STATUS
  'GLOBALV PUTC 'VARNAME

EXIT
```

</div></details>

## Netviewで管理されているタスクの状況表示

Netviewで管理されているタスクの一覧とステータスを表示するためのREXX"GETSTAT"というのも用意されているので、それで一覧表示させることができます。

```                                                     
F CNMPROC,GETSTAT                                                   
                                                                    
TASKNAME   DESCRIPTION                               CURRENT STATUS 
------------------------------------------------------------------- 
    ASCH   APPC SCHEDULER                        STATUS   = NOSTART 
  BLZBFA   RTC BUILD ABENT                       STATUS   = NOSTART 
BLZISPFD   RTC ISPF DAEMON                       STATUS   = NOSTART 
 BUZAGNT   URBAN CODE AGENT                      STATUS   = NOSTART 
  CFZCIM   Z/OS CIM SERVER                       STATUS   = UP      
CICSTS55   CICS VERSION 5.5                      STATUS   = UP      
CICSTS54   CICS VERSION 5.4                      STATUS   = NOSTART 
     CSF   CRYPTOGRAPHIC SERVICES                STATUS   = UP      
CSQ9CHIN   MQSERIES CHANNEL INITIATOR            STATUS   = NOSTART 
CSQ9MSTR   MQSERIES MASTER                       STATUS   = NOSTART 
DBBGMSTR   DB2 VERSION 11                        STATUS   = NOSTART 
DBCGMSTR   DB2 VERSION 12                        STATUS   = UP      
     DLF   Z/OS DATA LOOKASIDE FACILITY          STATUS   = UP      
  HTTPD1   Z/OS HTTP SERVER                      STATUS   = NOSTART 
 HZSPROC   Z/OS HEALTH CHECKER                   STATUS   = UP      
IMS14CR1   IMS VERSION 14                        STATUS   = NOSTART 
IMS14RL1   IMS VERSION 14 IRLM                   STATUS   = NOSTART
IMS15CR1   IMS VERSION 15                        STATUS   = NOSTART
IMS15RL1   IMS VERSION 15 IRLM                   STATUS   = NOSTART
 IZUANG1   Z/OSMF ANGEL SERVICE                  STATUS   = NOSTART
 IZUSVR1   Z/OSMF SERVER                         STATUS   = NOSTART
    JES2   Z/OS JOB ENTRY SUBSYSTEM              STATUS   = UP     
    JMON   Z/OS EXPLOROR JES MONITOR             STATUS   = NOSTART
     LLA   Z/OS LIBRARY LOOKASIDE                STATUS   = UP     
     MVS   MVS DUMMY TASK                        STATUS   = UP     
    NFSS   Z/OS NFS SERVER                       STATUS   = NOSTART
    SSHD   TCP/IP SSH SERVER                     STATUS   = COMPLET
    OMVS   Z/OS OPEN MVS SERVER                  STATUS   = UP     
     RRS   Z/OS RECOVERY SERVICES                STATUS   = UP     
    RSED   Z/OS EXPLORER SERVER                  STATUS   = NOSTART
    SDSF   Z/OS SYSTEM DISPLAY/SEARCH            STATUS   = UP     
   TCPIP   Z/OS TCPIP SERVER                     STATUS   = UP     
  TN3270   TELNET 3270 SERVER                    STATUS   = UP     
     TSO   TIME SHARING OPTION                   STATUS   = UP     
     VLF   Z/OS VIRUTAL LOOKASIDE                STATUS   = UP     
    VTAM   VIRTUAL TELCOM ACCESS METHOD          STATUS   = UP     
 ZOSCSRV   Z/OS CONNECT SERVER                   STATUS   = NOSTART    
```

手動で各タスクを起動/停止させるためのREXXも用意されています。(STRTTASK, STOPTASK)

参考:
<details><summary><font color="blue">NETVIEW.CNM01.CNMCLST(GETSTAT)</font></summary><div>

```xxx:NETVIEW.CNM01.CNMCLST(GETSTAT)
/* REXX */
/* LICENSED MATERIAL - PROPERTY OF IBM                                     */
/*  C) COPYRIGHT IBM CORP. 2019,2020 - ALL RIGHTS RESERVED.                */
/*  US GOVERNMENT USERS RESTRICTED RIGHTS - USE, DUPLICATION OR DISCLOSURE */
/*  RESTRICTED BY GSA ADP SCHEDULE CONTRACT WITH IBM CORP.                 */


  SYSSTR = 'SY'||SUBSTR(DOMAIN(),LENGTH(DOMAIN()),1)

  ARG TASKNAME DETLEV
  IF DETLEV = '' THEN DETLEV = 'DETAIL'
  IF TASKNAME = 'ALL' | TASKNAME = '' THEN SIGNAL GETALL

  'GLOBALV GETC 'TASKNAME

  TASKNO = VALUE(TASKNAME)

  VARNAME = SYSSTR||'TASK.'||TASKNO
  'GLOBALV GETC 'VARNAME

  IF VALUE(VARNAME) ^= TASKNAME THEN
  DO
    SAY "SEVERE ERROR IN VARIABLE VALUES OR TASK NOT FOUND.. EXITING"
    EXIT
  END

  VARNAM1 = SYSSTR||'STAT.'TASKNO

  'GLOBALV GETC 'VARNAM1

  SAY TASKNAME' STATUS        = 'VALUE(VARNAM1)

RETURN VALUE(VARNAM1)

GETALL:


  VARNAME = SYSSTR||'TASKS'
  'GLOBALV GETC 'VARNAME

  TASKNO = VALUE(VARNAME)

  DO LP = 1 TO TASKNO

    VARNAME = SYSSTR||'TASK.'||LP
    'GLOBALV GETC 'VARNAME
    TASKNAME = VALUE(VARNAME)
    VARNAME = SYSSTR||'DESC.'||LP
    'GLOBALV GETC 'VARNAME
    TASKDESC = VALUE(VARNAME)

    VARNAM1 = SYSSTR||'STAT.'LP

    'GLOBALV GETC 'VARNAM1

    TASKNAME = RIGHT(TASKNAME,8,' ')

    SPCS = '                                    '
    TASKDESC = TASKDESC||SUBSTR(SPCS,1,LENGTH(SPCS)-LENGTH(TASKDESC))
    IF DETLEV = 'DETAIL' THEN
    DO
      IF LP = 1 THEN
      DO
        SAY '  '
        SAY 'TASKNAME   DESCRIPTION                          ',
        '    CURRENT STATUS'
        SAY '-------------------------------------------------------',
        ||'------------'
      END
      SAY TASKNAME'   'TASKDESC'  STATUS   = 'VALUE(VARNAM1)
    END
    ELSE
      SAY TASKNAME'   STATUS = 'VALUE(VARNAM1)
  END
EXIT
```

</div></details>

<details><summary><font color="blue">NETVIEW.CNM01.CNMCLST(STRTTASK)</font></summary><div>

```xxx:NETVIEW.CNM01.CNMCLST(STRTTASK)
/* REXX */
/* LICENSED MATERIAL - PROPERTY OF IBM                                     */
/*  C) COPYRIGHT IBM CORP. 2019,2020 - ALL RIGHTS RESERVED.                */
/*  US GOVERNMENT USERS RESTRICTED RIGHTS - USE, DUPLICATION OR DISCLOSURE */
/*  RESTRICTED BY GSA ADP SCHEDULE CONTRACT WITH IBM CORP.                 */

  SYSSTR = 'SY'||SUBSTR(DOMAIN(),LENGTH(DOMAIN()),1)

  ARG TASKNAME ATTEMPT
  IF ATTEMPT = 2 THEN SAY 'SECOND ATTEMPT'
  IF TASKNAME = '' THEN EXIT

  CALL GETPARN TASKNAME
  PARCHEK = RESULT

  IF PARCHEK = 'UP' THEN
  DO
    'GLOBALV GETC 'TASKNAME
    TASKNO = VALUE(TASKNAME)
    TASKNAME = SYSSTR||'TASK.'TASKNO
    TASKSTAT = SYSSTR||'STAT.'TASKNO
    TASKSTRT = SYSSTR||'STRT.'TASKNO

    'GLOBALV GETC 'TASKNAME TASKSTAT TASKSTRT
    TASKNAME = VALUE(TASKNAME)
    TASKSTAT = VALUE(TASKSTAT)
    TASKSTRT = VALUE(TASKSTRT)

    IF TASKSTAT <> 'UP' & TASKSTAT <> 'STARTING' &,
      TASKSTAT <> 'COMPLETE' THEN
    DO
      CALL SETSTAT TASKNAME STARTING
      SAY 'STARTING 'TASKNAME
      TASKSTRT
    END
  END
  ELSE
  DO
    IF ATTEMPT <> 2 THEN
    DO
      SAY 'DEPENDENT TASKS ARE NOT UP FOR 'TASKNAME
      SAY 'ATTEMPTING TO START DEPENDENT TASKS'
      CALL STRTPARN TASKNAME
      'AFTER 00:00:30,ROUTE=AUTO2,ID=TASKNAME,STRTTASK 'TASKNAME '2'
    END
    ELSE
    DO
      SAY 'DEPENDENT TASKS ARE NOT UP FOR 'TASKNAME
      SAY 'AUTOMATED ATTEMPT FAILED TO BRING UP DEPENDENT TASKS'
      SAY 'MANUAL ACTIONS REQUIRED'
    END
  END

EXIT
```

</div></details>

<details><summary><font color="blue">NETVIEW.CNM01.CNMCLST(STOPTASK)</font></summary><div>

```xxx:NETVIEW.CNM01.CNMCLST(STOPTASK)
/* REXX */
/* LICENSED MATERIAL - PROPERTY OF IBM                                     */
/*  C) COPYRIGHT IBM CORP. 2019,2020 - ALL RIGHTS RESERVED.                */
/*  US GOVERNMENT USERS RESTRICTED RIGHTS - USE, DUPLICATION OR DISCLOSURE */
/*  RESTRICTED BY GSA ADP SCHEDULE CONTRACT WITH IBM CORP.                 */

  ARG TASKNAME
  IF TASKNAME = '' THEN EXIT

  SYSSTR = 'SY'||SUBSTR(DOMAIN(),LENGTH(DOMAIN()),1)

  'GLOBALV GETC 'TASKNAME
  TASKNO = VALUE(TASKNAME)

  TASKNAME = SYSSTR||'TASK.'TASKNO
  TASKSTAT = SYSSTR||'STAT.'TASKNO
  TASKSTOP = SYSSTR||'STOP.'TASKNO

  'GLOBALV GETC 'TASKNAME TASKSTAT TASKSTOP
  TASKNAME = VALUE(TASKNAME)
  TASKSTAT = VALUE(TASKSTAT)
  TASKSTOP = VALUE(TASKSTOP)

  IF TASKSTAT = 'COMPLETE' THEN
    CALL SETSTAT TASKNAME DOWN
  ELSE
    CALL SETSTAT TASKNAME STOPPING
  SAY 'SHUTTING DOWN 'TASKNAME
  ADDRESS NETVASIS TASKSTOP


EXIT
```

</div></details>


# Netviewで起動されるサブシステム

Netviewから起動されるサブシステムについていくつか主要な所を見ていきます。

## JES2

JES2の起動コマンドとしてはNETVIEW.CNM01.CNMCLST(GLBCNM01)にて以下のように登録されています。
`INTERPRET SYSSTR||STRT.X ' = "MVS S JES2,SUB=MSTR,PARM=&JES2STR_"'`

`$JES2STR_`はFEU.Z24A.PARMLIB(IEASYM00)に以下のように定義されています。
`SYMDEF(&JES2STR_='(COLD,NOREQ)')`

つまりコールドスタートされることが分かります。
JES2の起動プロシージャーは以下の通りです。

```xxx:ADCD.Z24A.PROCLIB(JES2)
//JES2      PROC MEMBER=JES2PARM,ALTMEM=JES2BACK                 
//IEFPROC   EXEC PGM=HASJES20,DPRTY=(15,15),TIME=1440,PERFORM=9  
//ALTPARM   DD   DSN=ADCD.&SYSVER..PARMLIB(&ALTMEM),DISP=SHR     
//HASPPARM  DD   DSN=ADCD.&SYSVER..PARMLIB(&MEMBER),DISP=SHR     
//PROC00    DD   DSN=USER.&SYSVER..PROCLIB,DISP=SHR              
//          DD   DSN=FEU.&SYSVER..PROCLIB,DISP=SHR               
//          DD   DSN=ADCD.&SYSVER..PROCLIB,DISP=SHR              
//          DD   DSN=SYS1.PROCLIB,DISP=SHR                       
//HASPLIST  DD   DDNAME=IEFRDER                                  
```


## VTAM

VTAM起動コマンド
`INTERPRET SYSSTR||STRT.X ' = "MVS S VTAM"'`

VTAM起動プロシージャー

```xxx:ADCD.Z24A.PROCLIB(VTAM)
//VTAM   PROC
//*
//VTAM     EXEC PGM=ISTINM01,REGION=0M,
//         DPRTY=(15,15),TIME=1440,PERFORM=8
//VTAMLST  DD DISP=SHR,
//            DSN=USER.&SYSVER..VTAMLST
//         DD DISP=SHR,
//            DSN=FEU.&SYSVER..VTAMLST
//         DD DISP=SHR,
//            DSN=ADCD.&SYSVER..VTAMLST
//         DD DISP=SHR,
//            DSN=SYS1.VTAMLST
//VTAMLIB  DD DISP=SHR,
//            DSN=USER.&SYSVER..VTAMLIB
//         DD DISP=SHR,
//            DSN=FEU.&SYSVER..VTAMLIB
//         DD DISP=SHR,
//            DSN=ADCD.&SYSVER..VTAMLIB
//         DD DISP=SHR,
//            DSN=SYS1.VTAMLIB
//         DD DISP=SHR,
//            DSN=NET621.SCNMLNK1
//SISTCLIB DD DISP=SHR,
//            DSN=SYS1.SISTCLIB
//SYSABEND DD SYSOUT=*,HOLD=YES
//DSDBCTRL DD DSN=SYS1.DSDBCTRL,DISP=SHR
//DSDB1    DD DSN=SYS1.DSDB1,DISP=SHR
//DSDB2    DD DSN=SYS1.DSDB2,DISP=SHR
//TRSDB    DD DSN=SYS1.TRSDB,DISP=SHR
```

始動オプション

```xxx:ADCD.Z24A.VTAMLST(ATCSTR00)
CONFIG=00,SUPP=NOSUP,                                                  X
SSCPID=06,NOPROMPT,                                                    X
HOSTSA=6,MAXSUBA=31,                                                   X
SSCPNAME=ADCDSSCP,HOSTPU=ADCD$PUC,                                     X
NETID=NETD,                                                            X
NODETYPE=NN,                                                           X
DYNLU=YES,                                                             X
CRPLBUF=(208,,15,,1,16),                                               X
IOBUF=(400,508,19,,1,20),                                              X
LFBUF=(104,,0,,1,1),                                                   X
LPBUF=(64,,0,,1,1),                                                    X
SFBUF=(163,,0,,1,1)                                                     
```

構成リスト

```xxx:ADCD.Z24A.VTAMLST(ATCCON00)
A0600,NSNA70X,DYNMODEL,COSAPPN,                                        *
A0TCP,OSATRL2,TCP,A01APPLS,                                            *
IMS15APL,IMS14APL,CICSAPPL,DBCGLU,DBBGLU                                
```

TRL Major Node

```
OSATRL1 VBUILD TYPE=TRL                                                 
OSATRL1E TRLE LNCTL=MPC,READ=(0400),WRITE=(0401),DATAPATH=(0402),      X
               PORTNAME=PORTA,                                         X
               MPCLEVEL=QDIO                                            
OSATRL2E TRLE LNCTL=MPC,READ=(0404),WRITE=(0405),DATAPATH=(0406),      X
               PORTNAME=PORTB,                                         X
               MPCLEVEL=QDIO                                            
```

## TCPIP
TCPIP起動コマンド
`INTERPRET SYSSTR||STRT.X ' = "MVS S TCPIP"'`

起動プロシージャー

```xxx:ADCD.Z24A.PROCLIB(TCPIP)
//TCPIP    PROC PARMS='CTRACE(CTIEZB00)'                                00010000
//*                                                                     00110000
//TCPIP    EXEC PGM=EZBTCPIP,REGION=0M,TIME=1440,                       00120000
//             PARM='&PARMS'                                            00130000
//STEPLIB  DD DSN=USER.&SYSVER..VTAMLIB,DISP=SHR                        021000
//         DD DSN=ADCD.&SYSVER..VTAMLIB,DISP=SHR                        021000
//*                                                                     00220000
//SYSPRINT DD SYSOUT=H,DCB=(RECFM=VB,LRECL=132,BLKSIZE=136)             00410000
//ALGPRINT DD SYSOUT=*,DCB=(RECFM=VB,LRECL=132,BLKSIZE=136)             00420000
//CFGPRINT DD SYSOUT=*,DCB=(RECFM=VB,LRECL=132,BLKSIZE=136)             00430000
//SYSOUT   DD SYSOUT=H,DCB=(RECFM=VB,LRECL=132,BLKSIZE=136)             00440000
//CEEDUMP  DD SYSOUT=*,DCB=(RECFM=VB,LRECL=132,BLKSIZE=136)             00450000
//SYSERROR DD SYSOUT=*                                                  00460000
//*                                                                     00690000
//PROFILE  DD DISP=SHR,DSN=ADCD.&SYSVER..TCPPARMS(PROF2)
//*                                                                     00820000
//SYSTCPD  DD DSN=ADCD.&SYSVER..TCPPARMS(TCPDATA),DISP=SHR                 008
```

プロファイル

```xxx:ADCD.Z24A.TCPPARMS(PROF2)
ARPAGE 5
DATASETPREFIX TCPIP
AUTOLOG 5
;   FTPD JOBNAME FTPD1   ; FTP Server
    PAGENT               ; Policy Agent Server
    PORTMAP              ; Portmap Server
ENDAUTOLOG
PORT
     7 UDP MISCSERV            ; Miscellaneous Server
     7 TCP MISCSERV
     9 UDP MISCSERV
     9 TCP MISCSERV
    19 UDP MISCSERV
    19 TCP MISCSERV
    20 TCP OMVS      NOAUTOLOG ; FTP Server
    21 TCP OMVS                ; FTP Server
    22 TCP SSHD*               ; port for sshd daemonrver
;   23 TCP TN3270              ; Telnet Server
; ADCD - Port  23 and 2023 for TN3270
    23 TCP TN3270              ; Telnet 3270 Server
  2023 TCP TN3270              ; Telnet 3270 Server SSL/TLS
    25 TCP SMTP                ; SMTP Server
    53 TCP NAMESRV             ; Domain Name Server
    53 UDP NAMESRV             ; Domain Name Server
    69 UDP OMVS                ; OE TFTP SERVER
    80 TCP OMVS                ; OE WEB SERVER
   111 TCP PORTMAP             ; Portmap Server
   111 UDP PORTMAP             ; Portmap Server
   135 UDP LLBD                ; NCS Location Broker
   161 UDP OSNMPD              ; SNMP Agent
   162 UDP SNMPQE              ; SNMP Query Engine
   433 TCP OMVS                ; OE WEB Server
   443 TCP OMVS                ; Secure Server
   512 TCP RXSERVE             ; Remote Execution Server
   513 UDP OMVS                ; OE RLOGIN SERVER
   514 UDP OMVS                ; OE syslog server
   514 TCP RXSERVE             ; Remote Execution Server
   515 TCP LPSERVE             ; LPD Server
   520 UDP OROUTED             ; RouteD Server
   580 UDP NCPROUT             ; NCPROUTE Server
   750 TCP MVSKERB             ; Kerberos
   750 UDP MVSKERB             ; Kerberos
   751 TCP ADM@SRV             ; Kerberos Admin Server
   751 UDP ADM@SRV             ; Kerberos Admin Server
;  1021 TCP OMVS                ; OE FTP SERVER
   1023 TCP OMVS                ; OE TELNET SERVER
   1023 UDP OMVS                ; OE TELNET SERVER
   1024 TCP OMVS                ; OE SERVICES
   1416 TCP CSQ9CHIN            ; CSQ9 MQ TCP Listener
   3000 TCP CICSTS53            ; CICS 5.3 Socket
   3001 TCP CICSTS52            ; CICS 5.2 Socket
   3002 TCP CICSTS51            ; CICS 5.1 Socket
   3003 TCP CICSTS42            ; CICS 4.2 Socket
   3004 TCP CICSTS41            ; CICS 4.1 Socket
   32200 TCP BBN7ACRS             ; Daemon IP port
   32201 TCP BBN7ACRS NODELAYACKS ; Daemon SSL port
   32202 TCP BBNS001            ; SOAP JMX Connector port
   32203 TCP BBNS001            ; ORB port
   32204 TCP BBNS001 NODELAYACKS ; ORB SSL port
   32205 TCP BBNS001             ; Administrative console port
   32206 TCP BBNS001 NODELAYACKS ; Administrative console secure port
   32207 TCP BBNS001             ; HTTP transport port
   32208 TCP BBNS001 NODELAYACKS ; HTTPS transport port
   32209 TCP BBNS001             ; Administrative Local Port
   32210 TCP BBNS001             ; High availability manager comm port
   32211 TCP BBNS001             ; Service Integration port
   32212 TCP BBNS001 NODELAYACKS ; Service Integration secure port
   32213 TCP BBNS001S            ; Service Integration MQ interoper
   32214 TCP BBNS001S NODELAYACKS ; Service Integration MQ inter secure
   32215 TCP BBNS001            ; Session Initiation Protocol (SIP)
   32216 TCP BBNS001 NODELAYACKS ; Session Init Protocol (SIP) secure
; ADCD - Port 16310 Policy Agent
  16310 TCP PAGENT NOAUTOLOG    ; Policy Agent server listener port
;
SACONFIG DISABLED
;This device defines the tunnel
DEVICE PORTA  MPCIPA
LINK ETH1  IPAQENET PORTA
HOME 172.26.1.2 ETH1
; This second device is optional
DEVICE PORTB    MPCIPA
LINK ETH2 IPAQENET  PORTB
;HOME 192.168.0.61   ETH2
HOME 10.132.233.243  ETH2
BEGINRoutes
;     Destination   SubnetMask    FirstHop       LinkName  Size
;ROUTE 192.168.0.0 255.255.255.0       =        ETH2 MTU 1492
ROUTE 10.132.233.192 255.255.255.192   =        ETH2 MTU 1492
;ROUTE 10.0.0.0    255.0.0.0           =        ETH1 MTU 1492
ROUTE DEFAULT                     172.26.1.1     ETH1 MTU 1492
ENDRoutes
ITRACE OFF
IPCONFIG NODATAGRAMFWD
UDPCONFIG RESTRICTLOWPORTS
TCPCONFIG RESTRICTLOWPORTS
TCPCONFIG TTLS
START PORTA
START PORTB
```

TCPDATA

```xxx:ADCD.Z24A.TCPPARMS(TCPDATA)
TCPIPJOBNAME TCPIP
S0W1:   HOSTNAME   S0W1
DOMAINORIGIN  DAL-EBIS.IHOST.COM
DATASETPREFIX TCPIP
NSPORTADDR 53
RESOLVEVIA UDP
RESOLVERTIMEOUT 30
RESOLVERUDPRETRIES 1
ALWAYSWTO NO
```

RESOLVER

```xxx:ADCD.Z24A.PROCLIB(RESOLVER)
//*                                                                  
//* TCPIP RESOLVER                                                   
//*                                                                  
//RESOLVER PROC PARMS=CTRACE(CTIRES00)                               
//*                                                                  
//EZBREINI EXEC PGM=EZBREINI,REGION=0M,TIME=1440,                    
// PARM=&PARMS                                                       
//SETUP DD DISP=SHR,DSN=ADCD.&SYSVER..TCPPARMS(GBLRESOL),FREE=CLOSE  
//*                                                                  
```

```xxx:ADCD.Z24A.TCPPARMS(GBLRESOL)
  DEFAULTTCPIPDATA('ADCD.Z24A.TCPPARMS(GBLTDATA)')                    
  GLOBALTCPIPDATA(/etc/resolv.conf)                                   
# -----------------------------------------------------------------   
#                   UnComment the line below to go back               
# -----------------------------------------------------------------   
  GLOBALIPNODES(/etc/hosts)                                           
# -----------------------------------------------------------------   
#                   UnComment the line below to go back               
# -----------------------------------------------------------------   
  DEFAULTIPNODES('ADCD.Z24A.TCPPARMS(GBLIPNOD)')                      
  COMMONSEARCH                                                        
  CACHE                                                               
  CACHESIZE(200M)                                                     
  MAXTTL(2147483647)                                                  
  UNRESPONSIVETHRESHOLD(25)                                           
```

```xxx:ADCD.Z24A.TCPPARMS(GBLTDATA)
TCPIPJOBNAME TCPIP
S0W1:   HOSTNAME   S0W1
DOMAINORIGIN  DAL-EBIS.IHOST.COM
DATASETPREFIX TCPIP
NSPORTADDR 53
RESOLVEVIA UDP
RESOLVERTIMEOUT 30
RESOLVERUDPRETRIES 1
ALWAYSWTO NO
```

```xxx:/etc/resolv.conf
nameserver 10.0.80.11
nameserver 10.0.80.12
options single-request-reopen
```

```xxx:ADCD.Z24A.TCPPARMS(GBLIPNOD)
10.1.1.2 S0W1.DAL-EBIS.IHOST.COM S0W1
```

```xxx:/etc/hosts
127.0.0.1 S0W1
127.0.0.1 localhost.localdomain localhost
xxx.xxx.xxx.xxx zdt02.ibmj-cloud-freeusage-p052.cloud zdt02
10.132.233.242 zdt01
```

※IPアドレス部分は一部xxxでマスキングしています。


# Netviewによるサブシステム停止の制御

Netveiwでは各サブシステムの起動だけでなく停止も制御できるようになっています。停止用にはSHUTSYSというREXXが用意されており、`F CNMPROC,SHUTSYS`でVTAMやJES2などNetview管理のサブシステムをまとめて停止させることができます。

<details><summary><font color="blue">NETVIEW.CNM01.CNMCLST(SHUTSYS)</font></summary><div>

```xxx:NETVIEW.CNM01.CNMCLST(SHUTSYS)
/* REXX */
/* LICENSED MATERIAL - PROPERTY OF IBM                                     */
/*  C) COPYRIGHT IBM CORP. 2019,2020 - ALL RIGHTS RESERVED.                */
/*  US GOVERNMENT USERS RESTRICTED RIGHTS - USE, DUPLICATION OR DISCLOSURE */
/*  RESTRICTED BY GSA ADP SCHEDULE CONTRACT WITH IBM CORP.                 */

  ARG TYPE
  IF TYPE = '' THEN TYPE = 'INITIAL'

  SYSSTR = 'SY'||SUBSTR(DOMAIN(),LENGTH(DOMAIN()),1)

  VARNAME = SYSSTR||'TASKS'
  'GLOBALV GETC 'VARNAME
  TOT_TASKS = VALUE(VARNAME)

  IF TYPE = 'INITIAL' THEN
  CALL PRESHUT

  DO TASKNO = 1 TO TOT_TASKS

    TASKNAME = SYSSTR||'TASK.'TASKNO
    TASKSTAT = SYSSTR||'STAT.'TASKNO
    TASKSTOP = SYSSTR||'STOP.'TASKNO

    'GLOBALV GETC 'TASKNAME TASKSTAT TASKSTOP
    TASKNAME = VALUE(TASKNAME)
    TASKSTAT = VALUE(TASKSTAT)
    TASKSTOP = VALUE(TASKSTOP)

    IF TASKSTAT = 'DOWN' | TASKSTAT = 'NOSTART' |,
      TASKSTAT = 'COMPLETE' THEN ITERATE

    IF TASKSTAT = 'UP' THEN
    DO
      CALL GETCHILD TASKNAME
      RETPARMS = RESULT
      PARSE VAR RETPARMS CHLDCHEK DEPTASKS
      IF CHLDCHEK = 'NO' THEN
      DO
        IF TASKNAME = 'MVS' THEN TASKREMAIN = 'NO'
        IF TASKSTAT ^= 'STOPPING' THEN
        DO
          IF TASKNAME = 'JES2' THEN
            'AFTER 00:00:20,ROUTE=AUTO2,ID=KILLJES,KILLJES'
          WTO "NETVIEW SYSTEM SHUTDOWN IS STOPPING: "TASKNAME
          CALL SETSTAT TASKNAME STOPPING
          TASKSTOP
        END
      END
    END
  END

  IF TASKREMAIN = 'NO' THEN SIGNAL ALLDONE
  'AFTER 00:00:05,ROUTE=AUTO2,ID=RESUMESH,SHUTSYS REDO'
  'AFTER 00:00:30,ROUTE=AUTO1,ID=SHTSTAT,DSPSTAT'

EXIT

ALLDONE:

  'MVS #STOP'
  'MVS P CNMPSSI'
  'MVS Z EOD'
  WTO.DESC = '0100010000000000'
  WTO.MCSFLAG  = '00000000'
  WTO '************************'
  WTO '************************'
  WTO 'SYSTEM SHUTDOWN COMPLETE'
  WTO '************************'
  WTO '************************'
  CLOSE IMMED

EXIT
```

</div></details>


処理内容を少し補足すると、このREXXではざっくり以下のような処理を行っています。

- Pre Shudown処理として、「D A,L」の結果からJもしくはJO表記のJOBのキャンセル、イニシエーター、HZSPROC、SSHDなどの停止を行う(PRESHUT/PRESHUTJ)
- 登録されているタスクで"UP"状態のものについてそれぞれ以下を実施。
    - 当該タスクと依存関係のある子タスクが稼働しているかチェックし(`CALL GETCHILD TASKNAME`)、稼働しる場合は何もしない
    - 子タスクが稼働していなければステータスを"STOPPING"に変更し(`CALL SETSTAT TASKNAME STOPPING`)、停止コマンドを実行(`TASKSTOP`)
    - JES2の場合20分後にキャンセル(`'AFTER 00:00:20,ROUTE=AUTO2,ID=KILLJES,KILLJES'`)
- 全てのタスクが稼働するまで、自分自身を5秒後に再起動する処理を繰り返す(`'AFTER 00:00:05,ROUTE=AUTO2,ID=RESUMESH,SHUTSYS REDO'`)
- 最後にNetview終了などの後処理実施

参考: 
<details><summary><font color="blue">NETVIEW.CNM01.CNMCLST(PRESHUT)</font></summary><div>

```xxx:NETVIEW.CNM01.CNMCLST(PRESHUT)
/* REXX */
/* LICENSED MATERIAL - PROPERTY OF IBM                                     */
/*  C) COPYRIGHT IBM CORP. 2019,2020 - ALL RIGHTS RESERVED.                */
/*  US GOVERNMENT USERS RESTRICTED RIGHTS - USE, DUPLICATION OR DISCLOSURE */
/*  RESTRICTED BY GSA ADP SCHEDULE CONTRACT WITH IBM CORP.                 */

  'PRESHUTJ'
  'MVS $PI'
  'MVS P GTZ'
  'MVS P DBBGADMT'
  'MVS P DBCGADMT'
  'MVS P HZSPROC'
  'MVS F DLF,MODE=Q'
  'MVS C SSHD3'
  'MVS F AXR,SYSREXX STOPTSO'
  'MVS $PLNE(*)'
  'MVS $PI(*)'
  CALL SETSTAT SSHD DOWN

EXIT
```

</div></details>


<details><summary><font color="blue">NETVIEW.CNM01.CNMCLST(PRESHUTJ)</font></summary><div>

```xxx:NETVIEW.CNM01.CNMCLST(PRESHUTJ)
/* REXX */
/* LICENSED MATERIAL - PROPERTY OF IBM                                     */
/*  C) COPYRIGHT IBM CORP. 2019,2020 - ALL RIGHTS RESERVED.                */
/*  US GOVERNMENT USERS RESTRICTED RIGHTS - USE, DUPLICATION OR DISCLOSURE */
/*  RESTRICTED BY GSA ADP SCHEDULE CONTRACT WITH IBM CORP.                 */

'TRAP AND SUPPRESS MESSAGES CNZ4105I'
'MVS D A,L'
'WAIT 5 SECONDS FOR MESSAGES'

XP = 0
YP = 0

SELECT
  WHEN EVENT() = 'M' THEN
  DO
     'MSGREAD'
     DO LP = 1 TO 200
       XP = XP + 1
       'GETMLINE LINE' XP
       IF RC <> 0 THEN LEAVE
       PARSE VAR LINE 1 TASK1 10 J1 34 J1T 36 J2 37 TASK2 45 J3 69 J2T 71 J4
       IF SUBSTR(TASK1,1,3) = "IMS" THEN ITERATE LP
       IF SUBSTR(TASK2,1,3) = "IMS" THEN ITERATE LP
       IF J1T = 'J' | J1T = 'JO' THEN
       DO
         YP = YP + 1
         TASK.YP = TASK1
       END
       IF J2T = 'J' | J2T = 'JO' THEN
       DO
         YP = YP + 1
         TASK.YP = TASK2
       END
     END
  END
  OTHERWISE
END

'TRAP NO MESSAGES'
'FLUSHQ'

DO LP = 1 TO YP

  SAY 'ATTEMPTING TO CANCEL JOB: 'TASK.LP
  'MVS CANCEL 'TASK.LP
END

EXIT
```

</div></details>


<details><summary><font color="blue">NETVIEW.CNM01.CNMCLST(GETCHILD)</font></summary><div>

```xxx:NETVIEW.CNM01.CNMCLST(GETCHILD)
/* REXX */
/* LICENSED MATERIAL - PROPERTY OF IBM                                     */
/*  C) COPYRIGHT IBM CORP. 2019,2020 - ALL RIGHTS RESERVED.                */
/*  US GOVERNMENT USERS RESTRICTED RIGHTS - USE, DUPLICATION OR DISCLOSURE */
/*  RESTRICTED BY GSA ADP SCHEDULE CONTRACT WITH IBM CORP.                 */

ARG PARENT DEBUG

SYSSTR = 'SY'||SUBSTR(DOMAIN(),LENGTH(DOMAIN()),1)

VARNAME = SYSSTR||'TASKS'
'GLOBALV GETC 'VARNAME
TOT_TASKS = VALUE(VARNAME)

DEPCHEK = 'NO'
DEPTASKS = ''

DO TASKNO = 1 TO TOT_TASKS

  TASKNAME = SYSSTR||'TASK.'TASKNO
  TASKSTAT = SYSSTR||'STAT.'TASKNO
  TASKPARN = SYSSTR||'PARN.'TASKNO

  'GLOBALV GETC 'TASKNAME TASKSTAT TASKPARN
  TASKNAME = VALUE(TASKNAME)
  TASKSTAT = VALUE(TASKSTAT)
  TASKPARN = VALUE(TASKPARN)

  PARSE VAR TASKPARN TASKPAR1","TASKPAR2","TASKPAR3
  IF PARENT = TASKPAR1 | PARENT = TASKPAR2 | PARENT = TASKPAR3 THEN
  DO
    IF DEBUG <> '' THEN SAY TASKNAME
    IF TASKSTAT = 'UP' | TASKSTAT = 'STOPPING' THEN
    DO
      DEPTASKS = DEPTASKS" "TASKNAME" "TASKSTAT
      DEPCHEK = 'YES'
    END
  END
END

RETURN DEPCHEK DEPTASKS
```

</div></details>



<details><summary><font color="blue">NETVIEW.CNM01.CNMCLST(KILLJES)</font></summary><div>

```xxx:NETVIEW.CNM01.CNMCLST(KILLJES)
/* REXX */
/* LICENSED MATERIAL - PROPERTY OF IBM                                     */
/*  C) COPYRIGHT IBM CORP. 2019,2020 - ALL RIGHTS RESERVED.                */
/*  US GOVERNMENT USERS RESTRICTED RIGHTS - USE, DUPLICATION OR DISCLOSURE */
/*  RESTRICTED BY GSA ADP SCHEDULE CONTRACT WITH IBM CORP.                 */

/* CHECK WHAT IS HOLDING UP JES2 SHUTDOWN AND KILL IT */
/* IF YOU RUN THIS EXEC IT WILL CANCEL EVERY JOB OR TASK */
/* THAT IS RUNNING UNDER JES2 .. WHICH IS ALMOST EVERYTHING */

  'TRAP AND SUPPRESS MESSAGES $HASP608'
  'MVS $DJES2'
  'WAIT 3 SECONDS FOR MESSAGES'
  LP = 1

  SELECT
    WHEN EVENT() = 'M' THEN
    DO
       'MSGREAD'
       DO WHILE RC = 0
         'GETMLINE LINE' LP
         IF RC ^= 0 THEN SIGNAL DONE
         LP = LP + 1
         IF LINE = '$HASP608 ALL AVAILABLE FUNCTIONS COMPLETE' THEN
           SIGNAL DONE
         PARSE VAR LINE V1 V2 V3 V4 .
         IF V4 = 'JOBID' & V3 'JOBNAME' THEN ITERATE LP
         JESTYPE = SUBSTR(V4,1,3)
         IF JESTYPE  = 'STC' | JESTYPE = 'JOB' | JESTYPE = 'TSU' THEN
         DO
           SAY V3"-"V2" HOLDING UP JES2 SHUTDOWN."
           SAY "ATTEMPTING CANCEL"
           'MVS CANCEL 'V3',A='V2
         END
       END
     END
     OTHERWISE NOP
  END

  DONE:
  'TRAP NO MESSAGES'
  'FLUSHQ'

EXIT
```

</div></details>


このように、シャットダウンしたい場合は`F CNMPROC,SHUTSYS`を実行してしばらく待てば一通りアドレススペースが終了してくれるので、全て停止されたらLinux上で`awsstop`コマンドでZD&Tを停止させればOKです。