Rexx Tools
Rexx Tools
Rexx Tools
______________________________________________________________________
|REXX TOOL |DESCRIPTION |
|___________|__________________________________________________________|
| | |
|ADDMEM |GENERATE SCL FOR ADDING ELEMENTS TO ENDEVOR. |
| | |
|ASMPROG |GENERATES THE DESCRIPTION OF THE ASSEMBLER PROGRAMS |
| | |
|ASMREPT |REPORT OF NO OF TIMES CHANGED AND NO OF CHGS DONE. |
| | |
|CHKSTAT |DISPLAYS THE JOBS THAT ARE IN THE HELD QUEUE |
| | |
|CIRCREXX |ABC CIRC STAT CONVERSION PROJECT |
| | |
|COBTOEZ |CONVERT COBOL COPYBOOK TO EASYTRIEVE COPYBOOK |
| | |
|COMMASPT |REFORMAT DATA DELIMITED BY COMMA (BATCH MODE) |
| | |
|COPYMEM |COPY MEMBERS FROM A SOURCE PDS TO DEST PDS (ONLINE) |
| | |
|CREADSN |CREATES PDS FOR NEWMAG SETUP |
| | |
|DELMEM |DELETES MEMBERS OF A PDS WITH PATTERNS |
| | |
|DRPSFP |DISPLAY DR, PS AND FP PARMS OF A JCL IN PRODUCTION |
| | |
|DSCOPY |MANIPULATE A DATASET USING COBOL COPYBOOK |
| | |
|DSNLIST |DISPLAYS DSN LIST MATCHING A PATTERNS |
| | |
|ENDVUTIL |MAIN PROGRAM FOR ENDEVOR UTILITY |
| | |
|FACTRIAL |CALCULATE FACTORIAL OF A NUMBER - RECURSION |
| | |
|FILRDTMP |TEMPLATE FOR READING A FILE AND WRITING OUTPUT |
| | |
|GDGUTIL |GENERATE JOB TO CREATE GDGS |
| | |
|JC |TO CUT LINES FROM AN EDIT SESSION |
| | |
|JCLCK |JCL CHECK UTILITY |
| | |
|JCLGEN |GENERATE JCLS BY FILE TAILORING A SKELETON |
| | |
|JCLINFO |CREATE ACCOUNTING INFO FOR JCLS |
| | |
|JHSREPT |GENERATE PROGRAM STATISTICS FROM JHS OUTPUT |
| | |
|JP |PASTE LINES TO EDIT SESSION WHICH ARE CUT USING JCUT |
| | |
|KEYCHANG |CHANGE DEFAULT FUNCTIONS OF FUNCTION KEYS |
| | |
|LIMIT |DISPLAY GDG LIMIT |
| | |
|NXTSTR |FIND THE NEXT OCCURANCE OF THE STRING AT CURSOR POS |
| | |
|PBAR |CALCULATE TIME ELAPSED BETWEEN A TASK |
| | |
|PGMKEY |USE A FUNCTION KEY FOR MULTIPLE PURPOSE |
| | |
|PRODCNT |THIS TOOL GENERATES THE PRODUCTION COUNTS FOR PROGRAMS |
| | |
|RECURSE |DETERMINING PROGRAM CALLS USING RECURSION CONCEPT |
| | |
|RETMEM |GENERATE SCL FOR RETRIEVING ELEMENTS FROM ENDEVOR. |
| | |
|REXXCHAT |CHAT UTILITY |
| | |
|REXXMAC |PROCESS AN ISPF EDIT MACRO ON EVERY MEMBER OF A PDS |
| | |
|SUPRC |SUPERCE UTILITY |
| | |
|TABLEDEM |DEMONSTRATE ISPF TABLE FUNCTIONS |
| | |
|UTILREXX |GENERATE SYSINS TO CREATE GDGS |
| | |
|VENDOR |VENDOR SETUP UTILITY |
| | |
|VERSION |DISPLAY LATEST VERSION OF A GDG BASE |
| | |
|VERT |GENERATE VERTICAL TRACEABILTY MATRIX |
| | |
|WRPCOND |GENERATE COBOL STATEMENTS FOR WRAP INCLUSION CONDITIONS |
| | |
|WRPVAR |GENERATE COBOL VAR DECLARATION FOR WRAP INCLUSIONS |
| | |
|ZIPGEN |GENERATE ZIP CODES TO BE USED IN COBOL PROGRAMS |
|___________|__________________________________________________________|
------- ADDMEM -------
ADDRESS TSO
MSGVAL = MSG('OFF')
LSTDS = ""
OUTDS = ""
SRCEDS = ""
P = ""
A = ""
E = "E"
COMMENTS = ""
ERR = "<<< ENTER THE REQUIRED INPUTS !!! >>>"
ADDRESS ISPEXEC
"LIBDEF ISPPLIB DATASET ID('M#T053.BALU.REXX.PANEL')"
"ADDPOP "
"DISPLAY PANEL(ADDMEM)"
SELECT
END
END
MSGVAL = MSG(MSGVAL)
EXIT
EXEC_PGM :
ADDRESS TSO
"ALLOC DD(LSTFILE) DA('"LSTDS"') SHR REU"
"EXECIO * DISKR LSTFILE (STEM LST. FINIS"
"FREE F(LSTFILE)"
O = 1
DO I = 1 TO LST.0
ELMT = STRIP(SUBSTR(LST.I,1,10))
ENV = STRIP(SUBSTR(LST.I,12,4))
SYS = STRIP(SUBSTR(LST.I,24,8))
SUB = STRIP(SUBSTR(LST.I,33,8))
TYP = STRIP(SUBSTR(LST.I,43,10))
/* WRITE TO OUTPUT */
ADDRESS TSO
"ALLOC DD(OUTFILE) DA('"OUTDS"') SHR REU"
"EXECIO * DISKW OUTFILE (STEM OUT. FINIS"
IF RC \= 0 THEN DO
ERR = "USE PDS(MEM) (OR) USE EXST PS FOR O/P"
RETURN
END
ADDRESS TSO
"FREE F(OUTFILE)"
IF E = "E" THEN DO
ADDRESS ISPEXEC
"EDIT DATASET('"OUTDS"')"
END
IF E = "S" THEN DO
USR = USERID()
ADDRESS ISPEXEC
"VPUT (USR,OUTDS) PROFILE"
"LIBDEF ISPSLIB DATASET ID('M#T053.BALU.REXX.SKELETON')"
ADDRESS TSO
"ISPEXEC LIBDEF ISPFILE"
"ALLOC REUSE FI(SELFILE) DA('MTAT.TATA.WORKAREA') SHR"
"ISPEXEC LIBDEF ISPFILE LIBRARY ID(SELFILE)"
"ISPEXEC FTOPEN"
"ISPEXEC FTINCL ENDBTCH"
"ISPEXEC FTCLOSE NAME(ENDBTCH)"
"FREE FI(SELFILE)"
ADDRESS TSO
"SUBMIT 'MTAT.TATA.WORKAREA(ENDBTCH)'"
END
ERR = "<<< SCL GENERATION COMPLETE !! >>>"
RETURN
------- ASMPROG -------
ADDRESS ISPEXEC
STOP = 0
K = 1
DO WHILE STOP = 0
MEM = STRIP(MEM)
PDSMEM = SRCHLIB ||"(" || MEM || ")"
RECORD = " "
ADDRESS TSO
"ALLOC DD(PRGFILE) DA('"PDSMEM"') SHR REU"
"EXECIO * DISKR PRGFILE (STEM PRG. FINIS"
"FREE F(PRGFILE)"
DO I = 1 TO PRG.0
DESC = SUBSTR(PRG.I,POS("TITLE",PRG.I)+6,LENGTH(PRG.I)-24)
J = I + 1
DESC = STRIP(DESC)
RECORD = LEFT(MEM,10) || DESC
LEAVE
END
END
ADDRESS ISPEXEC
"LMMLIST DATAID("PDSID") MEMBER(MEM) OPTION(LIST)"
STOP = RC
END
ADDRESS TSO
"ALLOC DD(OUTFILE) DA("OUTDS") SHR REU"
"EXECIO * DISKW OUTFILE (STEM OUTREC. FINIS"
"FREE F(OUTFILE)"
ADDRESS ISPEXEC
"LMMLIST DATAID("PDSID") OPTION(FREE)"
"LMCLOSE DATAID("PDSID")"
"LMFREE DATAID("PDSID")"
EXIT
------- ASMREPT -------
ADDRESS TSO
"ALLOC DD(LSTFILE) DA('"LSTDS"') SHR REU"
"EXECIO * DISKR LSTFILE (STEM LST. FINIS"
"FREE F(LSTFILE)"
O = 1
DO I = 1 TO LST.0
PROGRAM = LEFT(STRIP(SUBSTR(LST.I,11,8)),10)
/* INITIALIZE */
Y2000C = RIGHT(0,5)
Y2001C = RIGHT(0,5)
Y2002C = RIGHT(0,5)
Y2003C = RIGHT(0,5)
Y2004C = RIGHT(0,5)
Y2000N = RIGHT(0,5)
Y2001N = RIGHT(0,5)
Y2002N = RIGHT(0,5)
Y2003N = RIGHT(0,5)
Y2004N = RIGHT(0,5)
END
ELSE
DO
IF SUBSTR(LST.I,30,2) = "00" THEN
DO
Y2000C = RIGHT(Y2000C + STRIP(SUBSTR(LST.I,57,4)) ,
+ STRIP(SUBSTR(LST.I,67,4)),5)
Y2000N = RIGHT(Y2000N + 1,5)
END
IF SUBSTR(LST.I,30,2) = "01" THEN
DO
Y2001C = RIGHT(Y2001C + STRIP(SUBSTR(LST.I,57,4)) ,
+ STRIP(SUBSTR(LST.I,67,4)),5)
Y2001N = RIGHT(Y2001N + 1,5)
END
IF SUBSTR(LST.I,30,2) = "02" THEN
DO
Y2002C = RIGHT(Y2002C + STRIP(SUBSTR(LST.I,57,4)) ,
+ STRIP(SUBSTR(LST.I,67,4)),5)
Y2002N = RIGHT(Y2002N + 1,5)
END
IF SUBSTR(LST.I,30,2) = "03" THEN
DO
Y2003C = RIGHT(Y2003C + STRIP(SUBSTR(LST.I,57,4)) ,
+ STRIP(SUBSTR(LST.I,67,4)),5)
Y2003N = RIGHT(Y2003N + 1,5)
END
IF SUBSTR(LST.I,30,2) = "04" THEN
DO
Y2004C = RIGHT(Y2004C + STRIP(SUBSTR(LST.I,57,4)) ,
+ STRIP(SUBSTR(LST.I,67,4)),5)
Y2004N = RIGHT(Y2004N + 1,5)
END
END
END
/* WRITE THE LAST PROGRAM */
OUTREC.O = PROGRAM || " 2000 " || Y2000C || " " || Y2000N
O = O + 1
OUTREC.O = PROGRAM || " 2001 " || Y2001C || " " || Y2001N
O = O + 1
OUTREC.O = PROGRAM || " 2002 " || Y2002C || " " || Y2002N
O = O + 1
OUTREC.O = PROGRAM || " 2003 " || Y2003C || " " || Y2003N
O = O + 1
OUTREC.O = PROGRAM || " 2004 " || Y2004C || " " || Y2004N
ADDRESS TSO
"ALLOC DD(OUTFILE) DA('"OUTDS"') SHR REU"
"EXECIO * DISKW OUTFILE (STEM OUTREC. FINIS"
"FREE F(OUTFILE)"
/* THIS REXX DISPLAYS THE JOBS THAT ARE IN THE HELD QUEUE */
/* FOR STATUS OF OTHER QUEUE(S) CHANGE PARM VALUES ACCORDINGLY */
ADDRESS ISPEXEC "SELECT PGM(ISFISP) PARM(H) NEWAPPL(TCS)"
EXIT
------- CIRCREXX -------
/*------------------*/
/* INPUT SECTION :- */
/*------------------*/
/*-----------------------------------------*/
/* IF OUTPUT DATASET NOT FOUND THEN CREATE */
/*-----------------------------------------*/
ADDRESS TSO
"ALLOC DD(LSTFILE) DA('"LSTDS"') SHR REU"
"EXECIO * DISKR LSTFILE (STEM LST. FINIS"
"FREE F(LSTFILE)"
DO I = 3 TO LST.0
/*------------------------*/
/* PARSING THE INPUT FILE */
/*------------------------*/
USRID = USERID()
MG = SUBSTR(LST.I,1,2)
ISSUE = SUBSTR(LST.I,10,4)
WEEK = SUBSTR(LST.I,16,2)
REGION = STRIP(SUBSTR(LST.I,21,6))
FMSLIR = STRIP(SUBSTR(LST.I,28,8))
SCSSLIR = SUBSTR(LST.I,38,1)
ELM = MG || ISSUE || WEEK
TYPE = " "
/*------------------------*/
/* TAILORING THE SKELETON */
/*------------------------*/
ADDRESS ISPEXEC
"VPUT (USRID,MG,ISSUE,WEEK,REGION,FMSLIR,SCSSLIR,TYPE)"
"LIBDEF ISPSLIB DATASET ID('"SKELDS"')"
ADDRESS TSO
"ISPEXEC LIBDEF ISPFILE"
"ALLOC REUSE FI(SELFILE) DA('"OUTDS"') SHR"
"ISPEXEC LIBDEF ISPFILE LIBRARY ID(SELFILE)"
"ISPEXEC FTOPEN"
"ISPEXEC FTINCL "SKELMEM""
"ISPEXEC FTCLOSE NAME("ELM")"
"FREE FI(SELFILE)"
END
/*---------------*/
/* END OF PRORAM */
/*---------------*/
EXIT
------- COBTOEZ -------
/*--REXX---------------------------------------------------------------*
* *
* *
* COBOL Copybook to EZ-Trieve Data Definitions. *
* *
* Posted by : Balu Subramoniam.V. *
* *
* "TSO COB2EZ member" Get COBOL copybook from: */
dfDSN = 'MAGP.ENDEVOR.COBCOPYP'
/* *
* "TSO COB2EZ 'dsn(member)'" as-is. *
* *
* "TSO COB2EZ dsn(member)" Adds UserID high qualifier to dsn. *
* *
* "TSO COB2EZ dsn... +n" Adds "n" to all starting locations. *
* *
* "TSO COB2EZ dsn... WORK" Generate WORKING-STORAGE lines *
* instead of FILE data lines. *
* *
* "TSO COB2EZ dsn... HDR" Generate HEADING() parms based on *
* name of variable. *
* *
* "TSO COB2EZ dsn... HDR2" Generate HEADING() parms starting at *
* node 2 of variable name. *
* *
* The Easytrieve output lines will be written to */
tmpDSN = userid()".TEMP.EZDATA"
/* *
* All input COBOL lines will be displayed on the screen. *
* *
* *
* If only one COBOL structure is present the generated *
* EZ-Trieve lines will also be displayed on the screen. *
* *
* *
* If first COBOL data line is not an "01" level then a *
* "01 01-FILLER." line is inserted. *
* *
* *
* If multiple "01" data structures are in the input they all *
* will be processed. *
* *
*--------------------------------------------------------------------*
Once this data has been tabled the "hierarchy", starting with
the 01 level, is "traversed" accumulating the lengths of a data
items children. This may be a recurrsive process since a child
of an item can be a group that must first be traversed to determine
its length (and so-on for children of the children). The info
gleaned during this traversal is used to generate EZ-trieve lines.
---------------------------------------------------------------------*/
copybook = Copybook(copybook)
IF EDITRC = 20 THEN
SOURCE = copybook
ELSE DO
"ISREDIT (SRCDSN) = DATASET"
"ISREDIT (SRCMEM) = MEMBER"
SOURCE = "'"SRCDSN"("SRCMEM")'"
END
recsIn = 0 /* wjgt */
fillerTB = 0 /* tie breaker for making unique FILLER labels */
CALL InitializeVariables
CALL OpenAllFiles
/* "CLEAR" */
/*-------------------------------------------------------*/
usage. = 0
EOF = 'ff'x
firstRecord = 1
FILLER01 = 0
justOneCopybook = 1
DO UNTIL s = EOF
CALL DoCOBOLstructure
CALL InitializeVariables /* Maybe multiple */
FILLER01 = 1 /* "01" date structures. */
firstRecord = 1
END
CALL CloseAllFiles
EXIT
/*-------------------------------------------------------*/
DoCOBOLstructure:
IF s = EOF THEN
LEAVE /* >>>>>------> */
v = '' /* wjgk */
holdS = s
PARSE VAR s rlvl nm s
/*-------------- start wjgi ----------------*/
IF rlvl = 1 THEN
IF WORDPOS('REDEFINES', s) > 0 THEN
DO
SAY '...ABEND - 01 level REDEFINES not supported'
EXIT 12
END
/*-------------- end wjgi ------------------*/
rlvl = STRIP(rlvl, Leading, 0) /* wjgb */
IF firstRecord THEN /* When no 01 level present then */
IF rlvl <> 1 THEN /* insert "01 FILLER." record. */
DO
FILLER01 = 1
rlvl = 1
nm = '01-FILLER'
END
ELSE
NOP
ELSE /* NOT the first record */
IF rlvl = 1 THEN /* but level is "01". */
DO
justOneCopybook = 0
LEAVE /* >>>>>------> */
END
firstRecord = 0
nm = Name(nm)
lineNo = line.0 + 1
line.0 = lineNo
lineNo2nm.lineNo = nm
nm2lineNo.nm = lineNo
SELECT
WHEN lvl < rlvl THEN
DO
lvl = rlvl
ord = ord + 1
ord2lvl.ord = lvl
lvl2ord.lvl = ord
ord2nm.ord = nm
nm2ord.nm = ord
parentIndex = ord - 1
END
WHEN lvl = rlvl THEN
DO
ord2nm.ord = nm
nm2ord.nm = ord
parentIndex = ord - 1
END
OTHERWISE
DO
/*------------ start wjgi ----------------*/
DO lookForBadStepDown = 1
DO i = ord - 1 TO 1 BY -1
IF rlvl = ord2lvl.i THEN
LEAVE lookForBadStepDown
END
SAY '...ABEND - invalid level step down: "'holdS'"'
EXIT 12
END
/*-------------- end wjgi -----------------*/
lvl = rlvl
ord = lvl2ord.lvl
ord2nm.ord = nm
nm2ord.nm = ord
parentIndex = ord - 1
END
END
pNm = ord2nm.parentIndex
c.pNm = c.pNm nm
isOccursLvlItself.nm = 0 /* wjgj */
isOccursLvl.nm = 0 /* wjgg */
p.nm = pNm /* wjgg */
length = 0
ln.nm = 0
beenThere. = 0
usage = 'DISPLAY'
occurs = 1
redefines = ''
dataType = 'A'
scale = 0
reservedWordList = 'USAGE BINARY COMP COMPUTATIONAL' ,
'COMP-3 COMPUTATIONAL-3' ,
'COMP-4 COMPUTATIONAL-4' ,
'PACKED-DECIMAL DISPLAY' ,
/* wjgh */ 'DEPENDING ON JUSTIFIED JUST RIGHT' ,
/* wjgq */ 'REDEFINES' ,
'PIC PICTURE OCCURS ASCENDING DESCENDING'
dataType.nm = dataType
scale.nm = scale
END
IF justOneCopybook THEN
/* SAY '--------------------------' */ NOP
PUSH ' '
"EXECIO 1 DISKW FILEO"
firstTimeSw = 1
DO i = 1 TO line.0
IF line.i <> '' THEN
DO
IF generateWorkingStorageLines THEN
line.i = WSline(line.i, i)
ELSE
line.i = MaybeOccurs(line.i, i)
IF generateHeaderLine = 1 | ,
generateHeaderLine = 2 THEN DO
/* PARSE VAR line.i HDRVAR . wjgh */
HDRVAR = lineNo2nm.i /* wjgk */
IF generateHeaderLine = 1 THEN
PARSE VAR HDRVAR HDR1 '-' REST
ELSE
PARSE VAR HDRVAR . '-' HDR1 '-' REST
PARSE VAR REST HDR2 '-' REST
PARSE VAR REST HDR3 '-' REST
PARSE VAR REST HDR4 '-' REST
HDRLINE = COPIES(" ",10)"HEADING ('"HDR1"'"
IF HDR2 <> "" THEN HDRLINE = HDRLINE" '"HDR2"'"
IF HDR3 <> "" THEN HDRLINE = HDRLINE" '"HDR3"'"
IF HDR4 <> "" THEN HDRLINE = HDRLINE" '"HDR4"'"
HDRLINE = HDRLINE")"
line.i = LEFT(line.i, 70) "+"
END
/* IF justOneCopybook THEN DO
* SAY line.i
* SAY HDRLINE
* END */
PUSH line.i
"EXECIO 1 DISKW FILEO"
IF lineNo2nm.i <> '' THEN /* wjgk */
IF generateHeaderLine = 1 |,
generateHeaderLine = 2 THEN DO
PUSH HDRLINE
"EXECIO 1 DISKW FILEO"
END
END
END
RETURN
MaybeContinuedLine:
RETURN
/*-------------------------------------------------------*/
/*-------------------------------------------------------*/
ARG nm
DO WHILE |isOccursLvlItself.nm
nm = p.nm
END
RETURN nm
/*-------------------------------------------------------*/
SELECT
WHEN usage = 'BINARY' THEN
DO
IF length > 4 THEN
length = 4
ELSE
length = 2
END
WHEN usage = 'PACKED-DECIMAL' THEN
length = (length + 2) % 2
WHEN usage = 'DISPLAY' THEN
NOP
END
RETURN
/*-------------------------------------------------------*/
i = 'Redefines Clause'
IF beenThere.i THEN
RETURN 0
PARSE VAR s w tail
IF w = 'REDEFINES' THEN
DO
s = tail
PARSE VAR s w tail
redefines = w
s = tail
beenThere.i = 1
RETURN 1
END
RETURN 0
ARG s
PARSE VAR s a RENAMES b THRU c d
IF d <> '' THEN
RETURN 0
IF RENAMES <> 'RENAMES' THEN
RETURN 0
IF THRU = '' THEN
c = b
ELSE
IF THRU <> 'THRU' & THRU <> 'THROUGH' THEN
RETURN 0
renamesList = renamesList a
raw.a = a b c
RETURN 1
/*-------------------------------------------------------*/
i = 'Occurs Clause'
IF beenThere.i THEN
RETURN 0
saveS = s
PARSE VAR s w tail
IF w = 'OCCURS' THEN
DO
s = tail
PARSE VAR s w tail
IF VERIFY(w, '0123456789') = 0 THEN
/* IF w > 0 THEN */ IF 1 THEN
DO
occurs = w
s = tail
PARSE VAR s w tail
IF w = 'TIMES' THEN
s = tail
ELSE
IF w = 'TO' THEN
DO
s = tail
PARSE VAR s w tail
IF VERIFY(w, '0123456789') = 0 THEN
DO
occurs = w
s = tail
PARSE VAR s w tail
IF w = 'TIMES' THEN
s = tail
END
ELSE
DO
s = saveS
RETURN 0
END
END
beenThere.i = 1
RETURN 1
END
END
s = saveS
RETURN 0
/*-------------------------------------------------------*/
i = 'Picture Clause'
IF beenThere.i THEN
RETURN 0
saveS = s
PARSE VAR s w tail
IF |NumPic() THEN
IF |CharPic() THEN
DO
s = saveS
RETURN 0
END
beenThere.i = 1
RETURN 1
/*-------------------------------------------------------*/
i = 'Usage Clause'
IF beenThere.i THEN
RETURN 0
saveS = s
PARSE VAR s w tail
IF w = 'USAGE' THEN
DO
s = tail
IF Is() THEN
NOP
PARSE VAR s w tail
END
usage = usage.w
s = tail
beenThere.i = 1
RETURN 1
/*-------------------------------------------------------*/
/*-------------------------------------------------------*/
s = saveS
RETURN 0
/*-------------------------------------------------------*/
/*-------------------------------------------------------*/
RETURN scale
/*-------------------------------------------------------*/
saveS = s
PARSE VAR s w tail
IF w = 'PICTURE' | w = 'PIC' THEN
DO
s = tail
PARSE VAR s w tail
IF CharLength(w) THEN
DO
s = tail
RETURN 1
END
END
s = saveS
RETURN 0
/*-------------------------------------------------------*/
ARG s
IF VERIFY(s,'AXZ9B0/()012345678,.-') = 0 THEN
DO
length = 0
DO WHILE POS('(', s) > 0
PARSE VAR s a '(' count ')' s
length = length + LENGTH(a) - 1 + count
END
length = length + LENGTH(s)
RETURN 1
END
ELSE
RETURN 0
/*------------------------------------------------------------*/
PARSE ARG n
/* startingLoc = loc+1-lnTot
*/ startingLoc = loc.n + 1
loc = loc + lnTot * (occurs.n - 1)
CALL GenGroupEZline
/*-------------------------------------------------------------------*/
GenGroupEZline:
lineNo = nm2lineNo.n
IF substr(n, 1, 1) <> 'ff'x THEN /* NOT a FILLER line. */
DO
nl = MAX(30, LENGTH(n))
IF scale.n = 0 THEN
scale.n = ''
IF occurs.n = 1 THEN
occursDisplay = ''
ELSE
occursDisplay = 'OCCURS' occurs.n
IF indent THEN
line.lineNo = ,
LEFT(COPIES(' ', MIN(12, 2*(nm2ord.n - 1))) n, nl+12) ,
|| RIGHT(startingLoc,4) RIGHT(lnTot, 4) ,
dataType.n scale.n occursDisplay
ELSE
line.lineNo = ,
LEFT(n,nl) ,
RIGHT(startingLoc,4) RIGHT(lnTot, 4) ,
dataType.n scale.n occursDisplay
END
RETURN
/*-------------------------------------------------------------------*/
GenElementaryEZline:
lineNo = nm2lineNo.n
/* IF substr(n, 1, 1) <> 'ff'x THEN wjgq */
IF substr(n, 1, 1) <> 'ff'x | , /* wjgq */
v.n |== '' THEN /* wjgq */
DO
nl = MAX(30, LENGTH(n))
IF scale.n = 0 THEN
scale.n = ''
IF occurs.n = 1 THEN
occursDisplay = ''
ELSE
occursDisplay = 'OCCURS' occurs.n
IF indent THEN
line.lineNo = ,
LEFT(COPIES(' ', MIN(12, 2*(nm2ord.n - 1))) n, nl+12) ,
|| RIGHT(loc+1,4) RIGHT(ln.n, 4) ,
dataType.n scale.n occursDisplay
ELSE
line.lineNo = ,
LEFT(n,nl) ,
RIGHT(loc+1,4) RIGHT(ln.n,4) ,
dataType.n scale.n occursDisplay
END
RETURN
/*-------------------------------------------------------------------*/
IF nm = 'FILLER' THEN
DO
fillerTB = fillerTB + 1
/* nm = 'ff'x || D2C(fillerTB, 2) || 'FILLER'
*/ nm = 'ff'x || fillerTB || 'FILLER' /* wjga */
END
ELSE
IF LENGTH(SPACE(TRANSLATE(nm, '40'x, ':'), 0)) + 2 = ,
LENGTH(nm) THEN
DO
PARSE VAR nm a ':' b ':' c
IF varSub <> '' THEN
nm = a || varSub || c
ELSE
IF c <> '' THEN
nm = a || '&' || b || '.' || c
ELSE
nm = a || '&' || b
END
RETURN nm
/*-------------------------------------------------------------------*/
CloseAllFiles:
RETURN
/*-------------------------------------------------------------------*/
OpenAllFiles:
userID = USERID()
RETURN
/*-------------------------------------------------------------------*/
r = ''
DO FOREVER
/* Begin wjge */
IF comment THEN
DO
lineNo = line.0 + 1
line.0 = lineNo
line.lineNo = aster || record
ITERATE /* <-------<<<<< */
END
ELSE
/* end wjge */
ITERATE /* <-------<<<<< */
if aster='+' then return eof
END
r = STRIP(r record)
IF SUBSTR(REVERSE(r), 1, 1) = '.' THEN
IF WORD(r, 1) = 88 THEN
r = ''
ELSE
RETURN STRIP(r, 'Trailing', '.')
END
/*-------------------------------------------------------*/
i = 'Indexed By Clause'
IF beenThere.i THEN
RETURN 0
RETURN 0
i = 'Depending On Clause'
IF beenThere.i THEN
RETURN 0
PARSE VAR s w s
beenThere.i = 1
RETURN 1
END
RETURN 0
/*-------------------------------------------------------*/
i = 'Ascending-Descending Clause'
IF beenThere.i THEN
RETURN 0
RETURN 0
/*-------------------------------------------------------*/
i = 'Justified Clause'
IF beenThere.i THEN
RETURN 0
RETURN 0
/*-------------------------------------------------------*/
i = 'Value Clause'
IF beenThere.i THEN
RETURN 0
RETURN 0
/*-------------------------------------------------------*/
v = "'" /* wjgk */
quoteCnt = 1
s = SUBSTR(s, 2)
DO WHILE quoteCnt//2 = 1 | SUBSTR(s, 1, 1) = "'"
IF SUBSTR(s, 1, 1) = "'" THEN
quoteCnt = quoteCnt + 1
/* s = SUBSTR(s, 2) wjgk */
PARSE VAR s vByte +1 s /* wjgk */
v = v || vByte /* wjgk */
END
s = STRIP(s)
v = STRIP(SUBSTR(v,1,LENGTH(v)-1), 'Trailing') || "'"
IF v == "''" THEN
v = "' '"
RETURN
/*-------------------------------------------------------*/
ARG dsn
saveArg = dsn /* wjgm */
/* wjgd */
dsn = ' 'dsn' '
comment = 0
IF POS(' COMMENT ', ' 'dsn' ') > 0 THEN
DO
comment = 1
PARSE VAR dsn a ' COMMENT ' b
dsn = SPACE(a b)
END
ELSE
dsn = SPACE(dsn)
/* wjge */
dsn = ' 'dsn' '
indent = 0
IF POS(' INDENT ', ' 'dsn' ') > 0 THEN
DO
indent = 1
PARSE VAR dsn a ' INDENT ' b
dsn = SPACE(a b)
END
ELSE
dsn = SPACE(dsn)
msg = SYSDSN(dsn)
IF msg = 'OK' THEN
RETURN dsn
SAY '...'msg
EXIT 12
/*-------------------------------------------------------*/
InitializeVariables:
p. = '' /* "parent" */
c. = '' /* "children" list */
ln. = 0 /* elementarty data item length */
loc = 0 /* current pointer location - march from start */
loc = offset
occurs. = 1 /* data item OCCURS number */
redefines. = '' /* data item being redefined */
scale. = 0 /* decimal places */
nm. = 0 /* has name been defines? */
renamesList = ''
RETURN
/*-------------------------------------------------------*/
Documentation:
/* "CLEAR" */
"CLRSCRN"
SAY
SAY " C O B O L C o p y b o o k t o E a s y t r i e v e"
SAY
SAY " COMMAND SYNTAX:"
SAY
SAY " %COB2EZ -Get COBOL copybook from current",
"Edit session."
SAY " TSO COB2EZ member -Get COBOL copybook from default:"
SAY " '"dfDSN"(member)'. "
SAY " TSO COB2EZ 'dsn(member)' -as is."
SAY " TSO COB2EZ dsn(member) -Adds UserID high qualifier to dsn."
SAY " TSO COB2EZ dsn... +n -Adds 'n' to all starting locations."
SAY " TSO COB2EZ dsn... WORK -Generate WORKING-STORAGE lines"
SAY " instead of FILE data lines."
SAY " TSO COB2EZ dsn... INDENT -Indent variable names as in "
SAY " the COBOL copybook."
SAY " TSO COB2EZ dsn... COMMENT -Include copybook 'comment' lines."
SAY " TSO COB2EZ dsn... HDR -Generate HEADING() parms based on"
SAY " name of variable. "
SAY " TSO COB2EZ dsn... HDR2 -Generate HEADING() parms starting"
SAY " at node 2 of variable name"
SAY
SAY
SAY
SAY
SAY " NOTES:"
SAY
SAY " -The Easytrieve output lines will always be written to",
"'"tmpDSN"'."
SAY
SAY " -If the first COBOL data line is not an 01 level then a",
"'01-FILLER' line"
SAY " is inserted."
SAY
SAY " -If multiple 01 data structures are in the input they will",
"all be processed."
SAY
EXIT
------- COMMASPT -------
ADDRESS TSO
"ALLOC DA ('"INPDS"') F(INPDD) SHR REUSE "
"EXECIO * DISKR INPDD (STEM INPUT. FINIS"
"EXECIO 0 DISKW OUTDD (OPEN"
COUNT = 0
DO I = 1 TO INPUT.0
/**********************************************************************/
/* LAYOUT OF THE INPUT DATASET */
/**********************************************************************/
PARSE VAR INPUT.I VAR1 ',' VAR2 ',' VAR3 ',' VAR4 ',' VAR5 ',' ,
VAR6 ',' VAR7 ',' VAR8 ',' VAR9 ',' VAR10
/**********************************************************************/
/* LAYOUT OF THE OUTPUT DATASET */
/**********************************************************************/
COUNT = COUNT + 1
END
SAY '**************************************************************'
SAY ' COMMASPT - COUNT DESCRIPTION '
SAY '**************************************************************'
SAY ' '
SAY 'NO. OF INPUT RECS : ' INPUT.0
SAY 'NO. OF OUTPUT RECS : ' COUNT
SAY ' '
SAY '**************************************************************'
"FREE F(INPDD)"
"FREE F(OUTDD)"
EXIT
------- COPYMEM -------
ADDRESS TSO
DROP INPUT.
IF INPUT.0 = 0 THEN
DO
SAY ' EMPTY '
EXIT
END
OUTREC. = ''
EMPREC. = ''
CREREC. = ''
GDGREC. = ''
J = 0 ; M = 0 ; N = 0 ; CKPT = 0
DDCNT = 0; CRECNT = 0
DO K = 1 TO INPUT.0
LT= ' ' ; X = 0;
DSN = STRIP(SUBSTR(INPUT.K,1,9)) /* <- MEMBER */
DEST = "'"||DESTDS||"("||DSN||")'"
IF LENGTH(DSN) = 0 THEN ITERATE
DSN = STRIP(TRANSLATE(DSN))
DEST= STRIP(TRANSLATE(DEST))
ODSN = "'"SRCE"("DSN")'"
IF SYSDSN(ODSN)\= OK THEN SAY DSN || " - NOT FOUND"
IF SYSDSN(ODSN) = OK THEN DO
XDSN = ODSN
NDSN = DEST
IF SYSDSN(NDSN)= MEMBER NOT FOUND THEN
DO
ERR = ' FILE FOUND AND COPIED'
ADDRESS TSO
"ALLOC F(OUTFILE) DA ("NDSN") SHR REUSE"
QUEUE "END NOSAVE"
"EDIT "NDSN" NONUM OLD DATA "
ADDRESS TSO
"ALLOC F(INFILE) DA ("XDSN") SHR REUSE"
"NEWSTACK"
"EXECIO * DISKR INFILE (FINIS"
NUMREC = QUEUED()
"EXECIO" NUMREC "DISKW OUTFILE (FINIS"
"DELSTACK"
"FREE DD (INFILE) NOHOLD"
"FREE DD (OUTFILE) NOHOLD"
OUTREC. = ''
EMPREC. = ''
CREREC. = ''
GDGREC. = ''
END
END
END
RETURN
------- CREADSN -------
RETCD = 0
ADDRESS ISPEXEC
"VGET (MAGCODE,SUBSYS) PROFILE"
IF RC > 0 then
DO
MAGCODE = ''
ERR = 'ENTER THE NEW MAG CODE (FOR NOW PLS USE YY)'
END
ADDRESS ISPEXEC
"LIBDEF ISPPLIB DATASET ID('M#T053.BALU.REXX.PANEL')"
"ADDPOP "
"DISPLAY PANEL(COPYPAN) "
CALL CRE_DSN
ADDRESS ISPEXEC
"DISPLAY PANEL(GDGUTIL)"
END
ADDRESS ISPEXEC
"REMPOP"
EXIT (RETCD)
ADDRESS TSO
"ALLOC DA('MTAT.NEWMAG.SUBSYS.COPY(DSNS)') F(INPDD) SHR REUSE"
"EXECIO * DISKR INPDD (STEM INPUT. FINIS"
"FREE DD (INPDD) NOHOLD"
DO K = 1 TO INPUT.0
PARSE VAR INPUT.K SUBSYSTEM JCL JCLCHK ,
SOURCE SYSIN PANEL SKEL PROC CLIST RUNDOC SUPERC MSG SYSIN1
/* READ THE INPUT JCLCHK FILE TO A BUFFER AND FREE THE FILE */
"ALLOC DA('APCP.ENDEVOR.JCLP("MEM")') F(INPDD) SHR REUSE"
"EXECIO * DISKR INPDD (STEM INPUT. FINIS"
"FREE DD (INPDD) NOHOLD"
SAY DR IS SUBSTR(INPUT.1,22,2)
SAY FP IS SUBSTR(INPUT.1,24,2)
SAY PS IS SUBSTR(INPUT.1,32,2)
------- DSCOPY -------
ADDRESS TSO
MSGVAL = MSG('OFF')
COPYDS = ""
COPYBK = ""
DATAST = ""
OUTDS = ""
OUTFLD = ""
F = ' '
LTH = 1
ERR = "<<< ENTER THE REQUIRED INPUTS PLEASE >>>"
ADDRESS ISPEXEC
"LIBDEF ISPPLIB DATASET ID('M#T053.BALU.REXX.PANEL')"
"ADDPOP "
"DISPLAY PANEL(DPANEL)"
SELECT
END
END
MSGVAL = MSG(MSGVAL)
EXIT
EXEC_PROGRAM :
LEN = 0
PREV = 0
O = 1
COPY ="'" || COPYDS || "(" || COPYBK || ")'"
IF LTH = " " THEN LTH = 0
ADDRESS TSO
"ALLOC DD(INPFILE) DA('"DATAST"') SHR REU"
"EXECIO * DISKR INPFILE (STEM INPUT. FINIS"
"FREE F(INPFILE)"
ADDRESS TSO
"ALLOC DD(OUTFILE) DA('"OUTFLD"') SHR REU"
"EXECIO * DISKR OUTFILE (STEM FLD. FINIS"
"FREE F(OUTFILE)"
DO J = 2 TO FLD.0
REC = "= STRIP(FLD." || J || ")"
INTERPRET 'REC1' REC
RECD = RECD ||" || " || REC1
END
DO I = 1 TO INPUT.0
CALL PARSE_REC
INTERPRET 'RECORD.O' RECD
LEN = LENGTH(RECORD.O)
LEN = MAX(LEN,PREV)
PREV= LEN
O = O + 1
END
ADDRESS TSO
"ALLOCATE DA('"OUTDS"') NEW SPACE(50,50) DSORG(PS) ,
RECFM(F,B) LRECL("LEN") BLKSIZE("BLK") MGMTCLAS(XTRABKUP) F(LIS1)"
"FREE DD (LIS1) NOHOLD"
*/
PARSE_REC :
ADDRESS ISPEXEC
"VPUT (COPYBK) PROFILE"
"LIBDEF ISPSLIB DATASET ID('M#T053.BALU.REXX.SKELETON')"
ADDRESS TSO
"ISPEXEC LIBDEF ISPFILE"
"ALLOC REUSE FI(SELFILE) DA('M#T053.MISC.CNTL') SHR"
"ISPEXEC LIBDEF ISPFILE LIBRARY ID(SELFILE)"
"ISPEXEC FTOPEN"
"ISPEXEC FTINCL INSYSLAY"
"ISPEXEC FTCLOSE NAME(INSYSLAY)"
"FREE FI(SELFILE)"
/* GOT THE LAYOUT - NOW CREATE VARIABLES AND ASSIGN POSITION TO THEM */
DO J = 7 TO LAYOUT.0
PARSE VAR LAYOUT.J SEQN LVL FIELD FORMT MID START LEN DECI
END
ELSE DO
END
RETURN
------- DSNLIST -------
PULL DSN
COUNT = 0
X= OUTTRAP("DSNINFO.",'*',"NOCONCAT")
DO I=1 TO DSNINFO.0
IF SUBSTR(DSNINFO.I,1,7) = "NONVSAM" THEN
DO
SAY SUBSTR(DSNINFO.I,17,20)
COUNT = COUNT + 1
END
END
EXIT
------- DSNS -------
ADDRESS ISPEXEC
"LIBDEF ISPPLIB DATASET ID('MTAT.TATA.PANEL1')"
"ADDPOP"
"SELECT PANEL(ENDPNL)"
ADDRESS TSO
MESG = "THANK YOU, GOOD DAY !"
EXIT
------- FACTRIAL -------
O = 1
DO I = 1 TO LST.0
END
"ALLOC DD(OUTFILE) DA("OUTDS") SHR REU"
"EXECIO * DISKW OUTFILE (STEM OUT. FINIS"
"FREE F(OUTFILE)"
SAY "SCL GENERATED. EXITING..."
EXIT
------- GDGTEMP -------
*COLS 1-39 GDG NAME , COL 40-42 NO.OF GENERATIONS, COL 50-72 COMMENT
*
* GDG NAME GEN COMMENT
* -------- --- -------
RETCD = 0
TITLE = 'NEWMAG - GDG UTILITY'
ADDRESS ISPEXEC
"VGET (CD C1 subsys) PROFILE"
IF RC > 0 then
DO
CD = ''
C1 = ''
subsys = ''
END
ADDRESS ISPEXEC
"LIBDEF ISPPLIB DATASET ID('MTAT.TATA.PANEL')"
"LIBDEF ISPSLIB DATASET ID('MTAT.TATA.ISPSLIB')"
"ADDPOP "
"DISPLAY PANEL(GDGUTIL) "
CALL GDG_UTIL
ADDRESS ISPEXEC
"DISPLAY PANEL(GDGUTIL)"
END
ADDRESS ISPEXEC
"REMPOP"
EXIT (RETCD)
GDG_UTIL :
ADDRESS TSO
USER = USERID()
memgdg = 'MEMGDG'
memEMP = 'MEMEMPTY'
memCRE = 'MEMCREAT'
/* ----------- ALLOC INPUT FILE FOR GETTING GDG BASE NAMES ---------*/
"ALLOC DA('MTAT.NEWMAG.CNTL.GDGS("subsys")') F(INPDD) SHR REUSE"
"ALLOC DA('MTAT.NEWMAG.CNTL.GDGS.OUT1("subsys")') F(OUTDD) SHR REUSE"
/* TRACE i */
"ALLOC DA('MTAT.NEWMAG.CNTL.GDGS.OUT1("memgdg")') F(OUTGDG) SHR REUSE"
"ALLOC DA('MTAT.NEWMAG.CNTL.GDGS.OUT1("MEMEMP")') F(OUTEMP) SHR REUSE"
"ALLOC DA('MTAT.NEWMAG.CNTL.GDGS.OUT1("MEMCRE")') F(OUTCRE) SHR REUSE"
/* "EXECIO 0 DISKW OUTDD (OPEN"
"EXECIO 0 DISKW OUTGDG (OPEN" */
"EXECIO * DISKR INPDD (STEM INPUT. FINIS"
"FREE DD (INPDD) NOHOLD"
IF INPUT.0 = O THEN
DO
SAY SUBSYSTEM ' EMPTY '
EXIT
END
OUTREC. = ''
EMPREC. = ''
J = 0 ; M = 0 ; N = 0 ; ckpt = 0; c = 0; SCNT = 1
/*------------ START WRITING THE OUTPUT FILE -------------------------*/
GDGREC. = ''
M = 1
GDGREC.M = '//'|| USERID() ||'GB JOB (M000,NG31,20,PS26,SM,1,5,''G''),'
M = M + 1
GDGREC.M = '// ''CNTL/KG SUPT'',CLASS=A,REGION=6000K,NOTIFY='||USERID()
M = M + 1
GDGREC.M = '//TCSJHS OUTPUT JESDS=ALL,DEFAULT=Y,DEST=LOCAL'
M = M + 1
GDGREC.M = '//*--------------------------------------------------------'
M = M + 1
GDGREC.M = '//* GDG BASE CREATION USING IDCAMS UTILITY'
M = M + 1
GDGREC.M = '//*--------------------------------------------------------'
M = M + 1
GDGREC.M = '//DEFGDG EXEC PGM=IDCAMS'
M = M + 1
GDGREC.M = '//SYSPRINT DD SYSOUT=*'
M = M + 1
GDGREC.M = '//SYSIN DD *'
creREC. = ''
c = 1
creREC.c = '//'|| USERID() ||'FT JOB (M000,NG31,20,PS26,SM,1,5,''G''),'
c = c + 1
creREC.c = '// ''CNTL/KG SUPT'',CLASS=A,REGION=6000K,NOTIFY='||USERID()
creREC.c = creREC.c ||','
c = c + 1
creREC.c = '// MSGCLASS=T,PRTY=9'
c = c + 1
creREC.c = '//*'
c = c + 1
creREC.c = '//*------------------- RMS STEP --------------------------'
c = c + 1
creREC.c = '//RMSSTEP EXEC UCC15TST,'
c = c + 1
creREC.c = '// TYPRUN=''P'''
c = c + 1
creREC.c = '//*--------------------------------------------------------'
ddcnt = 0;
DO K = 1 TO INPUT.0
LT= ' ' ; X = 0;
/* If first char is * or space, then treat as comment */
IF substr(input.k,1,1) = '*' then iterate
/* IF substr(input.k,1,1) = ' ' then iterate */
PARSE VAR INPUT.K DSN LMT frst .
IF LENGTH(DSN) = 0 THEN ITERATE
ckpt = ckpt + 1
if ckpt > 10 then
do
/* say k*/
ckpt = 0
end
DSN = STRIP(TRANSLATE(DSN))
MODDSN = STRIP(TRANSLATE(DSN))
FRST= STRIP(TRANSLATE(FRST))
STR = 'XX'
DO WHILE POS('XX',DSN) > 0
DSN = OVERLAY(CD,DSN,POS(STR,DSN),LENGTH(STR))
MODDSN = OVERLAY(C1,MODDSN,POS(STR,MODDSN),LENGTH(STR))
END
OPTION="ALL"
X= OUTTRAP("GDGINFO.",'*',"NOCONCAT")
ADDRESS "TSO" "LISTCAT ENT('"DSN"') GDG ALL"
IF (RC \= 0) THEN
X = 1
DO I= 6 TO GDGINFO.0
GDGINFO.I= TRANSLATE(GDGINFO.I,' ','-')
/* CHECK FOR LIMIT */
LPOS= WORDPOS('LIMIT',GDGINFO.I)
IF (LPOS > 0) THEN
DO
LIMIT= WORD(GDGINFO.I,2)
SCRATCH= WORD(GDGINFO.I,3)
EMPTY= WORD(GDGINFO.I,4)
END_SRCH = 1
END
/* CHECK FOR ASSOCIATIONS */
APOS= WORDPOS('ASSOCIATIONS',GDGINFO.I)
IF (APOS > 0) & (FRST = 'FIRST') THEN
DO
END_SRCH = 2
NPOS= WORDPOS('(NULL)',GDGINFO.I)
IF (NPOS > 0) & (frst = 'FIRST') THEN
DO
FIRST_GDG = 1
END
END
/* LEAVE ONCE BOTH ARE FOUND */
IF END_SRCH = 2 THEN
DO
LEAVE
END
END
IF LMT = LIMIT THEN
LT = 'YES'
ELSE
LT = 'NO'
J = J + 1
IF X = 1 THEN
DO
OUTREC.J = LEFT(STRIP(DSN),44)||' '||LEFT(STRIP(LMT),5)||' '||,
LEFT(STRIP(LT),5)||' '||LIMIT||'** GDG NOT DEFINED **'
M = M + 1
GDGREC.M = ' DEFINE GDG (NAME('DSN') -'
M = M + 1
GDGREC.M = ' LIMIT('LMT') SCRATCH NOEMPTY)'
M = M + 1
GDGREC.M = ' '
END
ELSE
DO
OUTREC.J = LEFT(STRIP(DSN),44)||' '||LEFT(STRIP(LMT),5)||' '||,
LEFT(STRIP(LT),5)||' '||LIMIT
END
/* SAY OUTREC */
IF FIRST_GDG = 1 THEN
DO
N = N + 1
EMPREC.N = LEFT(STRIP(DSN),44)||' '||LEFT(STRIP(LMT),5)||' '||,
LEFT(STRIP(LT),5)||' '||LIMIT || '**NO EMPTY GEN**'
DDCNT = DDCNT + 1
c = c + 1
CREREC.c ='//STEP' ||SCNT||' EXEC PGM=IEFBR14'
c = c + 1
CREREC.c = "//DD" || DDCNT || ' '|| 'DD DSN=' ||,
DSN || "(+1),"
c = c + 1
CREREC.c = "// " || "DISP=(,CATLG)," ||,
"SPACE=(TRK,(0,0),RLSE), "
c = c + 1
CREREC.c = "// " || "DCB=" || MODDSN ||,
".G0001V00"
c = c + 1
CREREC.c = '//SYSPRINT DD SYSOUT=*'
c = c + 1
CREREC.c = '//SYSIN DD DUMMY'
c = c + 1
CREREC.c = '//*'
SCNT = SCNT + 1
END
END
/*SAY 'NO OF INPUT READ' J*/
outrec.0 = j
/* for each new gdg, 3 lines are written */
m = m / 3
GDGREC.0 = m
/*err = 'NO OF empty gens to be creatED ' n*/
EMPREC.0 = n
"EXECIO * DISKW OUTDD (STEM outrec. FINIS"
"FREE DD (OUTDD) NOHOLD"
"EXECIO * DISKW OUTGDG (STEM GDGREC. FINIS"
"FREE DD (OUTGDG) NOHOLD"
"EXECIO * DISKW OUTEMP (STEM EMPREC. FINIS"
"FREE DD (OUTEMP) NOHOLD"
"EXECIO * DISKW OUTCRE (STEM CREREC. FINIS"
"FREE DD (OUTCRE) NOHOLD"
/*for displaying no.of gdg base creation dsn*/
err = 'NO OF GDGS/first gens TO BE DEFINED ' M n
err1 = 'CHECK IN MTAT.NEWMAG.CNTL.GDGS.OUT1(MEMGDG,EMPTY,CREAT)'
/*for displaying the job to the user */
address ispexec
"EDIT DATASET('mtat.newmag.cntl.gdgs.out1(memgdg)')"
"EDIT DATASET('mtat.newmag.cntl.gdgs.out1(memcreat)')"
return
------- JC -------
CUTDSN = "'"USERID()".RTMPN.CUTPASTE'"
/**********************************************************************/
ADDRESS ISPEXEC "CONTROL ERRORS RETURN"
ADDRESS ISREDIT
"MACRO (DUMMY) NOPROCESS"
"(MACLVL) = MACRO_LEVEL"
IF MACLVL <> 001 THEN DO
ZEDLMSG = "%JCUT can only be executed as an EDIT macro from",
"an EDIT session."
SIGNAL EXIT
END
/*
* Check for an empty member
*/
"(ZLAST) = LINENUM .ZLAST"
IF ZLAST = 0 THEN DO
ZEDLMSG = "There are no lines to CUT."
SIGNAL EXIT
END
/*
* Process Edit session range parameters (CC or MM)
*/
"(WIDTH) = DATA_WIDTH"
"PROCESS RANGE C M"
IF RC = 0 THEN DO
"(FROMLINE) = LINENUM .ZFRANGE"
"(TOLINE) = LINENUM .ZLRANGE"
END
ELSE DO
IF RC = 4 THEN DO
"(FROMLINE) = LINENUM .ZFIRST"
"(TOLINE) = LINENUM .ZLAST"
END
ELSE DO
ZEDSMSG = ZERRSM
ZEDLMSG = ZERRLM
SIGNAL EXIT
END
END
/*
* Queue specified lines
*/
COUNTER = FROMLINE
"(LINE) = LINE "COUNTER
RETCODE = RC
DO UNTIL COUNTER > TOLINE | RETCODE <> 0
QUEUE LINE
COUNTER = COUNTER + 1
"(LINE) = LINE "COUNTER
RETCODE = RC
END
/*
* If edit session range is M then delete lines
*/
"(RANGECMD) = RANGE_CMD"
IF RANGECMD = "M" THEN,
"DELETE "FROMLINE" "TOLINE
/*
* Allocate CUT dataset
*/
X = LISTDSI(CUTDSN)
ADDRESS TSO
IF SYSREASON = 0 & SYSLRECL = WIDTH THEN,
"ALLOC FI(CUTDD) DA("CUTDSN") SHR REUSE"
ELSE DO
DEFINE = MSG("OFF")
"DEL "CUTDSN
"ALLOC FI(CUTDD) DA("CUTDSN") NEW REUSE DSORG(PS)",
"SPACE(5,5) CYLINDERS LRECL("WIDTH")",
"BLKSIZE(0) RECFM(F,B) CATALOG UNIT(SYSDA)"
END
/*
* Write queued lines to allocated CUT dataset
*/
LINESCUT = QUEUED()
"EXECIO "QUEUED()" DISKW CUTDD (FINIS"
RETCODE = RC
IF RETCODE = 0 THEN DO
IF LINESCUT = 1 THEN DO
ZEDSMSG = "1 Line CUT"
ZEDLMSG = "The line you specified has been CUT. Use",
"PASTE to retrieve."
END
ELSE DO
ZEDSMSG = LINESCUT" Lines CUT"
ZEDLMSG = LINESCUT" Specified lines have been CUT. Use",
"PASTE to retrieve."
END
END
ELSE,
ZEDLMSG = "CUT FAILED.....RC="RETCODE
"DELSTACK"
"FREE FI(CUTDD)"
EXIT:
ADDRESS ISPEXEC
"SETMSG MSG(ISRZ000)"
EXIT
------- JCLCK -------
ADDRESS TSO
MSGVAL = MSG('OFF')
JCL1=""
JCL2=""
EQ ="="
NEQ ="\="
ERR ="<<< ENTER THE JCL AND JCLCHK DATASET >>>"
ADDRESS ISPEXEC
"LIBDEF ISPPLIB DATASET ID('M#T053.REXX.PROGRAM')"
"ADDPOP "
"DISPLAY PANEL(JPANEL)"
SELECT
END
END
MSGVAL = MSG(MSGVAL)
EXIT
EXEC_JCL:
JCL1='"'||JCL1||'"'
JCL2='"'||JCL2||'"'
ADDRESS ISPEXEC
"VPUT (JCL1,JCL2,EQ,NEQ) PROFILE"
"LIBDEF ISPSLIB DATASET ID('M#T053.TEST.SKELETON')"
ADDRESS TSO
"ISPEXEC LIBDEF ISPFILE"
"ALLOC REUSE FI(SELFILE) DA('M#T053.MISC1.CNTL') SHR"
"ISPEXEC LIBDEF ISPFILE LIBRARY ID(SELFILE)"
"ISPEXEC FTOPEN"
"ISPEXEC FTINCL FSTSKEL"
"ISPEXEC FTCLOSE NAME(JCLCHK)"
"FREE FI(SELFILE)"
ADDRESS ISPEXEC
"VPUT (JID,TID,TYPE) PROFILE"
"LIBDEF ISPSLIB DATASET ID('M#T053.TEST.SKELETON')"
ADDRESS TSO
"ISPEXEC LIBDEF ISPFILE"
"ALLOC REUSE FI(TELFILE) DA('M#T053.SELECTN.CNTL') SHR"
"ISPEXEC LIBDEF ISPFILE LIBRARY ID(TELFILE)"
"ISPEXEC FTOPEN"
"ISPEXEC FTINCL MODJCL"
"ISPEXEC FTCLOSE NAME(MODJCLA)"
"FREE FI(TELFILE)"
ADDRESS TSO
"SUBMIT 'M#T053.SELECTN.CNTL(MODJCLA)'"
JCL1=""
JCL2=""
ERR = "<<<< YOUR JOB IS SUBMITTED !!! >>>>"
RETURN
------- JCLGEN -------
ADDRESS TSO
"ALLOC DD(LSTFILE) DA('"LSTDS"') SHR REU"
"EXECIO * DISKR LSTFILE (STEM LST. FINIS"
"FREE F(LSTFILE)"
DO I = 3 TO LST.0
/*--------------------------------------------------------------------*/
/* LAYOUT OF THE INPUT FILE */
/*--------------------------------------------------------------------*/
MG = SUBSTR(LST.I,1,2)
DR = SUBSTR(LST.I,4,2)
PS = SUBSTR(LST.I,7,2)
FP = SUBSTR(LST.I,10,2)
REGION = STRIP(SUBSTR(LST.I,13,6))
SF = SUBSTR(LST.I,20,2)
SORTCYL = STRIP(SUBSTR(LST.I,23,7))
/*--------------------------------------------------------------------*/
TDATE = DATE('U')
ADDRESS ISPEXEC
"CONTROL ERRORS RETURN"
"LMINIT DATAID(PDSID) DATASET('"SKELDS"') ENQ(SHR)"
"LMOPEN DATAID("PDSID")"
SKEL = " " ; STOP = 0
DO WHILE STOP = 0
SKEL = STRIP(SKEL)
ADDRESS ISPEXEC
"VPUT (MG,SF,SORTCYL,DR,PS,REGION,FP) PROFILE"
"LIBDEF ISPSLIB DATASET ID('"SKELDS"')"
ADDRESS TSO
"ISPEXEC LIBDEF ISPFILE"
"ALLOC REUSE FI(SELFILE) DA('"OUTDS"') SHR"
"ISPEXEC LIBDEF ISPFILE LIBRARY ID(SELFILE)"
"ISPEXEC FTOPEN"
"ISPEXEC FTINCL "SKEL""
"ISPEXEC FTCLOSE NAME("ELM")"
"FREE FI(SELFILE)"
ADDRESS ISPEXEC
"LMMLIST DATAID("PDSID") MEMBER(SKEL) OPTION(LIST)"
STOP = RC
END
ADDRESS ISPEXEC
"LMMLIST DATAID("PDSID") OPTION(FREE)"
"LMCLOSE DATAID("PDSID")"
"LMFREE DATAID("PDSID")"
END
EXIT
------- JCLINFO -------
S = POS("*",PATTERN)
IF (S < 4) THEN SRCH = STRIP(SUBSTR(PATTERN,S,LENGTH(PATTERN)))
ELSE SRCH = STRIP(SUBSTR(PATTERN,1,S))
POSI = POS("(",ACCTDSN)
ADSN = SUBSTR(ACCTDSN,1,POSI - 1)
J = 0
OUT. = ' '
X = OUTTRAP(LIS.)
"LISTDS '"JCLDSN"' MEMBERS"
X = OUTTRAP(OFF)
DO I = 7 TO LIS.0
MEM = STRIP(LIS.I)
MEM1 = SUBSTR(MEM,2,2)
IF POS(SRCH,MEM) > 0 THEN
DO
LEN = LENGTH(MEM)
FRM = LEN + 1
TILL = 38 - LEN
MEMDSN = JCLDSN || '(' || MEM || ')'
"ALLOC DA('"MEMDSN"') F(INPD2) SHR REUSE"
"EXECIO 1 DISKR INPD2 (STEM INPUT2. FINIS"
"FREE DD (INPD2) NOHOLD"
PRPOS = POS(",PS",INPUT2.1)
DS = SUBSTR(INPUT2.1,PRPOS - 7,2)
FP = SUBSTR(INPUT2.1,PRPOS - 5,2)
PR = SUBSTR(INPUT2.1,PRPOS + 3,2)
J = J + 1
OUT.J = MEM || SUBSTR(OUT.J,FRM,TILL) || PR || ' ' || FP || ' ' || DS
NEW.J = OUT.J
END
END
EXIT
------- JHSREPT -------
ADDRESS TSO
"ALLOC DD(LSTFILE) DA("LSTDS") SHR REU"
"EXECIO * DISKR LSTFILE (STEM LST. FINIS"
"FREE F(LSTFILE)"
O = 1
I = 1
I = I + 3
LINE = SUBSTR(LST.I,24,19)
PROGRAM = RIGHT(SUBSTR(LINE,1,8),8)
COUNT = RIGHT(STRIP(SUBSTR(LINE,9,11)),10)
END
ADDRESS TSO
"ALLOC DD(OUTFILE) DA("OUTDS") SHR REU"
"EXECIO * DISKW OUTFILE (STEM OUT. FINIS"
"FREE F(OUTFILE)"
SAY "DONE..."
EXIT
------- JP -------
CUTDSN = "'"USERID()".RTMPN.CUTPASTE'"
/**********************************************************************/
ADDRESS ISPEXEC "CONTROL ERRORS RETURN"
ADDRESS ISREDIT
"MACRO (DUMMY) NOPROCESS"
"(MACLVL) = MACRO_LEVEL"
IF MACLVL <> 001 THEN DO
ZEDLMSG = "%JPASTE can only be, executed as an EDIT macro from",
"an EDIT session."
SIGNAL EXIT
END
/*
* Allocate CUT dataset and check LRECL
*/
"(WIDTH) = DATA_WIDTH"
X = LISTDSI(CUTDSN)
IF SYSREASON = 0 THEN DO
IF SYSLRECL > WIDTH THEN DO
ZEDSMSG = "TRUNCATION OCCURRED"
ZEDLMSG = "Truncation of CUT data occured: CUT-LRECL=",
SYSLRECL" PASTE-LRECL= " WIDTH
END
ADDRESS TSO "ALLOC FI(CUTDD) DA("CUTDSN") SHR REUSE"
END
ELSE DO
ZEDSMSG = "USE CUT FIRST"
ZEDLMSG = "Something must be CUT before PASTE can be used"
SIGNAL EXIT
END
/*
* Process edit session destination parms (A or B)
*/
"PROCESS DEST"
IF RC = 0 THEN,
"(DEST) = LINENUM .ZDEST"
ELSE DO
IF RC = 8 THEN,
"(DEST) = LINENUM .ZLAST"
ELSE
DEST = 0
END
/*
* Load queue with contents of CUT dataset
*/
ADDRESS TSO "EXECIO * DISKR CUTDD (FINIS)"
/*
* Insert queued lines into edit session at specified destination
*/
LINENUM = DEST
LINESCUT = QUEUED()
DO LINESCUT
PARSE PULL RECORD /* PARSE used to not convert to upper case */
"LINE_AFTER "LINENUM" = (RECORD)"
LINENUM = LINENUM + 1
END
/*
* Clean up and issue messages
*/
ADDRESS TSO "DELSTACK"
ADDRESS TSO "FREE FI(CUTDD)"
"RESET LABEL"
IF DEST = 0 THEN
"CURSOR = 1 1"
ELSE,
"CURSOR = "DEST" 1"
IF ZEDLMSG = "ZEDLMSG" THEN DO
IF LINESCUT = 1 THEN DO
ZEDSMSG = "1 Line PASTED"
ZEDLMSG = "The line you previously CUT has been PASTED"
END
ELSE DO
ZEDSMSG = LINESCUT" LINES PASTED"
ZEDLMSG = LINESCUT" previously CUT lines have been PASTEd"
END
END
EXIT:
ADDRESS ISPEXEC
"SETMSG MSG(ISRZ000)"
EXIT
------- KEYCHANG -------
ADDRESS ISPEXEC
"LIBDEF ISPPLIB DATASET ID('M#T053.MISC.CNTL')"
"ADDPOP"
"DISPLAY PANEL(RCHATPNL)"
ADDRESS ISPEXEC
"VGET (ZPFKEY)"
IF ZPFKEY= 'PF03' THEN DO
ZPFKEY= ' HI '
SAY ZPFKEY
END
EXIT
------- LIMIT -------
/*rexx*/
say "enter the gdg to find the limit"
pull gdg
do while gdg = ' '
say "kindly enter the gdg"
pull gdg
end
X= OUTTRAP("GDGINFO.",'*',"NOCONCAT")
ADDRESS "TSO" "LISTCAT ENT('"gdg"') GDG ALL"
limit:
s2=strip(str1,,'-')
say "limit of the gdg " || gdg || " is " || s2
return
------- NXTSTR -------
ADDRESS ISREDIT
"MACRO"
"(LPTR,COL) = CURSOR"
"(LRECL) = LRECL"
"(RECORD) = LINE" LPTR
RECORD = SUBSTR(RECORD,COL,LRECL)
POSSPACE = POS(' ',RECORD)
IF POSSPACE = 0 THEN
POSSPACE = LRECL
WRD = SUBSTR(RECORD,1,POSSPACE)
ADDRESS ISREDIT
"F ALL '"WRD"'"
------- PBAR -------
/* Rexx Think */
t = sysvar(syscpu)
ADDRESS ISPEXEC delay 5
/* some process*/
t = sysvar(syscpu) - t
zedsmsg = 'Took' t 'seconds'
'ispexec setmsg msg(isrz000)'
return
------- PGMKEY -------
END
END
/********************************REXX**********************************/
/* */
/* THIS TOOL GENERATES THE PRODUCTION COUNTS FOR PROGRAMS */
/* */
/* AUTHOR : BALU SUBRAMONIAM V */
/* */
/**********************************************************************/
INPTEMP = "'MTAT.TATA.WORKAREA(PDSTEMP)'"
ZEDLMSG = " ENTER THE MAGCODE, FMDATE AND PROGRAM NAME !!! "
ADDRESS ISPEXEC "SETMSG MSG(ISRZ000)"
ADDRESS ISPEXEC
"EDIT DATASET("INPTEMP")"
ADDRESS TSO
"FREE DATASET("INPTEMP")"
ADDRESS TSO
MSGVAL = MSG('OFF')
O = 1
DO K = 8 TO INP.0
MAG = STRIP(SUBSTR(INP.K,1,2))
FMDATE = STRIP(SUBSTR(INP.K,4,8))
PROGNAME = STRIP(SUBSTR(INP.K,13,8))
END
"ALLOC DD(OUTFILE) DA('"OUTDS"') SHR REU"
"EXECIO * DISKW OUTFILE (STEM OUTREC. FINIS"
"FREE F(OUTFILE)"
MSGVAL = MSG(MSGVAL)
ADDRESS ISPEXEC
"EDIT DATASET('"OUTDS"')"
EXIT
/*--------------------------------------------------------------------*/
PROD_OUTDS :
IC = 1
OC = 1
DROP IPDSN.
DROP OPDSN.
DO I = 1 TO JES.0
END
RETURN
/*--------------------------------------------------------------------*/
PROD_COUNTS :
I = 1
DO FOREVER
IF STRIP(SUBSTR(LST.I,35,8)) = PROGNAME THEN LEAVE
ELSE I = I + 1
I = I + 1
DO FOREVER
OUTREC.O = SUBSTR(LST.I,1,80)
O = O + 1
I = I + 1
END
RETURN
------- RECURSE -------
PRES.I = STRIP(SUBSTR(LST.I,1,9))
PGM.O = PRES.I
O = O + 1
PREV = PRES.I
END
/* FOR EACH PROGRAM, CALL THE FINDSUB SUBRTN TO GET THE PGMS/SUBPGMS */
DO J = 1 TO O-1
ROOT = PGM.J
CALL FINDSUB PGM.J
END
/* END OF PROGRAM */
EXIT
/*********************************************************************/
/* FIND SUB SUBROUTINE :- FINDS THE PGM/SUBPGM CALLED BY A ASSEMBLR */
/* */
/* PASSED PARM : PROGRAM FOR WHICH PGM/SUBPGM NEEDS TO BE FOUND */
/* RETURN : NOTHING */
/*********************************************************************/
/* END OF SUBROUTINE */
RETURN
------- RETMEM -------
ADDRESS TSO
MSGVAL = MSG('OFF')
LSTDS = ""
OUTDS = ""
SRCEDS = ""
COMMENTS = ""
E = "E"
ERR = "<<< ENTER THE REQUIRED INPUTS !!! >>>"
ADDRESS ISPEXEC
"LIBDEF ISPPLIB DATASET ID('M#T053.BALU.REXX.PANEL')"
"ADDPOP "
"DISPLAY PANEL(RETMEM)"
SELECT
END
END
MSGVAL = MSG(MSGVAL)
EXIT
EXEC_PGM :
ADDRESS TSO
"ALLOC DD(LSTFILE) DA('"LSTDS"') SHR REU"
"EXECIO * DISKR LSTFILE (STEM LST. FINIS"
"FREE F(LSTFILE)"
O = 1
DO I = 1 TO LST.0
ELMT = STRIP(SUBSTR(LST.I,1,10))
ENV = STRIP(SUBSTR(LST.I,12,4))
SYS = STRIP(SUBSTR(LST.I,24,8))
SUB = STRIP(SUBSTR(LST.I,33,8))
TYP = STRIP(SUBSTR(LST.I,43,10))
/* WRITE TO OUTPUT */
ADDRESS TSO
"ALLOC DD(OUTFILE) DA('"OUTDS"') SHR REU"
"EXECIO * DISKW OUTFILE (STEM OUT. FINIS"
IF RC \= 0 THEN DO
ERR = "USE PDS(MEM) (OR) USE EXST PS FOR O/P"
RETURN
END
ADDRESS TSO
"FREE F(OUTFILE)"
IF E = "E" THEN DO
ADDRESS ISPEXEC
"EDIT DATASET('"OUTDS"')"
END
IF E = "S" THEN DO
USR = USERID()
ADDRESS ISPEXEC
"VPUT (USR,OUTDS) PROFILE"
"LIBDEF ISPSLIB DATASET ID('M#T053.BALU.REXX.SKELETON')"
ADDRESS TSO
"ISPEXEC LIBDEF ISPFILE"
"ALLOC REUSE FI(SELFILE) DA('MTAT.TATA.WORKAREA') SHR"
"ISPEXEC LIBDEF ISPFILE LIBRARY ID(SELFILE)"
"ISPEXEC FTOPEN"
"ISPEXEC FTINCL ENDBTCH"
"ISPEXEC FTCLOSE NAME(ENDBTCH)"
"FREE FI(SELFILE)"
ADDRESS TSO
"SUBMIT 'MTAT.TATA.WORKAREA(ENDBTCH)'"
END
RETURN
------- REXXCHAT -------
/*rexx*/
/* IF <prefix>.CLIST PDS is there, look there for panel d
by default using ISPPLIB
*/
/*If sysdsn(clist) = OK then do
ADDRESS ISPEXEC "LIBDEF ISPPLIB DATASET ID(CLIST)"
End
ADDRESS ISPEXEC "CONTROL ERRORS RETURN"*/
ADDRESS ISPEXEC
"Libdef ispplib dataset id('MTAT.TATA.PANEL')"
do while continue='Y'
msgIn=''
ADDRESS ISPEXEC "TBBOTTOM " tbname
/* Display latest messages*/
ADDRESS ISPEXEC "TBSKIP "tbname" NUMBER(-15)"
ADDRESS ISPEXEC "TBDISPL "tbname " PANEL(chatpnl) cursor("cursFld")"
cursFld='msgIn'
If RC<>0 then
continue ='N'
Else do
call SendMessage
call ReceiveMessage
End
end
call saveConversation
ADDRESS ISPEXEC "TBCLOSE "tbname
exit(0)
/*-------------------------------------------------------------------*/
SendMessage:
restOfString = strip(msgIn)
if length(restOfString)=0 then return
parse value restOfString with firstPart "'" restOfString
tempIn = firstPart
do while Length(restOfString) >0
parse value restOfString with firstPart "'" restOfString
tempIn = tempIn ||"''" || firstPart
End
x=outtrap('sendmsg.')
ADDRESS TSO
"SE '"tempIn"' USER("destID") SAVE"
x=outtrap('off')
errorMsg = 'USER LOG DOES NOT EXIST'
if index(sendmsg.1,errorMsg) >0 & sendmsg.trapped>0 Then Do
ZEDSMSG='INVALID USER ID'
ZEDLMSG='User ID 'destID 'Can not be reached. Message cancelled.'
ADDRESS ISPEXEC "SETMSG MSG(ISRZ001)"
return
End
if invite = '/' then do
ADDRESS TSO
"SE 'Invitation For Chat From:' USER("destID")"
"SE '"tempIn"' USER("destID")"
End
ADDRESS ISPEXEC "TBBOTTOM "tbname
msgOut = user || left(msgIn,71)
ADDRESS ISPEXEC "TBADD "tbname
return
/*--------------------------------------------------------*/
ReceiveMessage:
x=outtrap('msg.')
ADDRESS TSO
"LISTBC NONOTICES"
x=outtrap('off')
Do i=1 to msg.trapped
if index(msg.i,'NO BROADCAST MESSAGES')>0 then iterate
wordCount=words(msg.i)
sender = word(msg.i,wordCount) /* Last word is Sender's ID*/
msg.i = sender":"delword(msg.i,wordCount)
ADDRESS ISPEXEC "TBBOTTOM "tbname
msgOut = left(msg.i,80)
ADDRESS ISPEXEC "TBADD "tbname
End
return
/*--------------------------------------------------------*/
SaveConversation:
ADDRESS TSO
dsname=getDSName()
"ALLOC DA("dsname") fi(outdd) spa(10 5) lrecl(80) recfm(f) new"
ADDRESS ISPEXEC "TBSTATS "tbname " ROWCURR(rowCnt)"
out.0=rowCnt
ADDRESS ISPEXEC "TBTOP "tbname
Do i=1 to out.0
ADDRESS ISPEXEC "TBSKIP "tbname
ADDRESS ISPEXEC "TBGET "tbname
out.i = msgOut
End
"EXECIO * DISKW OUTDD (STEM out. FINIS"
"FREE FI(outdd)"
Say "The conversation is saved in the dataset "
say sysvar('syspref')||"."||dsname
return
/*--------------------------------------------------------*/
getDSName:
parse value time() with hh":"mm":"ss":"
parse value date() with dd" "mon" "yyyy
user=userID()
yyyy=right(yyyy,2)
dsname=user||".CHAT.D"||dd||mon||yyyy||".T"||hh||mm||ss
return dsname
/*-------------------------------------------------------*/
------- REXXMAC -------
/* REXX */
/* */
/* AUTHOR: RAJESH KUMAR.E */
/* LAST UPDATED 21TH MAR 2003 */
/* */
/***************************************************************/
/* */
/* THIS REXX EXEC CAN BE USED TO PROCESS AN ISPF EDIT MACRO */
/* AGAINST EVERY MEMBER OF A PDS. */
/* */
/***************************************************************/
/* COMMAND SYNTAX: */
/* */
/* TSO %REXXMAC DATA_SET_NAME MACRO_NAME */
/* */
/* IF DATA_SET_NAME IS NOT ENCLOSED IN QUOTES, THEN THE */
/* TSO PREFIX (NORMALLY THE USERID) WILL BE ADDED TO THE */
/* BEGINNING OF THE DATA SET NAME. */
/* */
/***************************************************************/
/* SAMPLE EDIT MACRO AND REXXMAC EXECUTION: */
/* */
/* MACRO1 EDIT MACRO */
/* */
/* /* REXX EDIT MACRO TO CHANGE "SYSA." TO "SYSB." */ */
/* ADDRESS ISREDIT */
/* "MACRO" */
/* "CHANGE 'SYSA.' 'SYSB.' ALL" */
/* "SAVE" */
/* "END" */
/* */
/* REXXMAC EXECUTION */
/* 1. FIRST CONCAT THE DATASET USING CONCATRX MEMBER */
/* 2. TYPE THIS IN THE COMMAND LINE */
/* TSO %REXXMAC 'BNY011.TEST.JCLS' MACRO1 */
/***************************************************************/
ARG DSN MACNAME .
IF MACNAME = '' THEN DO /* NO MACRO NAME PARM GIVEN */
SAY 'ERROR - EDIT MACRO NAME NOT SPECIFIED' /* ISSUE ERROR MSG */
EXIT 12 /* EXIT RC=12 */
END
IF POS("'",DSN) = 0 & SYSVAR(SYSPREF) <> '' THEN , /* IF NO QUOTES */
DSN = SYSVAR(SYSPREF) || '.' || DSN /* AND PREF NOT NULL, ADD IT */
ELSE DSN = STRIP(TRANSLATE(DSN,"","'")) /* REMOVE QUOTES IF USED */
CHKLIB = SYSDSN("'"DSN"'") /* SEE IF DATA SET EXISTS */
IF CHKLIB <> 'OK' THEN DO /* DATA SET NOT FOUND */
SAY 'ERROR -' DSN 'NOT FOUND. CHECK NAME AND QUOTES.' /* ISSUE MSG*/
EXIT 12 /* EXIT RC=12 */
END
JUNK = OUTTRAP('MBR.') /* CAPTURE OUTPUT TO MBR. STEM */
"LISTD '" || DSN || "' MEMBERS" /* ISSUE LISTD CMD AGAINST PDS */
JUNK = OUTTRAP('OFF') /* STOP CAPTURING OUTPUT */
DO I = 1 TO MBR.0 /* LOOP TO GET PAST VOL INFO */
IF MBR.I = "--MEMBERS--" THEN LEAVE /* IF MEMBER SECTION, EXIT LOOP*/
END
IF I = MBR.0 THEN DO /* NO MEMBERS IN PDS */
SAY 'ERROR - NO MEMBERS FOUND IN' DSN'.' /* ISSUE ERROR MSG */
EXIT 12 /* EXIT RC=12 */
END
SAY 'PROCESSING' MBR.0 - I 'MEMBERS ...'
DO J = I+1 TO MBR.0 /* LOOP TO EXECUTE EDIT MACRO */
PARSE VAR MBR.J MACMEM . /* GET RID OF ALIAS INFO */
ADDRESS ISPEXEC "EDIT DATASET('" || DSN || "(" || MACMEM || ")')" ,
"MACRO("MACNAME")"
END
SAY 'PROCESSING COMPLETE!'
EXIT 0
------- SUPRC -------
ADDRESS TSO
MSGVAL = MSG('OFF')
ELM1 = ""
ELM2 = ""
ELM3 = ""
ELM4 = ""
NM = ""
OM = ""
GT = ">"
BLANK= " "
ERR = "<<< ENTER THE NEW, OLD AND SUPERC DSNS >>>"
ADDRESS ISPEXEC
"LIBDEF ISPPLIB DATASET ID('M#T053.REXX.PROGRAM')"
"ADDPOP "
"DISPLAY PANEL(SPANEL1)"
SELECT
OTHERWISE
DO
CALL EXEC_SUPERC
ADDRESS ISPEXEC
"REMPOP "
"ADDPOP "
"DISPLAY PANEL(SPANEL1)"
END
END
END
MSGVAL = MSG(MSGVAL)
EXIT
EXEC_SUPERC:
/* START OF CHANGE */
IF NM \= " " & OM = " " THEN DO
ERR = "PLEASE ENTER MODEL MAG CODE !!!"
RETURN
END
END
NEW = "P"
OLD = "P"
END
NEW = "P"
OLD = "T"
END
IF NM = "" THEN DO
ERR = "PLS ENTER NEWMAG CODE !!!"
RETURN
END
IF OM = "" THEN DO
ERR = "PLS ENTER MODEL CODE !!!"
RETURN
END
END
NEW = "T"
OLD = "T"
IF NM = "" THEN DO
ERR = "PLS ENTER NEWMAG CODE !!!"
RETURN
END
IF OM = "" THEN DO
ERR = "PLS ENTER MODEL CODE !!!"
RETURN
END
END
ELM1 = '"'||ELM1||'"'
ELM2 = '"'||ELM2||'"'
ELM3 = '"'||ELM3||'"'
ELM4 = '"'||ELM4||'"'
ADDRESS ISPEXEC
"VPUT (ELM1,ELM2,ELM3,ELM4,NEW,OLD,NM,OM,GT,BLANK) PROFILE"
"LIBDEF ISPSLIB DATASET ID('M#T053.TEST.SKELETON')"
ADDRESS TSO
"ISPEXEC LIBDEF ISPFILE"
"ALLOC REUSE FI(SELFILE) DA('M#T053.MISC1.CNTL') SHR"
"ISPEXEC LIBDEF ISPFILE LIBRARY ID(SELFILE)"
"ISPEXEC FTOPEN"
"ISPEXEC FTINCL THDSKEL"
"ISPEXEC FTCLOSE NAME(SUPERC)"
"FREE FI(SELFILE)"
ADDRESS ISPEXEC
"VPUT (JID,TID,TYPE) PROFILE"
"LIBDEF ISPSLIB DATASET ID('M#T053.TEST.SKELETON')"
ADDRESS TSO
"ISPEXEC LIBDEF ISPFILE"
"ALLOC REUSE FI(TELFILE) DA('M#T053.SELECTN.CNTL') SHR"
"ISPEXEC LIBDEF ISPFILE LIBRARY ID(TELFILE)"
"ISPEXEC FTOPEN"
"ISPEXEC FTINCL MODJCL"
"ISPEXEC FTCLOSE NAME(MODJCLB)"
"FREE FI(TELFILE)"
ADDRESS TSO
"SUBMIT 'M#T053.SELECTN.CNTL(MODJCLB)'"
ELM1 = ""
ELM2 = ""
ELM3 = ""
ERR = "<<<< YOUR JOB IS SUBMITTED !!! >>>>"
RETURN
------- TABLEDEM -------
TBNAME = SAMPLE
CALL SAYTABCON
ADDRESS ISPEXEC
"LIBDEF ISPPLIB DATASET ID('M#T053.REXX.PROGRAM')"
"ADDPOP "
"TBDISPL "TBNAME" PANEL(CHATPNL2)"
SAYTABCON :
RETURN
------- TESTMAC -------
/* REXX */
"ISREDIT MACRO"
"ISREDIT CUT "MEDIANO" "MEDIANO" TEST"
"ISREDIT END"
------- UTILREXX -------
/* REXX */
SAY "ENTER mag code "
PULL MAG
SAY "ENTER MODEL MAG CODE (FOR CREATING EMPTY GEN) "
PULL MODELMAG
SAY "ENTER Subsystem"
PULL subsys
memgdg = 'MEMGDG'
memEMP = 'MEMEMPTY'
memCRE = 'MEMCREAT'
/* ----------- ALLOC INPUT FILE FOR GETTING GDG BASE NAMES ---------*/
"ALLOC DA('M#T053.TEMPLATE.JCL("subsys")') F(INPDD) SHR REUSE"
"ALLOC DA('M#T053.MISC1.CNTL("subsys")') F(OUTDD) SHR REUSE"
/* TRACE i */
"ALLOC DA('M#T053.TEMPLATE.JCL("memgdg")') F(OUTGDG) SHR REUSE"
"ALLOC DA('M#T053.TEMPLATE.JCL("MEMEMP")') F(OUTEMP) SHR REUSE"
"ALLOC DA('M#T053.TEMPLATE.JCL("MEMCRE")') F(OUTCRE) SHR REUSE"
/* "EXECIO 0 DISKW OUTDD (OPEN"
"EXECIO 0 DISKW OUTGDG (OPEN" */
"EXECIO * DISKR INPDD (STEM INPUT. FINIS"
"FREE DD (INPDD) NOHOLD"
IF INPUT.0 = O THEN
DO
SAY SUBSYSTEM ' EMPTY '
EXIT
END
OUTREC. = ''
EMPREC. = ''
creREC. = ''
GDGREC. = ''
J = 0 ; M = 0 ; N = 0 ; ckpt = 0
ddcnt = 0; crecnt = 0
DO K = 1 TO INPUT.0
LT= ' ' ; X = 0;
/* If first char is * or space, then treat as comment */
IF substr(input.k,1,1) = '*' then iterate
/* IF substr(input.k,1,1) = ' ' then iterate */
PARSE VAR INPUT.K DSN LMT frst .
IF LENGTH(DSN) = 0 THEN ITERATE
ckpt = ckpt + 1
if ckpt > 10 then
do
say k
ckpt = 0
end
DSN = STRIP(TRANSLATE(DSN))
MODDSN = STRIP(TRANSLATE(DSN))
FRST= STRIP(TRANSLATE(FRST))
STR = 'XX'
DO WHILE POS('XX',DSN) > 0
DSN = OVERLAY(MAG,DSN,POS(STR,DSN),LENGTH(STR))
MODDSN = OVERLAY(MODELMAG,MODDSN,POS(STR,MODDSN),LENGTH(STR))
END
OPTION="ALL"
X= OUTTRAP("GDGINFO.",'*',"NOCONCAT")
ADDRESS "TSO" "LISTCAT ENT('"DSN"') GDG ALL"
IF (RC \= 0) THEN
X = 1
DO I= 6 TO GDGINFO.0
GDGINFO.I= TRANSLATE(GDGINFO.I,' ','-')
/* CHECK FOR LIMIT */
LPOS= WORDPOS('LIMIT',GDGINFO.I)
IF (LPOS > 0) THEN
DO
LIMIT= WORD(GDGINFO.I,2)
SCRATCH= WORD(GDGINFO.I,3)
EMPTY= WORD(GDGINFO.I,4)
END_SRCH = 1
END
/* CHECK FOR ASSOCIATIONS */
APOS= WORDPOS('ASSOCIATIONS',GDGINFO.I)
IF (APOS > 0) & (FRST = 'FIRST') THEN
DO
END_SRCH = 2
NPOS= WORDPOS('(NULL)',GDGINFO.I)
IF (NPOS > 0) & (frst = 'FIRST') THEN
DO
FIRST_GDG = 1
END
END
/* LEAVE ONCE BOTH ARE FOUND */
IF END_SRCH = 2 THEN
DO
LEAVE
END
END
IF LMT = LIMIT THEN
LT = 'YES'
ELSE
LT = 'NO'
J = J + 1
IF X = 1 THEN
DO
OUTREC.J = LEFT(STRIP(DSN),44)||' '||LEFT(STRIP(LMT),5)||' '||,
LEFT(STRIP(LT),5)||' '||LIMIT||'** GDG NOT DEFINED **'
M = M + 1
GDGREC.M = ' DEFINE GDG (NAME('DSN') -'
M = M + 1
GDGREC.M = ' LIMIT('LMT') SCRATCH NOEMPTY)'
M = M + 1
GDGREC.M = ' '
END
ELSE
DO
OUTREC.J = LEFT(STRIP(DSN),44)||' '||LEFT(STRIP(LMT),5)||' '||,
LEFT(STRIP(LT),5)||' '||LIMIT
END
/* SAY OUTREC */
IF FIRST_GDG = 1 THEN
DO
N = N + 1
EMPREC.N = LEFT(STRIP(DSN),44)||' '||LEFT(STRIP(LMT),5)||' '||,
LEFT(STRIP(LT),5)||' '||LIMIT || '**NO EMPTY GEN**'
DDCNT = DDCNT + 1
CRECNT = CRECNT + 1
CREREC.CRECNT = "//DD" || DDCNT || ' '|| 'DD DSN=' ||,
DSN || "(+1),"
CRECNT = CRECNT + 1
CREREC.CRECNT = "// " || "DISP=(,CATLG)," ||,
"SPACE=(TRK,(0,0),RLSE), "
CRECNT = CRECNT + 1
CREREC.CRECNT = "// " || "DCB=" || MODDSN ||,
".G0001V00"
END
END
SAY 'NO OF INPUT READ' J
outrec.0 = j
/* for each new gdg, 3 lines are written */
m = m / 3
SAY 'NO OF GDGS TO BE DEFINED ' M
GDGREC.0 = m
SAY 'NO OF empty gens to be creatED ' n
EMPREC.0 = n
"EXECIO * DISKW OUTDD (STEM outrec. FINIS"
"FREE DD (OUTDD) NOHOLD"
"EXECIO * DISKW OUTGDG (STEM GDGREC. FINIS"
"FREE DD (OUTGDG) NOHOLD"
"EXECIO * DISKW OUTEMP (STEM EMPREC. FINIS"
"FREE DD (OUTEMP) NOHOLD"
"EXECIO * DISKW OUTCRE (STEM CREREC. FINIS"
"FREE DD (OUTCRE) NOHOLD"
exit
------- VENDOR -------
ADDRESS TSO
MSGVAL = MSG('OFF')
ADDRESS ISPEXEC
"LIBDEF ISPPLIB DATASET ID('M#T053.BALU.REXX.PANEL')"
"ADDPOP "
"DISPLAY PANEL(VPANEL)"
SELECT
END
END
MSGVAL = MSG(MSGVAL)
EXIT
SETUP :
END
END
END
JCLSKEL = "VNDCMSG2"
RUNSKEL = "VNDRDCMS"
JOBNAME = "M"|| RG ||"P" || VID ||"F"
MODEL = "MAGPCKFF"
IF L = "N" THEN DO
JCLSKEL = "VNDNCOMP"
RUNSKEL = "VNDRDNCM"
JOBNAME = "M"|| RG ||"P" || VID ||"F"
END
IF L = "U" THEN DO
JCLSKEL = "VNDMDG8"
RUNSKEL = "VNDRDMG8"
JOBNAME = "MDG8" || VID ||"L"
MODEL = "MDG8AOLL"
IF MID \= " " THEN MODEL = "MDG8" || MID ||"L"
END
ADDRESS TSO
"ISPEXEC LIBDEF ISPFILE"
"ALLOC REUSE FI(SELFILE) DA('MTAT.VENDOR.SETUP.JCL') SHR"
"ISPEXEC LIBDEF ISPFILE LIBRARY ID(SELFILE)"
"ISPEXEC FTOPEN"
"ISPEXEC FTINCL "JCLSKEL""
"ISPEXEC FTCLOSE NAME("JOBNAME")"
"FREE FI(SELFILE)"
ADDRESS TSO
"ALLOC FI(NEWDD) DA('MTAT.VENDOR.SETUP.JCL("JOBNAME")') SHR REUSE"
"ALLOC FI(OLDDD) DA('APCP.ENDEVOR.JCLP("MODEL")') SHR REUSE"
"ALLOC FI(OUTDD) DA('MTAT.VENDOR.SETUP.JCL.SUPERC("JOBNAME")') SHR ,
REUSE"
"ALLOC FI(SYSIN) DA('MTAT.SYSIN.SUPERC') SHR REUSE"
"ISRSUPC" OPTS
"FREE FI(NEWDD OLDDD OUTDD SYSIN)"
ADDRESS ISPEXEC
"EDIT DATASET('MTAT.VENDOR.SETUP.RUNDOC("JOBNAME")') MACRO (VNDRMAC)"
ADDRESS TSO
"ISPEXEC LIBDEF ISPFILE"
"ALLOC REUSE FI(SELFILE) DA('MTAT.VENDOR.SETUP.CNTL') SHR"
"ISPEXEC LIBDEF ISPFILE LIBRARY ID(SELFILE)"
"ISPEXEC FTOPEN"
"ISPEXEC FTINCL "VNDRGDG""
"ISPEXEC FTCLOSE NAME("JOBNAME")"
"FREE FI(SELFILE)"
/* CAPTURE JCLCHK */
OPTS = 'PROC(PROC00)'
PRO1 = "'SYS1.PROCLIB','SYS1.ENDEVOR.PROCLIBP','SYS1.ISV.PROCLIB',"
PRO2 = "'SYS1.TCS.MISC.PROCLIB','SYS1.SYSPROC','SYS1.SHRPROC'"
PROC = PRO1 || PRO2
ADDRESS TSO
"ALLOC FI(PROC00) DA("PROC") SHR"
"ALLOC FI(SYSPRINT) DA('MTAT.VENDOR.SETUP.JCLCHK("JOBNAME")') SHR REUSE"
"ALLOC FI(SYSIN) DA('MTAT.VENDOR.SETUP.JCL("JOBNAME")') SHR REUSE"
"JCLCHECK" OPTS
"FREE FI(PROC00 SYSPRINT SYSIN)"
ADDRESS ISPEXEC
"VPUT (JOBNAM,SYSUID,MODEL,NEWJOB) PROFILE"
"LIBDEF ISPSLIB DATASET ID('MTAT.TATA.ISPSLIB')"
ADDRESS TSO
"ISPEXEC LIBDEF ISPFILE"
"ALLOC REUSE FI(SELFILE) DA('MTAT.VENDOR.SETUP.CNTL') SHR"
"ISPEXEC LIBDEF ISPFILE LIBRARY ID(SELFILE)"
"ISPEXEC FTOPEN"
"ISPEXEC FTINCL "ONCALONE""
"ISPEXEC FTCLOSE NAME("ONCALMEM")"
"FREE FI(SELFILE)"
ADDRESS ISPEXEC
"EDIT DATASET('MTAT.VENDOR.SETUP.ACCTINFO.MAIL("JOBNAME")') ,
MACRO (VNDRMAC)"
ADDRESS ISPEXEC
"EDIT DATASET('MTAT.VENDOR.SETUP.MAIL("JOBNAME")') ,
MACRO (VNDRMAC)"
ADDRESS ISPEXEC
"EDIT DATASET('MTAT.VENDOR.SETUP.MAIL("JOBNAME")') "
CALL REFRESH
/* END OF SUBROUTINE */
RETURN
REFRESH :
DO I = 1 TO 6
IF BARPOINTER >= 66 THEN DO
BARCHAR = ''
BARPOINTER = 0
END
ELSE DO
BARCHAR = COPIES('C',BARPOINTER)
BARPOINTER = BARPOINTER + 1
END
ADDRESS ISPEXEC
"CONTROL DISPLAY LOCK"
"ADDPOP"
"LIBDEF ISPPLIB DATASET ID('M#T053.REXX.PROGRAM')"
"DISPLAY PANEL(VPANEL)"
"REMPOP"
END
ADDRESS ISPEXEC
"ADDPOP"
"LIBDEF ISPPLIB DATASET ID('M#T053.REXX.PROGRAM')"
"DISPLAY PANEL(VPANEL)"
RETURN
------- VERSION -------
/*rexx*/
/*to find out the latest version of gdg */
count = 0
say "enter the gdg to find the version"
pull gdg
do while gdg = ' '
say "kindly enter the gdg"
pull gdg
end
X= OUTTRAP("GDGINFO.",'*',"NOCONCAT")
ADDRESS "TSO" "LISTCAT ENT('"gdg"') GDG ALL"
g1=strip(gdginfo.8,,' ')
g2 = length(g1)
if g2 > 12 then
do
say " only base version is there"
exit
end
else
do j= 8 to gdginfo.0
count = count + 1
end
count = count - 1
c1 = 8 + count
/* reXX */
/* This rexx is used to create the verticla tracebility matrix */
"ALLOCATE F(TMP) DSN('M#T053.VERT.MEMBERS') SHR REUSE"
"EXECIO * DISKR TMP(STEM TEM. FINIS"
"FREE F(TMP)"
prev = 'dummy'
prevmon = 0
i = 0
init:
z = i + 1
do i = z to tem.0
item = substr(tem.i,12,5)
task = substr(tem.i,20,22)
task = strip(task)
changemon = substr(tem.i,44,2)
item1= substr(tem.i,12,7)
item1 = strip(item1)
len = length(item1)
if len > 5 then itemk = item || '*'
if item = prev & changemon = prevmon then signal init
else
do
prev = item
prevmon = changemon
select
when changemon = 09 then
month = SEP04
when changemon = 10 then
month = OCT04
when changemon = 11 then
month = NOV04
when changemon = 12 then
month = DEC04
otherwise
signal init
end /* select */
itemn = substr(item,1,1)
month1 = month || itemn
outdsn = 'M#T053.VERT.SEPTODEC.'|| month
vertdsn = strip(outdsn) || '(' || item || ')'
if SYSDSN("'"outdsn"'") <> 'OK' then
do
"alloc da('"outdsn"') dd(inp) NEW DIR(40) SPACE(50,50) DSORG(PO) ,
RECFM(F,B) LRECL(133) BLKSIZE(27930) MGMTCLAS(XTRABKUP)"
end
dsn = 'MTAT.COMMON.UTP.MISC.YEAR2004(' || item1 || ')'
itemk = substr(item,1,5) || '*'
dsn1 = 'MTAT.COMMON.UTP.MISC.YEAR2004(' || itemk || ')'
"ALLOCATE F(mis) DSN('"dsn"') SHR REUSE"
"EXECIO * DISKR mis(STEM misc. FINIS"
"FREE F(mis)"
srce = 'dummy'
do k = 1 to misc.0
upper misc.k
sourcepos = find(misc.k,'SOURCE')
cntlpos = find(misc.k,'CNTL')
jclpos = find(misc.k,'JCL')
/* REXX */
ADDRESS ISPEXEC "VGET (JOBNAME VID RG REGION ZDATE) PROFILE"
ADDRESS ISPEXEC "VGET ZDATE"
DD = SUBSTR(ZDATE,7,2)
MM = SUBSTR(ZDATE,4,2)
YY = SUBSTR(ZDATE,1,2)
IF YY < 98 THEN
PDATE = MM||'/'||DD||'/20'||YY
ELSE
PDATE = MM||'/'||DD||'/19'||YY
"ISREDIT MACRO"
"ISREDIT C ALL JOBNAME '"JOBNAME"'"
"ISREDIT C ALL TODATE '"PDATE"'"
"ISREDIT C ALL VID '"VID"'"
"ISREDIT C ALL RG '"RG"'"
"ISREDIT C ALL REGION '"REGION"'"
"ISREDIT SAVE"
"ISREDIT END"
------- WRPCOND -------
LSTDS = "'M#T053.WRAP.WORK'"
OUTDS = "'M#T053.BALU.MISC.CNTL(TIHEWRAP1)'"
O = 1
CAT = 1
DO I = 1 TO LST.0
J = I - 1
OUT.O = "***"
O = O + 1
OUT.O = "*** EMAIL REF# " || I || " - INCLUSION RULE " || I
O = O + 1
OUT.O = "***"
O = O + 1
OUT.O = "IF " COND
O = O + 1
OUT.O = " "
O = O + 1
OUT.O = " SET PASSED TO TRUE"
O = O + 1
OUT.O = " SET INCL-" || I || " TO TRUE"
O = O + 1
OUT.O = " GO TO 5300-EXIT"
O = O + 1
OUT.O = "END-IF"
O = O + 1
END
"ALLOC DD(OUTFILE) DA("OUTDS") SHR REU"
"EXECIO * DISKW OUTFILE (STEM OUT. FINIS"
"FREE F(OUTFILE)"
SAY "SCL GENERATED. EXITING..."
EXIT
------- WRPVAR -------
LSTDS = "'M#T053.WRAP.WORK'"
OUTDS = "'M#T053.BALU.MISC.CNTL(WRAPVAR)'"
O = 1
DO I = 1 TO LST.0
VAR1 = STRIP(SUBSTR(LST.I,14,8))
VAL1 = STRIP(SUBSTR(LST.I,26,8))
VAR2 = STRIP(SUBSTR(LST.I,37,8))
VAL2 = STRIP(SUBSTR(LST.I,47,8))
VAR3 = STRIP(SUBSTR(LST.I,63,8))
VAL3 = STRIP(SUBSTR(LST.I,74,8))
VAR4 = STRIP(SUBSTR(LST.I,102,8))
VAL4 = STRIP(SUBSTR(LST.I,116,8))
END
"ALLOC DD(OUTFILE) DA("OUTDS") SHR REU"
"EXECIO * DISKW OUTFILE (STEM OUT. FINIS"
"FREE F(OUTFILE)"
SAY "SCL GENERATED. EXITING..."
EXIT
------- ZIPGEN -------
LSTDS = "'M#T053.BALU.MISC.CNTL(DLZIP)'"
OUTDS = "'M#T053.BALU.MISC.CNTL(DLZIPFM)'"
O = 1
CNT = 1
LINE = " "
DO I = 1 TO LST.0
END
OUT.O = LINE || "."
"ALLOC DD(OUTFILE) DA("OUTDS") SHR REU"
"EXECIO * DISKW OUTFILE (STEM OUT. FINIS"
"FREE F(OUTFILE)"
SAY "SCL GENERATED. EXITING..."
EXIT