SMP/E Installation of Rocket z/OS Ported Tools file1 SMP/E Installation of Rocket z/OS Ported Tools...
Transcript of SMP/E Installation of Rocket z/OS Ported Tools file1 SMP/E Installation of Rocket z/OS Ported Tools...
1
SMP/E Installation of Rocket z/OS Ported Tools
Description
Preface This document describes the steps needed to build and install a SMP/E installable software package for a typical Rocket z/OS Ported Tools product. The idea is to format all needed components with the SMP/E utility GIMDTS (normally contained in SYS1.MIGLIB) to create a sequential file (FB,80) which can be used as SMP/E SMPPTFIN input.
At this time only the first installation of any product is described. To update any product the required MCS statements (see Step 9) have to be modified to reflect FMID changes.
Naming Conventions HLQ for maintenance environment TST.RCT18A1
HLQ for maintenance environment (SMP/E datasets) TST.RCT18A1.SMPE
HLQ for maintenance environment (z/OS base) TST.ZOS16D1
Target Zone Name TRCK001
Dlib Zone Name DRCK001
Name of product ZFS file TST.RCT18A1.SYS1.SYX.RCTTOOLS.ZFS
Service mountpoint /tst/rct18a1/usr/lpp/rocket
Download directory /tst/software/Rocket/<product>/<product>-…
Used product in this description curl
Used FMID SCL7521 (curl-7.52.1_b006.170926.tar)
Default product directory /tst/rct18a1/usr/lpp/rocket/<product>/
Step 1: Create SMP/E Environment //*---------------------------------------------------------------------
//* Description: DEFINE CSI FOR PLATFORM RCT18A1 (Rocket Ported Tools)
//*---------------------------------------------------------------------
//DELCSI EXEC PGM=IDCAMS,REGION=64M,COND=(0,LT)
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DELETE TST.RCT18A1.SMPE.GLOBAL.CSI
DELETE TST.RCT18A1.SMPE.TARGET.CSI
2
DELETE TST.RCT18A1.SMPE.DLIB.CSI
SET MAXCC = 0
/*
//*
//DEFCSI EXEC PGM=IDCAMS,REGION=64M,COND=(0,LT)
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DEFINE CLUSTER(NAME(TST.RCT18A1.SMPE.GLOBAL.CSI) -
FREESPACE(10,5) -
KEYS(24 0) -
RECORDSIZE(24 143) -
SHAREOPTIONS(2) -
UNIQUE) -
DATA(NAME(TST.RCT18A1.SMPE.GLOBAL.CSI.DATA) -
CONTROLINTERVALSIZE(4096) -
CYLINDERS(10 2)) -
INDEX(NAME(TST.RCT18A1.SMPE.GLOBAL.CSI.INDEX) -
CYLINDERS(1 1))
DEFINE CLUSTER(NAME(TST.RCT18A1.SMPE.TARGET.CSI) -
FREESPACE(10,5) -
KEYS(24 0) -
RECORDSIZE(24 143) -
SHAREOPTIONS(2) -
UNIQUE) -
DATA(NAME(TST.RCT18A1.SMPE.TARGET.CSI.DATA) -
CONTROLINTERVALSIZE(4096) -
CYLINDERS(10 2)) -
INDEX(NAME(TST.RCT18A1.SMPE.TARGET.CSI.INDEX) -
CYLINDERS(1 1))
DEFINE CLUSTER(NAME(TST.RCT18A1.SMPE.DLIB.CSI) -
FREESPACE(10,5) -
KEYS(24 0) -
RECORDSIZE(24 143) -
SHAREOPTIONS(2) -
UNIQUE) -
DATA(NAME(TST.RCT18A1.SMPE.DLIB.CSI.DATA) -
CONTROLINTERVALSIZE(4096) -
3
CYLINDERS(10 2)) -
INDEX(NAME(TST.RCT18A1.SMPE.DLIB.CSI.INDEX) -
CYLINDERS(1 1))
/*
//*
//INITCSI EXEC PGM=IDCAMS,REGION=64M,COND=(0,LT)
//SYSPRINT DD SYSOUT=*
//ZPOOL DD DISP=SHR,
// DSN=SYS1.MACLIB(GIMZPOOL)
//SMPGCSI DD DISP=OLD,
// DSN=TST.RCT18A1.SMPE.GLOBAL.CSI
//SMPGCS1 DD DISP=OLD,
// DSN=TST.RCT18A1.SMPE.TARGET.CSI
//SMPGCS2 DD DISP=OLD,
// DSN=TST.RCT18A1.SMPE.DLIB.CSI
//SYSIN DD *
REPRO OUTFILE(SMPGCSI) INFILE(ZPOOL)
REPRO OUTFILE(SMPGCS1) INFILE(ZPOOL)
REPRO OUTFILE(SMPGCS2) INFILE(ZPOOL)
/*
//*
//DELPTS EXEC PGM=IDCAMS,REGION=64M,COND=(0,LT)
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DELETE TST.RCT18A1.SMPE.SMPPTS NONVSAM
SET MAXCC = 0
/*
//*
//DEFPTS EXEC PGM=IEFBR14,REGION=64M,COND=(0,LT)
//PTS DD DSN=TST.RCT18A1.SMPE.SMPPTS,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSALLDA,
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=0),
// SPACE=(CYL,(10,10,100))
//*
//DELLOG EXEC PGM=IDCAMS,REGION=64M,COND=(0,LT)
//SYSPRINT DD SYSOUT=*
4
//SYSIN DD *
DELETE TST.RCT18A1.SMPE.GLOBAL.SMPLOG NONVSAM
DELETE TST.RCT18A1.SMPE.TARGET.SMPLOG NONVSAM
DELETE TST.RCT18A1.SMPE.DLIB.SMPLOG NONVSAM
SET MAXCC = 0
/*
//*
//DEFLOG EXEC PGM=IEFBR14,REGION=64M,COND=(0,LT)
//GLOG DD DSN=TST.RCT18A1.SMPE.GLOBAL.SMPLOG,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSALLDA,
// SPACE=(TRK,(200,200))
//TLOG DD DSN=TST.RCT18A1.SMPE.TARGET.SMPLOG,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSALLDA,
// SPACE=(TRK,(200,200))
//DLOG DD DSN=TST.RCT18A1.SMPE.DLIB.SMPLOG,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSALLDA,
// SPACE=(TRK,(200,200))
//*
//GZONE EXEC PGM=GIMSMP,REGION=64M,COND=(0,LT)
//*
//* SMP DATA SETS
//*
//SMPCSI DD DSN=TST.RCT18A1.SMPE.GLOBAL.CSI,DISP=SHR
//SMPLOG DD DSN=TST.RCT18A1.SMPE.GLOBAL.SMPLOG,DISP=MOD
//SMPPTS DD DSN=TST.RCT18A1.SMPE.SMPPTS,DISP=SHR
//*
//* SMP OUTPUT
//*
//SMPOUT DD SYSOUT=*
//SMPRPT DD SYSOUT=*
//*
//* SMP INPUT
//*
//* PEMAX is not specified in case the maximum setting of 9999
5
//* is insufficient. The default is 25000.
//*
//SMPCNTL DD *
SET BOUNDARY(GLOBAL) .
UCLIN .
ADD GLOBALZONE
SREL(Z038) .
ADD UTILITY(ASMA90) NAME(ASMA90)
PARM(DECK,NOOBJECT,LIST,XREF(SHORT),ALIGN) .
ADD UTILITY(IEBCOPY) NAME(IEBCOPY) .
ADD UTILITY(IEWL) NAME(IEWL)
PARM(LIST,XREF,LET,NCAL) .
ADD DDDEF(SMPPTS) SHR
DA(TST.RCT18A1.SMPE.SMPPTS) .
ADD DDDEF(SMPLOG) MOD
DA(TST.RCT18A1.SMPE.GLOBAL.SMPLOG) .
ADD DDDEF(SMPTLIB)
UNIT(SYSALLDA) .
ADD GLOBALZONE
OPTIONS(RCKOPT) .
ADD GLOBALZONE
ZONEINDEX(
(TRCK001,TST.RCT18A1.SMPE.TARGET.CSI,TARGET),
(DRCK001,TST.RCT18A1.SMPE.DLIB.CSI,DLIB)
) .
ADD OPTIONS(RCKOPT)
ASM(ASMA90)
COMP(IEBCOPY)
COPY(IEBCOPY)
LKED(IEWL)
DSPREFIX(TST.RCT18A1.DF524109.IBM)
DSSPACE(1063,323,114)
NOREJECT
PAGELEN(60)
RETRYDDN(ALL) .
ADD DDDEF(SYSUT1) NEW DELETE UNIT(SYSALLDA)
TRK SPACE(1800,200) .
6
ADD DDDEF(SYSUT2) NEW DELETE UNIT(SYSALLDA)
TRK SPACE(900,300) .
ADD DDDEF(SYSUT3) NEW DELETE UNIT(SYSALLDA)
TRK SPACE(600,300) .
ADD DDDEF(SYSUT4) NEW DELETE UNIT(SYSALLDA)
TRK SPACE(600,300) .
ENDUCL .
/*
//*
//DELTARGD EXEC PGM=IDCAMS,REGION=64M,COND=(0,LT)
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DELETE TST.RCT18A1.SMPE.SMPSCDS NONVSAM
DELETE TST.RCT18A1.SMPE.SMPMTS NONVSAM
DELETE TST.RCT18A1.SMPE.SMPSTS NONVSAM
DELETE TST.RCT18A1.SMPE.SMPLTS NONVSAM
SET MAXCC = 0
/*
//DEFTARGD EXEC PGM=IEFBR14,REGION=64M,COND=(0,LT)
//SMPSCDS DD DSN=TST.RCT18A1.SMPE.SMPSCDS,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSALLDA,
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=0),
// SPACE=(CYL,(5,5,45))
//SMPMTS DD DSN=TST.RCT18A1.SMPE.SMPMTS,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSALLDA,
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=0),
// SPACE=(CYL,(5,5,45))
//SMPSTS DD DSN=TST.RCT18A1.SMPE.SMPSTS,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSALLDA,
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=0),
// SPACE=(CYL,(5,5,45))
//SMPLTS DD DSN=TST.RCT18A1.SMPE.SMPLTS,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSALLDA,
7
// DCB=(RECFM=U,LRECL=0,BLKSIZE=32760),
// SPACE=(CYL,(5,5,45))
//*
//TZONE EXEC PGM=GIMSMP,REGION=64M,COND=(0,LT)
//SMPCSI DD DSN=TST.RCT18A1.SMPE.GLOBAL.CSI,DISP=SHR
//SMPLOG DD DSN=TST.RCT18A1.SMPE.TARGET.SMPLOG,DISP=MOD
//SMPPTS DD DSN=TST.RCT18A1.SMPE.SMPPTS,DISP=SHR
//SMPOUT DD SYSOUT=*
//SMPRPT DD SYSOUT=*
//SMPCNTL DD *
SET BOUNDARY(TRCK001) .
UCLIN .
ADD TARGETZONE(TRCK001)
SREL(Z038)
RELATED(DRCK001)
OPTIONS(RCKOPT) .
ADD DDDEF(SMPLOG) MOD
DA(TST.RCT18A1.SMPE.TARGET.SMPLOG) .
ADD DDDEF(SMPSCDS) SHR
DA(TST.RCT18A1.SMPE.SMPSCDS) .
ADD DDDEF(SMPPTS) SHR
DA(TST.RCT18A1.SMPE.SMPPTS) .
ADD DDDEF(SMPMTS) SHR
DA(TST.RCT18A1.SMPE.SMPMTS) .
ADD DDDEF(SMPSTS) SHR
DA(TST.RCT18A1.SMPE.SMPSTS) .
ADD DDDEF(SMPTLIB)
UNIT(SYSALLDA) .
ADD DDDEF(SMPLTS) SHR
DA(TST.RCT18A1.SMPE.SMPLTS) .
ADD DDDEF(SYSUT1) NEW DELETE UNIT(SYSALLDA)
BLK(1700) SPACE(400,400) .
ADD DDDEF(SYSUT2) NEW DELETE UNIT(SYSALLDA)
BLK(1700) SPACE(400,400) .
ADD DDDEF(SYSUT3) NEW DELETE UNIT(SYSALLDA)
BLK(1700) SPACE(400,400) .
ADD DDDEF(SYSUT4) NEW DELETE UNIT(SYSALLDA)
8
BLK(1700) SPACE(400,400) .
ADD DDDEF(MACLIB) SHR
DA(TST.ZOS16D1.SYS1.MACLIB) .
ADD DDDEF(MODGEN) SHR
DA(TST.ZOS16D1.SYS1.MODGEN) .
ADD DDDEF(SYSLIB)
CONCAT(MACLIB,MODGEN) .
ENDUCL .
/*
//DZONE EXEC PGM=GIMSMP,REGION=64M,COND=(0,LT)
//SMPCSI DD DSN=TST.RCT18A1.SMPE.GLOBAL.CSI,DISP=SHR
//SMPLOG DD DSN=TST.RCT18A1.SMPE.DLIB.SMPLOG,DISP=MOD
//SMPPTS DD DSN=TST.RCT18A1.SMPE.SMPPTS,DISP=SHR
//SMPOUT DD SYSOUT=*
//SMPRPT DD SYSOUT=*
//SMPCNTL DD *
SET BOUNDARY(DRCK001) .
UCLIN .
ADD DLIBZONE(DRCK001)
SREL(Z038)
RELATED(TRCK001)
OPTIONS(RCKOPT) .
ADD DDDEF(SMPLOG) MOD
DA(TST.RCT18A1.SMPE.DLIB.SMPLOG) .
ADD DDDEF(SMPSCDS) SHR
DA(TST.RCT18A1.SMPE.SMPSCDS) .
ADD DDDEF(SMPPTS) SHR
DA(TST.RCT18A1.SMPE.SMPPTS) .
ADD DDDEF(SMPMTS) SHR
DA(TST.RCT18A1.SMPE.SMPMTS) .
ADD DDDEF(SMPSTS) SHR
DA(TST.RCT18A1.SMPE.SMPSTS) .
ADD DDDEF(SMPTLIB)
UNIT(SYSALLDA) .
ADD DDDEF(SYSUT1) NEW DELETE UNIT(SYSALLDA)
BLK(1700) SPACE(400,400) .
ADD DDDEF(SYSUT2) NEW DELETE UNIT(SYSALLDA)
9
BLK(1700) SPACE(400,400) .
ADD DDDEF(SYSUT3) NEW DELETE UNIT(SYSALLDA)
BLK(1700) SPACE(400,400) .
ADD DDDEF(SYSUT4) NEW DELETE UNIT(SYSALLDA)
BLK(1700) SPACE(400,400) .
ADD DDDEF(MACLIB) SHR
DA(TST.ZOS16D1.SYS1.MACLIB) .
ADD DDDEF(MODGEN) SHR
DA(TST.ZOS16D1.SYS1.MODGEN) .
ADD DDDEF(SYSLIB)
CONCAT(MACLIB,MODGEN) .
ENDUCL .
/*
Step 2: Create product ZFS file //*---------------------------------------------------------------------
//* Description: ALLOC ROCKET PORTED TOOLS ZFS FILE
//*---------------------------------------------------------------------
//DEFZFS EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//AMSDUMP DD SYSOUT=*
//SYSIN DD *
DEFINE CLUSTER (NAME(TST.RCT18A1.SYS1.SYX.RCTTOOLS.ZFS) -
LINEAR CYL(150,50) SHAREOPTIONS(3))
//*-----------------------------------------------------------------*/
//IFROOT IF DEFZFS.RC=0 THEN
//ZFSROOT EXEC PGM=IOEAGFMT,REGION=0M,
// PARM=('-aggregate TST.RCT18A1.SYS1.SYX.RCTTOOLS.ZFS -compat')
//SYSPRINT DD SYSOUT=*
//STDOUT DD SYSOUT=*
//STDERR DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//CEEDUMP DD SYSOUT=*
// ENDIF
//*
//IFSTEP2 IF ZFSROOT.RC=0 THEN
//MNTSTEP EXEC PGM=IKJEFT1B
10
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
PROF MSGID WTPMSG
MOUNT FILESYSTEM('TST.RCT18A1.SYS1.SYX.RCTTOOLS.ZFS') +
MOUNTPOINT('/tst/rct18a1/usr/lpp/rocket') +
TYPE(ZFS) MODE(RDWR)
// ENDIF
//*
Step 3: MKDIR Used REXX library SYSX.MAINT.ROCKET.ISPFLIB
//IKJEFT1A EXEC PGM=IKJEFT1A
//SYSEXEC DD DISP=SHR,DSN=SYSX.MAINT.ROCKET.ISPFLIB
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
PROF MSGID
MKDIRREX /tst/rct18a1
Used REXX procedure: MKDIRREX
Step 4: OCOPY README Files //*---------------------------------------------------------------------
//* Description: COPY README FILES FROM ZFS
//*---------------------------------------------------------------------
//DELETE EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DELETE TST.RCT18A1.CURL.README
SET MAXCC = 0
//* -------------------------------------------------------------------
//ALLOC EXEC PGM=IEFBR14
//DD1 DD DISP=(,CATLG),UNIT=SYSDA,
// SPACE=(CYL,(2,2,45),RLSE),
// DSN=TST.RCT18A1.CURL.README,
// RECFM=VB,LRECL=255,BLKSIZE=0,DSORG=PO
//*---------------------------------------------------------------------
//COPY EXEC PGM=IKJEFT01,DYNAMNBR=300
//SYSTSPRT DD SYSOUT=*
//STDOUTL DD SYSOUT=*,RECFM=VB,LRECL=133,BLKSIZE=137
11
//STDERRL DD SYSOUT=*,RECFM=VB,LRECL=133,BLKSIZE=137
//INDD1 DD PATH='/tst/software/Rocket/curl/curl-README',
// PATHDISP=(KEEP,KEEP)
//OUTDD1 DD DSN=TST.RCT18A1.CURL.README(CLRM),DISP=SHR
//INDD2 DD PATH='/tst/software/Rocket/curl/curl-README.ZOS',
// PATHDISP=(KEEP,KEEP)
//OUTDD2 DD DSN=TST.RCT18A1.CURL.README(CLRMZ),DISP=SHR
//INDD3 DD PATH='/tst/software/Rocket/curl/curl-CHANGES.ZOS',
// PATHDISP=(KEEP,KEEP)
//OUTDD3 DD DSN=TST.RCT18A1.CURL.README(CLCHG),DISP=SHR
//SYSTSIN DD DATA,DLM='##'
OCOPY INDD(INDD1) OUTDD(OUTDD1) TEXT CONVERT((BPXFX311)) TO1047
OCOPY INDD(INDD2) OUTDD(OUTDD2) TEXT CONVERT((BPXFX311)) TO1047
OCOPY INDD(INDD3) OUTDD(OUTDD3) TEXT CONVERT((BPXFX311)) TO1047
##
Step 5: GIMDTS README files Used REXX library SYSX.MAINT.ROCKET.ISPFLIB
//*---------------------------------------------------------------------
//SM#DTS EXEC PROC=ZOSTISPF
//SYSTSIN DD *
ISPSTART -
CMD(%SM#DTS TST.RCT18A1.CURL.README)
//SYSEXEC DD DISP=SHR,DSN= SYSX.MAINT.ROCKET.ISPFLIB
Used REXX procedure: SM#DTS (Calls GIMDTS for every member of a PO dataset, for load modules it unloads the members with IEBCOPY first)
Used JCL procedure: ZOSTISPF (Run ISPF in batch jobs)
Step 6: gzip product gz file //*---------------------------------------------------------------------
//GZIP EXEC PGM=IKJEFT01,REGION=100M,DYNAMNBR=50
//SYSTSPRT DD SYSOUT=*
//SYSTSOUT DD SYSOUT=*
//SYSTSIN DD *
bpxbatch SH /tst/rct18a1/usr/lpp/rocket/gzip/bin/gzip -d +
/tst/software/Rocket/curl/curl-7.52.1_b006.170926.tar.gz
//STDERR DD PATH='/tmp/curl.err',
12
// PATHOPTS=(OWRONLY,OCREAT,OTRUNC),
// PATHMODE=SIRWXU
//STDOUT DD PATH='/tmp/curl.out',
// PATHOPTS=(OWRONLY,OCREAT,OTRUNC),
// PATHMODE=SIRWXU
Step 7: OGET and GIMDTS tarfile //*---------------------------------------------------------------------
//* Description: COPY curl tar file
//*---------------------------------------------------------------------
//DELETE EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DELETE TST.RCT18A1.CURL.TAR
DELETE TST.RCT18A1.CURL.TAR.GIMDTS
SET MAXCC = 0
//* -------------------------------------------------------------------
//ALLOC EXEC PGM=IEFBR14
//DD1 DD DISP=(,CATLG),UNIT=SYSDA,
// SPACE=(CYL,(200,50),RLSE),
// DSN=TST.RCT18A1.CURL.TAR,
// RECFM=VB,LRECL=255,BLKSIZE=0,DSORG=PS
//DD2 DD DISP=(,CATLG),UNIT=SYSDA,
// SPACE=(CYL,(200,50),RLSE),
// DSN=TST.RCT18A1.CURL.TAR.GIMDTS,
// RECFM=FB,LRECL=80,BLKSIZE=0,DSORG=PS
//*---------------------------------------------------------------------
//COPY EXEC PGM=IKJEFT01,DYNAMNBR=300
//SYSTSPRT DD SYSOUT=*
//STDOUTL DD SYSOUT=*,RECFM=VB,LRECL=133,BLKSIZE=137
//STDERRL DD SYSOUT=*,RECFM=VB,LRECL=133,BLKSIZE=137
//SYSTSIN DD DATA,DLM='##'
OGET '/tst/software/Rocket/curl/curl-7.52.1_b006.170926.tar' +
'TST.RCT18A1.CURL.TAR' BINARY
##
//*---------------------------------------------------------------------
13
//GIMDTS EXEC PGM=GIMDTS
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=TST.RCT18A1.CURL.TAR,DISP=SHR
//SYSUT2 DD DSN=TST.RCT18A1.CURL.TAR.GIMDTS,DISP=SHR
Step 8: GIMDTS shellscript Sample shellscript used from: https://www.ibm.com/support/knowledgecenter/SSLTBW_2.3.0/com.ibm.zos.v2r3.gim2000/chpshl.htm
Script is copied to z/OS dataset (VB,255) TST.RCT18A1.GZIP.SHSCRIPT.
//*---------------------------------------------------------------------
//* Description: GIMDTS shellscript
//*---------------------------------------------------------------------
//DELETE EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DELETE TST.RCT18A1.GZIP.SHSCRIPT.GIMDTS
SET MAXCC = 0
//* -------------------------------------------------------------------
//ALLOC EXEC PGM=IEFBR14
//DD2 DD DISP=(,CATLG),UNIT=SYSDA,
// SPACE=(CYL,(2,1),RLSE),
// DSN=TST.RCT18A1.GZIP.SHSCRIPT.GIMDTS,
// RECFM=FB,LRECL=80,BLKSIZE=0,DSORG=PS
//*---------------------------------------------------------------------
//GIMDTS EXEC PGM=GIMDTS
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=TST.RCT18A1.GZIP.SHSCRIPT,DISP=SHR
//SYSUT2 DD DSN=TST.RCT18A1.GZIP.SHSCRIPT.GIMDTS,DISP=SHR
Step 9: Used MCS statements These MCS statements are inserted before any element, they are stored in dataset SYSX.MAINT.ROCKET.ISPFLIB(MCSCURLn):
Statement 1
++ FUNCTION(SCL7521) REWORK(2018285)
DESC(cURL)
/*******************************************************************
* Rocket Open Source Languages and Tools for z/OS *
14
* cURL - curl-7.52.1_b006.170926.tar *
********************************************************************/.
++ VER (Z038) .
++USER1 (CLRM) DISTLIB(ACURLSMP) SYSLIB(SCURLSMP).
Statement 2
++USER1 (CLRMZ) DISTLIB(ACURLSMP) SYSLIB(SCURLSMP).
Statement 3
++USER1 (CLCHG) DISTLIB(ACURLSMP) SYSLIB(SCURLSMP).
Statement 4
++HFS (CURLTAR) DISTLIB(ACURLZFS) SYSLIB(SCURLPTH) SHSCRIPT(CURLSHSC)
BINARY .
Statement 5
++SHELLSCR (CURLSHSC) DISTLIB(ACURLZFS) SYSLIB(SCURLPTH) .
Step 10: Build complete SMPPTFIN file //DELETE EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DELETE TST.RCT18A1.CURL.MCS
SET MAXCC = 0
//* -------------------------------------------------------------------
//ALLOC EXEC PGM=IEFBR14
//DD2 DD DISP=(,CATLG),UNIT=SYSDA,
// SPACE=(CYL,(200,50),RLSE),
// DSN=TST.RCT18A1.CURL.MCS,
// RECFM=FB,LRECL=80,BLKSIZE=0,DSORG=PS
//*---------------------------------------------------------------------
//GENER EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT1 DD DSN=SYSX.MAINT.ROCKET.ISPFLIB(MCSCURL1),DISP=SHR
// DD DSN=TST.RCT18A1.CURL.README.GIMDTS(CLRM),DISP=SHR
// DD DSN=SYSX.MAINT.ROCKET.ISPFLIB(MCSCURL2),DISP=SHR
// DD DSN=TST.RCT18A1.CURL.README.GIMDTS(CLRMZ),DISP=SHR
// DD DSN=SYSX.MAINT.ROCKET.ISPFLIB(MCSCURL3),DISP=SHR
15
// DD DSN=TST.RCT18A1.CURL.README.GIMDTS(CLCHG),DISP=SHR
// DD DSN=SYSX.MAINT.ROCKET.ISPFLIB(MCSCURL4),DISP=SHR
// DD DSN=TST.RCT18A1.CURL.TAR.GIMDTS,DISP=SHR
// DD DSN=SYSX.MAINT.ROCKET.ISPFLIB(MCSCURL5),DISP=SHR
// DD DSN=TST.RCT18A1.CURL.SHSCRIPT.GIMDTS,DISP=SHR
//SYSUT2 DD DSN=TST.RCT18A1.CURL.MCS,DISP=SHR
Step 11: Allocate Target/Dlibs //*---------------------------------------------------------------------
//* Description: ALLOC curl TARGET/DLIBS
//*---------------------------------------------------------------------
//ALLOC EXEC PGM=IEFBR14
//*
//* ALLOCATE TARGET LIBRARIES
//*
//SCURLSMP DD DSN=TST.RCT18A1.SYS1.ROCKET.SCURLSMP,
// UNIT=SYSALLDA,
// SPACE=(CYL,(1,1,45)),
// RECFM=VB,LRECL=255,BLKSIZE=0,
// DISP=(NEW,CATLG)
//*
//*
//* ALLOCATE DISTRIBUTION LIBRARIES
//*
//*
//ACURLSMP DD DSN=TST.RCT18A1.SYS1.ROCKET.ACURLSMP,
// UNIT=SYSALLDA,
// SPACE=(CYL,(1,1,45)),
// RECFM=VB,LRECL=255,BLKSIZE=0,
// DISP=(NEW,CATLG)
//*
//ACURLZFS DD DSN=TST.RCT18A1.SYS1.ROCKET.ACURLZFS,
// UNIT=SYSALLDA,
// SPACE=(CYL,(200,50,45)),
// RECFM=VB,LRECL=255,BLKSIZE=0,
// DISP=(NEW,CATLG)
16
Step 12: Create DDDEFs //*---------------------------------------------------------------------
//* Description: DDDEFS FOR curl
//*---------------------------------------------------------------------
//DDDEFT EXEC PGM=GIMSMP,REGION=4096K
//SMPCSI DD DSN=TST.RCT18A1.SMPE.GLOBAL.CSI,
// DISP=SHR
//SMPCNTL DD *
SET BDY(TRCK001).
UCLIN.
ADD DDDEF (SCURLPTH)
PATH('/usr/lpp/rocket/curl/').
REP DDDEF (SCURLSMP)
DATASET(TST.RCT18A1.SYS1.ROCKET.SCURLSMP)
UNIT(SYSALLDA)
WAITFORDSN
SHR.
REP DDDEF (ACURLZFS)
DATASET(TST.RCT18A1.SYS1.ROCKET.ACURLZFS)
UNIT(SYSALLDA)
WAITFORDSN
SHR.
REP DDDEF (ACURLSMP)
DATASET(TST.RCT18A1.SYS1.ROCKET.ACURLSMP)
UNIT(SYSALLDA)
WAITFORDSN
SHR.
ENDUCL.
//*---------------------------------------------------------------------
//DDDEFD EXEC PGM=GIMSMP,REGION=4096K
//SMPCSI DD DSN=TST.RCT18A1.SMPE.GLOBAL.CSI,
// DISP=SHR
//SMPCNTL DD *
SET BDY(DRCK001).
UCLIN.
17
ADD DDDEF (SCURLSMP)
DATASET(TST.RCT18A1.SYS1.ROCKET.SCURLSMP)
UNIT(SYSALLDA)
WAITFORDSN
SHR.
ADD DDDEF (ACURLZFS)
DATASET(TST.RCT18A1.SYS1.ROCKET.ACURLZFS)
UNIT(SYSALLDA)
WAITFORDSN
SHR.
ADD DDDEF (ACURLSMP)
DATASET(TST.RCT18A1.SYS1.ROCKET.ACURLSMP)
UNIT(SYSALLDA)
WAITFORDSN
SHR.
ENDUCL.
//*---------------------------------------------------------------------
//DEFPATH EXEC PGM=GIMSMP,REGION=4096K
//SMPCSI DD DSN=TST.RCT18A1.SMPE.GLOBAL.CSI,
// DISP=SHR
//SMPCNTL DD *
SET BDY(TRCK001) .
ZONEEDIT DDDEF.
CHANGE PATH('/usr/lpp/rocket/curl'*,
'/tst/rct18a1/usr/lpp/rocket/curl'*).
ENDZONEEDIT.
/*
Step 13: RECEIVE product //*---------------------------------------------------------------------
//RECEIVE EXEC SMPEPROC,CSI=RCT18A1
//SMPPTFIN DD DISP=SHR,DSN=TST.RCT18A1.CURL.MCS
//SMPCNTL DD *
SET BDY(GLOBAL).
REJECT S(SCL7521) BYPASS(APPLYCHECK,ACCEPTCHECK) .
RESETRC .
18
RECEIVE SYSMODS.
Used JCL procedure: SMPEPROC (SMP/E procedure)
Step 14: APPLY CHECK product //*---------------------------------------------------------------------
//APPLYCHK EXEC SMPEPROC,CSI=RCT18A1
//SMPCNTL DD *
SET BDY(TRCK001).
Used JCL procedure: SMPEPROC (SMP/E procedure)
Step 15: APPLY product //*---------------------------------------------------------------------
//APPLY EXEC SMPEPROC,CSI=RCT18A1
//SMPCNTL DD *
SET BDY(TRCK001).
APPLY S(SCL7521) BYPASS(HOLDSYS) COMPRESS(ALL) REDO .
Used JCL procedure: SMPEPROC (SMP/E procedure)
Step 16: ACCEPT CHECK product //*---------------------------------------------------------------------
//ACCEPTCK EXEC SMPEPROC,CSI=RCT18A1
//SMPCNTL DD *
SET BDY(DRCK001).
ACCEPT CHECK S(SCL7521) BYPASS(HOLDSYS) COMPRESS(ALL) .
Used JCL procedure: SMPEPROC (SMP/E procedure)
Step 17: ACCEPT product //*---------------------------------------------------------------------
//ACCEPT EXEC SMPEPROC,CSI=RCT18A1
//SMPCNTL DD *
SET BDY(DRCK001).
ACCEPT S(SCL7521) BYPASS(HOLDSYS) COMPRESS(ALL) .
Used JCL procedure: SMPEPROC (SMP/E procedure)
Congratulations!
Now you have successfully SMP/E installed curl as a sample for Rocket z/OS Ported Tools.
19
A CSI query for FMID SCL7521 (used here for cURL) should look similar to this screenshot:
Appendix
Used REXX and JCL procedures
MKDIRREX This procedures defines several directories in the product ZFS, it is adopted from a similar procedure used for the installation of z/OS V2.2.
/* REXX */
/*******************************************************************/
/* */
/* This REXX exec will create the necessary directories and other */
/* files for installation of z/OS V2.2 */
/* */
/*******************************************************************/
idir='usr/lpp/' /* This is your install directory */
dirs=,
, /* <== Here is the list of directories */
, /* with respective permission bits */
20
, /* The last one doesn't have a comma */
, /*--------------------------------------------------------*/
, /* HFS directories required for installation */
, /*--------------------------------------------------------*/
,
'rocket 755',
'rocket/gzip 755',
'rocket/curl 755',
'rocket/webalizer 755',
'rocket/bash 755',
'rocket/mc 755',
'rocket/perl 755',
'rocket/php 755',
parse arg $root .
If $root='' then
$root = '/' /* Add a trailing slash */
Else /* if none exists on input */
$root=strip($root,'T','/')'/'
/****************************************************************/
/* Beginning of main procedure: */
/****************************************************************/
firstchar = Substr($root,1,1)
If firstchar <> '/' then
Do
say 'Directory name does NOT begin with a "/".'
say 'Please correct and resubmit.'
Exit 12
End
if syscalls(on)>4 then
Do
say 'Initialization failure. Please correct and resubmit.'
21
Exit 12
End
verticalbar='!' /* check integrity of this exec */
if C2X(verticalbar) <> 4F then
Do
say 'Vertical bar characters in this file are corrupted,'
say 'probably caused by translation during upload or download.'
say 'Dollar sign characters may also be corrupted.'
Exit 12
End
$rc= '0'
msgs. = ''
x=outtrap(mm.,,'NOCONCAT')
'PROFILE'
If Pos(NOMSGID,mm.1) > 0 then num = '3'
Else num = '4'
PARSE SOURCE . . EXECNAME .
x=outtrap(OFF)
say 'The EXEC to create the directories has begun.'
say 'It will run for a couple of minutes.'
x=outtrap(mm.,,'NOCONCAT')
say 'The' EXECNAME 'EXEC ran at ' TIME() ' on ' DATE()
say
$rc= '0'
address syscall 'getuid'
myuid=retval
address syscall 'geteuid'
myeuid=retval
privflag=0 /* Change the Effective UID to */
If myeuid <> 0 then /* be 0 since invoker should */
22
Do /* be part of the BPX.SUPERUSER */
address syscall 'seteuid 0' /* facility class */
privflag=1
End
address syscall 'access' $root F_OK
If (rc=0 & retval<>0) ! rc<> 0 then
Do
If errno = 6F then /* EACCESS */
Do
say 'Do not have appropriate permission to' $root
say ' '
say 'Please get appropriate permission to this directory',
'and resubmit.'
say
Exit 12
End
Else
Do
say 'Directory' $root 'does not exist.'
say
say 'Please create this directory and resubmit.'
say
Exit 12
End
$rc= '12'
End
Else
Do /* OK to continue this exec */
call msg errors, ' ' /* Setup all headings */
call msg dcreated, ' Created the following directories:'
call msg dcreated, ' =================================='
23
call msg dchmods, ' Changed permission bits of existing directories:'
call msg dchmods, ' ================================================'
call msg dexists, ' Following directories already exist',
'with proper permissions:'
call msg dexists, ' ====================================',
!!'========================='
call msg dproblems, ' Problems creating following directories:'
call msg dproblems, ' ========================================'
call msg lcreated, ' Created the following symlinks:'
call msg lcreated, ' ==============================='
call msg lexists, ' Following symlinks already exist with correct',
'target:'
call msg lexists, ' =============================================',
!!'========'
call msg lproblems, ' Problems creating following symlinks:'
call msg lproblems, ' ====================================='
call msg uMSGS, ' Verified that the following symlinks'
call msg uMSGS, ' do not point to paths known to be obsolete.',
'No action taken.'
call msg uMSGS, ' ============================================',
!!'================='
uMSGS_flag = 0
call msg udeleted, ' Deleted the following symlinks:'
call msg udeleted, ' ==============================='
call msg uproblems, ' Problems deleting the following symlinks:'
call msg uproblems, ' ========================================='
call msg ADDMSG, ' Additional messages:'
call msg ADDMSG, ' ===================='
if idir <> '' then /* this check prevents chmods to $root */
call syscall0 mkdir $root !! idir 755
do while dirs<>''
parse var dirs dir perm dirs
24
call syscall0 mkdir $root !! idir !! strip(dir) strip(perm)
end
End /* OK to continue this exec */
If privflag=1 then
address syscall 'seteuid' myuid
/*------------------------------------------*/
/* Summarize collected messages. */
/* If there were no commands of a type, */
/* then blank out its dependent headings */
/*------------------------------------------*/
if,
(msgs.dcreated.0 + msgs.dexists.0 + msgs.dproblems.0 + msgs.dchmods.0),
= 8 then
Do
call msg dcreated, 'No mkdir commands attempted'
msgs.dexists.0 = 0 /* eliminate this message heading */
msgs.dchmods.0 = 0 /* eliminate this message heading */
msgs.dproblems.0 = 0 /* eliminate this message heading */
End
if msgs.dcreated.0 = 2
then call msg dcreated, 'No directories were created'
call msg dcreated, ' '
if msgs.dchmods.0 = 2
then call msg dchmods, 'No permission bits were changed'
call msg dchmods, ' '
25
if msgs.dexists.0 = 2 then
call msg dexists, 'No directories already existed with proper',
'permission bits'
call msg dexists, ' '
if msgs.dproblems.0 = 2
then call msg dproblems, 'No problems while creating directories'
call msg dproblems, ' '
if (msgs.lcreated.0 + msgs.lexists.0 + msgs.lproblems.0) = 6 then
Do
call msg lcreated, 'No symlink commands attempted'
msgs.lexists.0 = 0 /* eliminate this message heading */
msgs.lproblems.0 = 0 /* eliminate this message heading */
End
if msgs.lcreated.0 = 2
then call msg lcreated, 'No symlinks created'
call msg lcreated, ' '
if msgs.lexists.0 = 2
then call msg lexists, 'No symlinks already existed'
call msg lexists, ' '
if msgs.lproblems.0 = 2
then call msg lproblems, 'No problems while creating symlinks'
call msg lproblems, ' '
if (msgs.udeleted.0 + msgs.uproblems.0 + uMSGS_flag) = 4 then
Do
call msg udeleted, 'No unlink commands attempted'
msgs.uproblems.0 = 0 /* eliminate this message heading */
End
if msgs.udeleted.0 = 2
26
then call msg udeleted, 'No links deleted'
call msg udeleted, ' '
if msgs.uproblems.0 = 2
then call msg uproblems, 'No problems while deleting links'
call msg uproblems, ' '
if msgs.uMSGS.0 = 3
then msgs.uMSGS.0 = 0 /* eliminate this message heading */
else
Do
call msg uMSGS, 'If you recognize an existing path above',
'as one that was modified manually,'
call msg uMSGS, 'then it may cause a problem during the apply.'
call msg uMSGS, 'Otherwise it is acceptable.'
call msg uMSGS, 'If this EXEC is being rerun after apply,',
'then this message is acceptable.'
call msg uMSGS, ' '
End
if msgs.ADDMSG.0 = 2
then call msg ADDMSG, 'No additional messages'
call msg ADDMSG, ' '
/*-----------------------------------------*/
/* Evaluate return code, */
/* and write out all messages */
/*-----------------------------------------*/
If $rc < 8 then
call msg saylast, 'End of EXEC.'
Else
Do
call msg saylast, ' '
call msg saylast, 'Please refer to the UNIX System',
27
'Services Messages and Codes book'
call msg saylast, 'to interpret the Return and Reason Codes.'
call msg saylast, 'Please correct and resubmit.'
End
x=outtrap(off)
do i=1 to words(msgs.indices) /* write out all msgs */
index = word(msgs.indices,i)
/*say 'index = ' index */
do j=1 to msgs.index.0
say msgs.index.j
end
end
say 'The' EXECNAME 'EXEC has completed with Return Code' $rc
Exit $rc
/********************************/
/* Subroutine for mkdir calls */
/********************************/
syscall0:
parse arg cmd
address syscall cmd /* mkdir */
parse arg . path permbits
If (rc=0 & retval<>0) ! rc<> 0 then
Do
If errno = 75 then /* EEXIST */
Do
address syscall 'stat' path 'dirinf.'
if dirinf.ST_MODE = permbits then call msg dEXISTS, path permbits
else
do
28
address syscall 'chmod' path permbits
call msg dCHMODS, path permbits
end
End
Else
If errno <> 75 then
Do
call msg dPROBLEMS, path permbits
call msg dPROBLEMS,' Not created. RC='errno ' RSN='errnojr
call lookup(dPROBLEMS errno errnojr)
$rc = '12'
End
End
Else
Do
CALL MSG DCREATED, path permbits
End
If verify(permbits,'01234567') > 0 then
Do
call msg dPROBLEMS, path
call msg dPROBLEMS,' Not created. Invalid permission bits' permbits
$rc = '12'
End
Return
/*********************************/
/* Subroutine for unlink calls */
/*********************************/
syscall2:
parse arg cmd
parse arg . link
link = strip(link)
29
address syscall lstat link $linktype. /* Verify link is a symlink */
If errno <> 81 then
Do
If $linktype.ST_TYPE = 3 then
do
call msg uPROBLEMS, 'Error in unlink' link
call msg uPROBLEMS, ' File exists where symlink is expected'
$rc = '04'
end
Else If $linktype.ST_TYPE <> 3 then
do
address syscall cmd /* delete the symlink */
If (rc=0 & retval<>0) ! rc<> 0 then
Do
call msg uPROBLEMS, 'Could not delete symlink' link
call msg uPROBLEMS, ' RC='errno ' RSN='errnojr
call lookup(uPROBLEMS errno errnojr)
$rc = '12'
End
Else
Do
call msg uDELETED, link
End
end
End
Return
/**********************************/
/* Subroutine for symlink calls */
/**********************************/
syscall3:
parse arg cmd
address syscall cmd /* create the symlink */
parse arg . path link
30
If (rc=0 & retval<>0) ! rc<> 0 then
Do
If errno = 75 then /* EEXIST */
Do
linkbuf = ' file or directory'
address syscall 'readlink' link 'linkbuf'
If linkbuf <> path then
Do
call msg lPROBLEMS, 'The symlink defined by' link
call msg lPROBLEMS, ' already exists, but names a different file.'
call msg lPROBLEMS, ' existing path:' linkbuf
call msg lPROBLEMS, ' expected path:' path
$rc = '12'
End
Else
Do
call msg lEXISTS, ' ' link
End
End
Else
Do
call msg lPROBLEMS, 'Could not create symlink' link
call msg lPROBLEMS, ' RC='errno ' RSN='errnojr
call lookup(lPROBLEMS errno errnojr)
$rc = '12'
End
End
Else
Do
call msg lCREATED, ' ' link
call msg lCREATED, ' ' path
End
Return
31
/****************************************************/
/* Subroutine for other calls- for example 'chown' */
/****************************************************/
syscall4:
parse arg cmd
address syscall cmd /* execute other calls */
If (rc=0 & retval<>0) ! rc<> 0 then
Do
If errno <> 75 then
Do
call msg ADDMSG, 'Command:' cmd 'failed'
call msg ADDMSG, ' RC='errno ' RSN='errnojr
call lookup(ADDMSG errno errnojr)
$rc = '12'
End
Else /* EEXIST */
Do
call msg ADDMSG, 'Following command result already exists'
call msg ADDMSG, ' ' cmd
call msg ADDMSG, ' '
End
End
Else
Do
call msg ADDMSG, 'Following command was successful'
call msg ADDMSG, ' ' cmd
call msg ADDMSG, ' '
End
Return
/***********************************************/
/* Subroutine for unlink with known target */
/* See also syscall6. */
32
/***********************************************/
syscall5:
parse arg action path link
link = strip(link)
address syscall lstat link $linktype. /* Verify link is a symlink */
If errno <> 81 then
Do
If $linktype.ST_TYPE <> 5 then
Do
call msg uPROBLEMS, 'Unlink not performed' link
call msg uPROBLEMS, 'File or directory exists in place',
'of old symlink'
$rc = '04'
End
Else If $linktype.ST_TYPE = 5 then
Do
linkbuf = ' error in readlink'
address syscall 'readlink' link 'linkbuf'
If linkbuf <> path then
do
/* The existing path is not known to be obsolete. */
/* The exec does not know if it is actually correct. */
/* Syscall5 says produce messages for this case. */
/* If $rc = 4 is desired for this case, */
/* then uncomment the $rc = '04' line below. */
/* Logic in summarize section will produce the uMSGS */
/* header and trailer only if needed. */
call msg uMSGS, 'Linkname' link
call msg uMSGS, ' existing path:' linkbuf
call msg uMSGS, ' obsolete path:' path
call msg uMSGS, ' '
/* $rc = '04' */
end
33
Else
do
address syscall action link /* Delete the symlink */
If (rc=0 & retval<>0) ! rc<> 0 then
Do
call msg uPROBLEMS, 'Could not delete symlink' link
call msg uPROBLEMS, ' RC='errno ' RSN='errnojr
call lookup(uPROBLEMS errno errnojr)
$rc = '12'
End
Else
Do
call msg uDELETED, link
call msg uDELETED, ' ' path
End
end
End
End
uMSGS_flag = 1
Return
/***********************************************/
/* Subroutine for unlink with known target */
/* Same as syscall5, but suppress uMSGS */
/***********************************************/
syscall6:
parse arg action path link
link = strip(link)
address syscall lstat link $linktype. /* Verify link is a symlink */
If errno <> 81 then
Do
If $linktype.ST_TYPE <> 5 then
Do
34
call msg uPROBLEMS, 'Unlink not performed' link
call msg uPROBLEMS, 'File or directory exists in place',
'of old symlink'
$rc = '04'
End
Else If $linktype.ST_TYPE = 5 then
Do
linkbuf = ' error in readlink'
address syscall 'readlink' link 'linkbuf'
If linkbuf <> path then
do
/* The existing path is not known to be obsolete. */
/* The exec does not know if it is actually correct. */
/* Syscall6 says No messages for this case. */
/* Logic in summarize section will produce the uMSGS */
/* header and trailer only if needed. */
/*call msg uMSGS, 'Linkname' link */
/*call msg uMSGS, ' existing path:' linkbuf */
/*call msg uMSGS, ' obsolete path:' path */
/*call msg uMSGS, ' ' */
end
Else
do
address syscall action link /* Delete the symlink */
If (rc=0 & retval<>0) ! rc<> 0 then
Do
call msg uPROBLEMS, 'Could not delete symlink' link
call msg uPROBLEMS, ' RC='errno ' RSN='errnojr
call lookup(uPROBLEMS errno errnojr)
$rc = '12'
End
Else
Do
call msg uDELETED, link
call msg uDELETED, ' ' path
35
End
end
End
End
uMSGS_flag = 1
Return
/***************************************************/
/* Subroutine to lookup text for error numbers */
/* note: does nothing on pre-os390 v2r7 systems */
/***************************************************/
lookup: procedure expose reasons msgs.
parse upper arg section msgno msgnojr /* really errno and errnojr*/
err.=''
trace off /* supress clutter msgs */
address syscall 'strerror' msgno msgnojr 'err.'
trace normal /* normal again */
if rc<> 0 then return /* quietly if syscall fails */
call msg section, ' ' err.1 /* always list short text */
if wordpos(msgnojr,reasons) = 0 /* but only list long text */
then do /* if not shown previously */
reasons = reasons msgnojr
if err.3<>'' then call msg section, ' 'err.3
if err.4<>'' then call msg section, ' 'err.4
end
call msg section, ''
return
/*****************************************/
/* Subroutine to add messages to stems */
/*****************************************/
msg: procedure expose msgs.
36
parse arg index, text
if wordpos(index, msgs.indices) = 0
then do
msgs.indices = msgs.indices index
msgs.index.0 = 0
end
i = msgs.index.0 + 1
msgs.index.i = text
msgs.index.0 = i
return
SM#DTS This procedure calls the SMP/E utility GIMDTS for all members of a portioned dataset to format files into FB 80 records in order to use these files as instream data to create the installation package. Via the keyword LOADLIB IEBCOPY is called to unload load modules before calling GIMDTS.
/** REXX *************************************************************/
/*-------------------------------------------------------------------*/
/*! SM#DTS - Format libraries with GIMDTS !*/
/*! Author: Kehr 2018/10/11 !*/
/*-------------------------------------------------------------------*/
/*! Last changed: 2018/10/11 !*/
/*-------------------------------------------------------------------*/
/*! Description of changes: !*/
/*! 2018/10/11 First installation !*/
/*-------------------------------------------------------------------*/
/*********************************************************************/
arg parm
parse var parm dsn "," ll .
/* dsn = "TST.YCE18A2.SYS1.YCE.LINKLIB" */
dsno = dsn !! ".GIMDTS"
x = msg("OFF")
address tso "DELETE '"dsno"'"
x = msg("ON")
address tso "ALLOC DD(GIMDTS) DSN('"dsno"') NEW CATALOG",
37
"LIKE('"dsn"') LRECL(80) RECFM(F B) BLKSIZE(0) DSORG(PO)"
address tso "FREE DD(GIMDTS)"
temp = reverse(dsn)
parse var temp llq "." .
llq = reverse(llq)
dsnl = "'"dsn"'"
x = listdsi(dsnl 'DIRECTORY')
if x = 0 then do
ublk = SYSUDIRBLK
ablk = SYSADIRBLK
dsorg = SYSDSORG
dsntype = SYSDSSMS
lrecl = SYSLRECL
recfm = left(SYSRECFM,1)
if dsorg ^= "PO" then do
say "CPTU01E Dataset" dsn "not partioned, process cancelled"
retcc = max(retcc,8)
exit 8
end
if ublk = 0 then do
say "CPTU03E Dataset" dsn "has 0 used directory blocks,",
"process cancelled"
retcc = max(retcc,8)
exit 8
end
y = outtrap("listds.")
address tso "LISTDS '"dsn"' MEMBERS"
if rc ^= 0 then do
say "CPTU04E Error LISTDS dataset" dsn "process cancelled"
retcc = max(retcc,8)
exit 8
end
switch = "OFF"
38
switch1 = "OFF"
updmem = 0
do i = 1 to listds.0
select
when switch = "ON" then do
if substr(listds.i,3,1) = "" then iterate
if strip(listds.i) = ,
"THE FOLLOWING ALIAS NAMES EXIST WITHOUT TRUE NAMES" then do
switch1 = "ON"
iterate
end
if switch1 = "OFF" then
parse var listds.i memb .
else
parse var listds.i . "ALIAS(" memb ")" .
memb = strip(memb)
if ll ^= "LOADLIB" then do
address tso "FREE DD(SYSUT1)"
address tso "ALLOC DD(SYSUT1) DSN('"dsn"("memb")') SHR REUSE"
fkt = call_gimdts(dsno,memb)
end
else do
fkt = iebcopy_unload(dsn,memb)
fkt = call_gimdts(dsno,memb)
end
end
when switch = "OFF" & pos("--MEMBERS--",listds.i) ^= 0 then do
switch = "ON"
end
otherwise
iterate
end
end
end
39
else do
say "CPTU06E Error determing attributes for" dsn "process cancelled"
retcc = max(retcc,12)
exit 8
end
/*-------------------------------------------------------------------*/
exit 0
/*-------------------------------------------------------------------*/
/* procedure iebcopy_unload */
/*-------------------------------------------------------------------*/
iebcopy_unload:
procedure
arg dsn,memb
address tso "FREE DD(SYSUT1)"
address tso "FREE DD(SYSPRINT)"
address tso "FREE DD(SYSIN)"
address tso "FREE DD(PDSFILE)"
address tso "ALLOC DD(PDSFILE) DSN('"dsn"') SHR"
if rc ^= 0 then return 8
address tso "ALLOC DD(SYSUT1) NEW TRACKS SPACE(50 150) DSORG(PS)"
address tso "ALLOC DD(SYSIN) NEW TRACKS SPACE(1 1),
BLKSIZE(6160) LRECL(80) RECFM(F B)"
/*-------------------------------------------------------------------*/
/* link to IEBCOPY */
/*-------------------------------------------------------------------*/
drop iebc.
iebc.1 = " COPY OUTDD=SYSUT1,INDD=PDSFILE"
iebc.2 = " SELECT MEMBER=("memb")"
"EXECIO * DISKW SYSIN (STEM iebc. FINIS)"
40
address tso "ALLOC DD(SYSPRINT) DSN(*)"
address tso "TSOEXEC CALL 'SYS1.LINKLIB(IEBCOPY)'"
ccx = rc
say "RC IEBCOPY:" ccx
/*address tso "FREE DD(SYSPRINT)"*/
address tso "FREE DD(SYSIN)"
address tso "FREE DD(PDSFILE)"
if ccx > 4 then return ccx
else return 0
/*-------------------------------------------------------------------*/
/* procedure call_gimdts */
/*-------------------------------------------------------------------*/
call_gimdts:
procedure
arg dsn,memb
address tso "FREE DD(SYSPRINT)"
address tso "FREE DD(SYSUT2)"
address tso "ALLOC DD(SYSUT2) DSN('"dsn"("memb")') SHR REUSE"
if rc ^= 0 then return 8
address tso "ALLOC DD(SYSPRINT) DSN(*)"
address tso "TSOEXEC CALL 'SYS1.MIGLIB(GIMDTS)'"
ccx = rc
address tso "FREE DD(SYSPRINT)"
address tso "FREE DD(SYSUT1)"
address tso "FREE DD(SYSUT2)"
if ccx > 4 then return ccx
else return 0
41
ZOSTISPF JCL procedure to run ISPF in batch. At this time the used REXX procedures do not use any ISPF services, so it would be also possible to use a less complicate REXX batch invocation instead.
//ZOSTISPF PROC HLQ='SYSX.ZOSTOOLS' ** HLQ FOR APPL ISPF FILES
//*---------------------------------------------------------------------
//BTCISPF EXEC PGM=IKJEFT01,DYNAMNBR=40,REGION=100M
//STEPLIB DD DISP=SHR,DSN=&HLQ..LOAD
//ISPFILE DD UNIT=3390,DISP=(NEW,PASS),SPACE=(TRK,(10,1,1)),
// RECFM=FB,LRECL=80,BLKSIZE=0
//ISPPROF DD UNIT=3390,DISP=(NEW,PASS),SPACE=(TRK,(10,1,1)),
// RECFM=FB,LRECL=80,BLKSIZE=0
//ISPWRK1 DD UNIT=3390,DISP=(NEW,PASS),SPACE=(CYL,(10,10)),
// LRECL=256,BLKSIZE=0,RECFM=FB
//**********************************************************************
//** ISPLOG - Where ISPF puts error and informational messages.
//** Specify DUMMY if not needed.
//** For debugging purposes specify SYSOUT=*,DCB=(RECFM=VA,
//** LRECL=125,BLKSIZE=129)
//**********************************************************************
//ISPLOG DD DUMMY
//*ISPLLIB DD DISP=SHR,DSN=
//ISPMLIB DD DISP=SHR,DSN=SYS1.SISPMENU
// DD DISP=SHR,DSN=&HLQ..MSGS
//ISPPLIB DD DISP=SHR,DSN=SYS1.SISPPENU
// DD DISP=SHR,DSN=&HLQ..PANELS
//ISPSLIB DD DISP=SHR,DSN=SYS1.SISPSENU
// DD DISP=SHR,DSN=&HLQ..SKELS
//ISPTLIB DD DISP=SHR,DSN=SYS1.SISPTENU
//SYSEXEC DD DISP=SHR,DSN=SYS1.SISPCLIB
// DD DISP=SHR,DSN=&HLQ..EXEC
//SYSTSPRT DD SYSOUT=*
SMPEPROC JCL procedure to run SMP/E jobs. The size of the SMP/E used work datasets is fairly large and may be reduced.
//SMPEPROC PROC CSI=ZOS15B1
42
//SMPE EXEC PGM=GIMSMP,REGION=0M,
// PARM='PROCESS=WAIT',
// DYNAMNBR=120
//SMPCSI DD DISP=SHR,DSN=TST.&CSI..SMPE.GLOBAL.CSI
//SMPJHOME DD PATH='/usr/lpp/java/J7.0/',PATHDISP=KEEP
//SMPLOG DD DUMMY
//SMPLOGA DD DUMMY
//SMPHOLD DD DUMMY
//SMPOUT DD SYSOUT=*
//SMPRPT DD SYSOUT=*
//SMPLIST DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SMPWRK1 DD UNIT=SYSALLDA,SPACE=(CYL,(50,10,45))
//SMPWRK2 DD UNIT=SYSALLDA,SPACE=(CYL,(50,10,45))
//SMPWRK3 DD UNIT=SYSALLDA,SPACE=(CYL,(750,150,500))
//SMPWRK4 DD UNIT=SYSALLDA,SPACE=(CYL,(50,10,45))
//SMPWRK6 DD UNIT=SYSALLDA,SPACE=(CYL,(1200,250,500))
//SYSUT1 DD UNIT=SYSVIO,SPACE=(CYL,(600,800))
//SYSUT2 DD UNIT=SYSVIO,SPACE=(CYL,(475,515))
//SYSUT3 DD UNIT=SYSVIO,SPACE=(CYL,(475,515))
//SYSUT4 DD UNIT=SYSVIO,SPACE=(CYL,(475,515))