On Sun, 22 Jan 2017 15:00:08 -0700, Lizette Koehler <[email protected]> wrote:
>I will be taking Dale Smith's version and adding a nice little ISPF Panel >around it. And I do think this could be helpful for calculating JES2 CKPT >Size for various resources. > >Lizette > > >> -----Original Message----- >> From: IBM Mainframe Discussion List [mailto:[email protected]] On >> Behalf Of Jesse 1 Robinson >> Sent: Sunday, January 22, 2017 10:59 AM >> To: [email protected] >> Subject: Re: How to calculate the JES2 Checkpoint and Spool Space >> >> I for one would be grateful to have your Rexx available on the CBT. Like many >> shops, we coast along from one release to next using spool components that >> date back to the 90s and the last required cold start. I have no idea whether >> we are 10% utilized or 90%. >> >> . >> . >> J.O.Skip Robinson >> Southern California Edison Company >> Electric Dragon Team Paddler >> SHARE MVS Program Co-Manager >> 323-715-0595 Mobile >> 626-543-6132 Office ⇐=== NEW >> [email protected] I'll post my code following this text. There is very little error checking in the code and it may not be able to handle very large CheckPoints, (due to output formatting, not due to the calculations), but this is easily fixed. If Lizette wants to create an ISPF front-end and post that and the REXX code to the CBT site, I certainly have no objection. I was primarily a VM/CMS SysProg and ISPF is not what I would pick for a front-end! :-)> *----Begin CKPTSIZE REXX ----* /*-------------------------- CKPTSIZE REXX ---------------------------*/ /* Calculate the Size of the JES2 CheckPoint in 4K Records and Tracks */ /*--------------------------------------------------------------------*/ Arg opt . verbose = Abbrev('VERBOSE',opt,1) /*-------------------- JES2 CheckPoint Variables ---------------------*/ jesver = 'Z11' /* Current or New CheckPoint Version */ logsize = 1 /* Log Size CKPTDEF LOGSIZE= */ nodenum = 100 /* Number of Nodes NJEDEF NODENUM= */ largeds = 'ALLOWED' /* Large Data Sets SPOOLDEF LARGEDS= */ spoolnum = 32 /* Spool Volumes SPOOLDEF SPOOLNUM= */ tgspace = 250000 /* Track Groups SPOOLDEF TGSPACE=MAX= */ jobnum = 40000 /* Number of Jobs JOBDEF JOBNUM= */ joenum = 50000 /* Output Queues OUTDEF JOENUM= */ bertnum = '' /* Expansion Blocks CKPTSPACE BERTNUM= */ zjcnum = '' /* Zone Job Containers GRPDEF ZJCNUM= */ /*--------------------- JES2 CheckPoint Versions ---------------------*/ prer4 = 6 /* CheckPoint Version Pre OS/390 2.4 */ r4 = 7 /* CheckPoint Version OS/390 2.4-2.10 */ z2 = 8 /* CheckPoint Version z/OS V1.2 */ z11 = 9 /* CheckPoint Version z/OS V1.11 */ z22 = 10 /* CheckPoint Version z/OS V2.2 */ jesvers = 'Z22 Z11 Z2 R4 PRER4' /* CheckPoint Version List */ /*-------------------- JES2 CheckPoint Constants ---------------------*/ pfx = 24 /* Control Block Prefix Length */ sprf = 32 /* Spool Volumes Rounding Factor */ tgrf = 16288 /* Track Group Rounding Factor */ bpt = 12 /* Number of 4K Blocks per 3390 Track */ !4k = 4 * 1024 /* 4K = 4096 */ !4km1 = !4k - 1 /* 4K-1 = 4095 */ !32k = 32 * 1024 /* 32K = 32768 */ !32km1 = !32k - 1 /* 32K-1 = 32767 */ !64k = 64 * 1024 /* 64K = 65536 */ maxext = 20000 /* Maximum JQE Extensions */ maxsys = 32 /* Maximum Number of Systems */ bertmin = 399 /* Minimum Number of BERTs */ zjcdef = 1000 /* Default Number of ZJCs */ /*---------------------- JES2 Variable Defaults ----------------------*/ jesrel = Value(jesver) /* Set JES2 Release Number */ If DataType(jesrel,'W') = 0 Then Do Say 'Invalid CheckPoint Version Specified: ' jesver Say 'Valid CheckPoint Versions are: ' jesvers Exit 4 End If logsize = '' Then logsize = 1 If nodenum = '' Then nodenum = 1 If largeds = '' Then If jesrel >= z11 Then largeds = 'ALLOWED' Else largeds = 'FAIL' If spoolnum = '' Then spoolnum = 32 If tgspace = '' Then tgspace = 16288 If jobnum = '' Then jobnum = 1000 If joenum = '' Then joenum = Trunc(jobnum * 2.5) If bertnum = '' Then bertnum = Max((jobnum + (joenum + 3) % 4 + 100),bertmin) If zjcnum = '' Then zjcnum = zjcdef spoolnum = (spoolnum + sprf-1) % sprf * sprf /* Round Up */ tgs = (tgspace + tgrf-1) % tgrf * tgrf /* Round Up */ /*--------------------- JES2 CheckPoint Lengths ----------------------*/ tgmlen = 2 /* TGM Length */ jqtlen = 2 /* JQT Length */ scqlen = 16 /* SCQ Length */ If jesrel >= z2 Then Parse Value 4 !64k With jixlen jixnum . Else If jobnum < !32k Then Parse Value 2 !32k With jixlen jixnum . Else Parse Value 2 !64k-2 With jixlen jixnum . jqeblen = 96 /* JQE Base Length */ jqelen = jqeblen + spoolnum / 8 /* JQE Length */ If jesrel >= z11 Then jqxlen = 92 /* JQX Length */ Else jqxlen = 60 /* JQX Length */ pstlen = 4 /* PST Length */ joelen = 104 /* JOE Length */ joxlen = 32 /* JOX Length */ If jesrel >= z11 Then tgrlen = 5 /* TGR Length */ Else tgrlen = 3 /* TGR Length */ bertlen = 64 /* BERT Length */ zjclen = 160 /* ZJC Length */ rsolen = 1 /* RSO Length */ lcklen = 56 /* LCK Length */ daslen = 212 /* DAS Length */ nitclen = 32 /* NITC Length */ recylen = 136 /* RECY Length */ Select /* hctlen, kitnum in Master Record */ When jesrel >= z22 Then Parse Value 728 17 With hctlen kitnum . When jesrel >= z11 Then Parse Value 628 16 With hctlen kitnum . When jesrel >= z2 Then Parse Value 628 15 With hctlen kitnum . When jesrel >= r4 Then Parse Value 580 12 With hctlen kitnum . Otherwise Parse Value 580 10 With hctlen kitnum . End /* Select hctlen, kitnum in Master Record */ qselen = 200 /* QSE Length in Master Record */ kitlen = 36 /* KIT Length in Master Record */ ioclen = 4 /* I/O Control Length in Master Record */ If WordPos(largeds,'ALLOWED ALWAYS') > 0 Then dasxlen = 4 /* DAS Extension Length in Master Record */ Else dasxlen = 2 /* DAS Extension Length in Master Record */ /*--------------------- JES2 Checkpoint Records ----------------------*/ tgm = (tgs / 8 * tgmlen + pfx + !4km1) % !4k If jesrel >= z2 Then /* JQT Separated from Master in Z2 */ jqt = (maxext * jqtlen + pfx + !4km1) % !4k Else jqt = 0 scq = (maxsys * maxsys * scqlen + pfx + !4km1) % !4k jix = (jixnum * jixlen + pfx + !4km1) % !4k jqe = ((jobnum + 1) * jqelen + pfx + !4km1) % !4k If jesrel >= r4 Then jqx = (jobnum * jqxlen + pfx + !4km1) % !4k Else jqx = 0 pst = (joenum * pstlen + pfx + !4km1) % !4k joe = (joenum * joelen + 520 + pfx + !4km1) % !4k If jesrel >= z11 Then jox = (joenum * joxlen + pfx + !4km1) % !4k Else jox = 0 tgr = (maxsys * tgrlen * 255 + pfx + !4km1) % !4k If jesrel >= r4 Then bert = (bertnum * bertlen + pfx + !4km1) % !4k Else bert = 0 If jesrel >= z22 Then zjc = (zjcnum * zjclen + pfx + !4km1) % !4k Else zjc = 0 rso = (!32km1 * rsolen + pfx + !4km1) % !4k lck = (8 * lcklen + pfx + !4km1) % !4k das = (spoolnum * daslen + pfx + !4km1) % !4k If jesrel >= z2 Then nitc = (nodenum * nitclen + pfx + !4km1) % !4k Else nitc = 0 If jesrel >= z2 Then recy = (spoolnum * recylen + pfx + !4km1) % !4k Else recy = 0 ckpt = tgm + jqt + scq + jix + jqe + jqx + pst + joe + jox, + tgr + bert + zjc + rso + lck + das + nitc + recy /*------------------ JES2 Master CheckPoint Record -------------------*/ hct = hctlen qse = maxsys * qselen If jesrel >= z2 Then /* JQT Space Included in Master before Z2 */ jqtext = 0 Else jqtext = 4000 dasext = spoolnum * dasxlen kits = kitnum * kitlen ioctl = ckpt * ioclen mstr = (hct + qse + jqtext + dasext + kits + ioctl + !4km1) % !4k total = ckpt + mstr + logsize trk1adj = bpt - (mstr + logsize) /* Blocks to fill 1st Track */ If trk1adj < 0 Then trk1adj = 0 trks = (total + trk1adj + bpt-1) % bpt Say 'CheckPoint Sizes for JES2 Version' jesver If verbose Then Do Say 'TGM Size =' Right(tgm,5) Say 'JQT Size =' Right(jqt,5) Say 'SCQ Size =' Right(scq,5) Say 'JIX Size =' Right(jix,5) Say 'JQE Size =' Right(jqe,5) Say 'JQX Size =' Right(jqx,5) Say 'PST Size =' Right(pst,5) Say 'JOE Size =' Right(joe,5) Say 'JOX Size =' Right(jox,5) Say 'TGR Size =' Right(tgr,5) Say 'BERT Size =' Right(bert,5) Say 'ZJC Size =' Right(zjc,5) Say 'RSO Size =' Right(rso,5) Say 'LCK Size =' Right(lck,5) Say 'DAS Size =' Right(das,5) Say 'NITC Size =' Right(nitc,5) Say 'RECY Size =' Right(recy,5) End Else Say 'CKPT Size =' Right(ckpt,5) Say 'MSTR Size =' Right(mstr,5) Say 'LOG Size =' Right(logsize,5) Say 'Total =' Right(total,5)' Tracks =' trks Exit 0 *---- End CKPTSIZE REXX ----* Please note that "variables" like "!4k" start with an exclamation point (!). I would have liked to use just "4k", but REXX does not allow "variable" names that start with a number. -- Dale R. Smith ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
