Hi Everybody! I have been browsing these forums for ages now and can honestly say that they've been extremely helpful on numerous occassions. This however is my first post/query, so please be gentle
Problem Background -
We have a problem wherein most of the test region Link Library PDS's that we use run out of space at frequent intervals with an SE37. As a result, we generally end up having to bring down the related CICS regions and reallocating space to the LinkLib PDS.
Query -
What I want to know is if there is any way out automating this process by checking the space status on all the Link Libs PDS's through a JCL and checking if the PDS is nearing an SE37 condition ?
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
Hi,
Hope I am not re-inventing the wheel,
The below REXX code will give the dataset attributes in a CSV report.
you can edit the output layout by changing the put statement.
I tried this out for an adhoc task, so it may not be the optimistic solution.
Please suggest changes if there are any shortcomings in the code.
1) XK89.SPACE.EXTRACT is - VB - 177 LRECL.
It contains the list of datasets you want to test,
It looks like,
Code:
EDIT XK89.SPACE.EXTRACT
Command ===>
****** ***************************** Top of Data *
000001 XK89.BORED.LOADLIB
000002 XK89.BORED.LOADLIB2
000003 XK89.BORED.LOADLIB4
****** **************************** Bottom of Data
2) XK89.LAZY.REPORT will contain the output report in CSV format.
Put the i/p datasets in XK89.SPACE.EXTRACT & run the code you will get the o/p in XK89.LAZY.REPORT.
Code:
/* REXX */
/*************************************/
/* AUTHOR - VASANTH S */
/* 13/09/2007 13:56 HRS */
/* NOTE : SOURCE DATSET SHOULD BE VB */
/*************************************/
"ALLOC F(THINK) DS('"XK89.LAZY.REPORT"') OLD"
INPUT_FILE ="'XK89.SPACE.EXTRACT'"
"ALLOC FI(INPF) DA("INPUT_FILE") SHR"
"EXECIO * DISKR INPF (STEM INP_LINES. FINIS "
J=1
REC.1 = 'DATASET,TYPE,PRIMARY,SECONDARY,VOLUMES,ACTUAL ALLOCATED,'||,
'ACTUAL USED,MAX ALLOC. POSSIBLE,ACTUAL % USED,MAX ALLOC. %USED,'||,
'SMS IND,RECFMT,LREC,BLKSIZE,M.CLASS,CYLTRK,FPRI,FSEC'
PARSE VAR REC.1 1 PART1 48 49 PART2 51 52
DO I = 1 TO INP_LINES.0
M=STRIP("'"INP_LINES.I"'")
Y=STRIP(INP_LINES.I)
SAY 'NOW PROCESSING ' M
ADDRESS ISPEXEC "DSINFO DATASET("M")"
IF (ZDSORG = 'PS' | ZDSORG = 'PO') THEN
DO
X=TRANSLATE(ZDSTOTA,,',')
PARSE VAR X X1 X2
X=X1||X2
/* SAY 'ZDSTOTA:' X */
Z=STRIP(X)
X=TRANSLATE(ZDSTOTU,,',')
PARSE VAR X X1 X2
A=X1||X2
/* SAY 'ZDSTOTA:' A */
V=STRIP(A)
ZDSTOTA_TEMP = Z * 1
ZDSEXTA=STRIP(ZDSEXTA)
IF ZDSSPC = 'CYLINDER' THEN
DO
CYLTRX = 'CYL'
IF (Z > 1000) | (Z = 1000) THEN
DO
FPRI = Z + 500
FSEC = 50
END
IF (Z < 500) & (Z > 100) THEN
DO
FPRI = Z + 150
FSEC = 20
END
IF (Z < 100) THEN
DO
FPRI = Z + 50
FSEC = 10
END
IF (Z = 500) THEN
DO
FPRI = Z + 150
FSEC = 20
END
IF (Z > 500) & (Z < 1000) THEN
DO
FPRI = Z + 250
FSEC = 30
END
END
IF ZDSSPC = 'TRACK' THEN
DO
CYLTRX = 'TRK'
IF (Z > 100) | (Z = 100) THEN
DO
FPRI = Z + 100
FSEC = 30
END
IF (Z < 50) | (Z = 50) THEN
DO
FPRI = Z + 50
FSEC = 20
END
IF (Z > 50) & (Z < 100) THEN
DO
FPRI = Z + 75
FSEC = 20
END
END
/* SAY 'Z:' Z */
/* SAY 'V:' V */
/* SAY 'ZDSEXTA:' ZDSEXTA */
/* SAY 'ZDS2EX:' ZDS2EX */
PRI_CYL=(Z - ((ZDSEXTA-1) * ZDS2EX))
SEC_CYL=STRIP(ZDS2EX)
IF ZDSTOTA_TEMP > 0 THEN
DO
ACTUAL_PCT = 100 - (((Z - V) / Z) * 100)
END
ELSE
DO
ACTUAL_PCT = 'ALLOCATED=0'
END
IF ZDS#VOLS > 1 THEN
DO
MAX_ALLOC = 'NA'
MAX_PCT = 'NA'
J=J+1
Y=LEFT(Y,48," ")
REC.J = Y||','||ZDSORG||','||PRI_CYL||ZDSSPC||','||SEC_CYL||ZDS2SPC||,
','||ZDS#VOLS||','||Z||ZDSSPC||','||V||','||,
MAX_ALLOC||','||ACTUAL_PCT||','||MAX_PCT','||ZDSDC||,
','||ZDSRF||','||ZDSLREC||','||ZDSBLK||','||ZDSMC||,
','CYLTRX||','||FPRI||','||FSEC
END
ELSE
DO
MAX_ALLOC = PRI_CYL + 15 * ZDS2EX
MAX_ALLOC_TEMP = MAX_ALLOC * 1
IF MAX_ALLOC_TEMP > 0 THEN
DO
MAX_PCT = 100 - (((MAX_ALLOC - V) / MAX_ALLOC) * 100 )
END
ELSE
DO
MAX_PCT = 'MAX ALLOC=0'
END
J=J+1
Y=LEFT(Y,48," ")
REC.J = Y||','||ZDSORG||','||PRI_CYL||ZDSSPC||','||SEC_CYL||ZDS2SPC||,
','||ZDS#VOLS||','||Z||ZDSSPC||','||V||','||,
MAX_ALLOC||ZDSSPC||','||ACTUAL_PCT||','||MAX_PCT','||ZDSDC||,
','||ZDSRF||','||ZDSLREC||','||ZDSBLK||','||ZDSMC||,
','CYLTRX||','||FPRI||','||FSEC
END
END
END
REC.0 = J
"EXECIO * DISKW THINK (FINIS STEM REC."
"FREE FILE(INPF)"
"FREE FILE(THINK)"
EXIT
@Expat - Thank you for getting back. I do not think we have ISMF in our shop or if we do, I am not aware. I will probably need to check with the Storage group regarding this. Using PDSE would indeed have been the best way to go, but most of these linklibs are ages old and will probably need to be redefined as PDSEs.
I wonder why nobody cares to look at the ISMF dataset listing and reporting dialog
it' s there, terrific filtering capabilities, gives all the info anybody would need
General consideration on
I wonder why there is such ignorance in the support groups ( storage in this case )
but the general tone of the posts suggests that support in the organization where the TS(Topic Starters) work
is pretty incompetent/ignorant/lazy/<add as many derogatory adjectives as You like>
same applies to the management
the usual approach in any decently managed organization
is to provide the end users with the most common and proper
tools/<how to's>/<code-jcl snippets>/pointers to the manuals
to enable them to carry on the most common tasks respecting the organization standards and practices
and please do not ask about having the ISMF results in a dataset... SAVE is there
Hey Enrico ... What would be the newbies guide to checking if ISMF exists and if it does - how do I go about checking its reporting facilities. Thanks in advance.
it all depends on Your primary ISPF options menu...
a note... ISMF provides sophisticated dialogs..
for a quick and dirty approach the plain ISPF 3.4 provides enough info
( for the newest ISPF releases at least )
the filtering is not that sophisticated but by sorting on the proper columns is a workable substitute
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
Hi Enrico,
You are right & I agree that we can use 3.4 option which has the % used and other statistics.
But actually it has some shortcomings,
1. If there is a requirement to monitor all system file prefixed with DLL.* which is about 13K datasets then it would consume quite a lot of time fetching the data from the catalogs.
2. After fetching, the command "SORT %used", it too will take quite sometime.
3. copying all the statistics of 3.4 option to a PSfile through SAVE LIST command will still take some wait time.
4. All these processes are in foreground and the operator has to wait till the operations are over.
Also sometimes the stats shown in 3.4 are not exactly correct. I don't remember the exact scenario though.
This is the reason why I was forced to re-invent the wheel
If the 3.4 can be considered as a tyre. Then the above REXX can be considered as a tubeless tyre