The slow way is to look in the Application Summary.
But what if you have tens of thousands of applications?
The exit information is kept in the ARSAPP table in a column INDEXER which is a VARCHAR somewhere around a thousand.
I am not an SQL expert. Improvements on the method below are welcome.
There are three ways to identify an exit in the VARCHAR:
INPEXIT=
INDXEXIT=
ANYEXIT=
The first thing I did was find out what was the longest INDEXER column:
SELECT LENGTH(INDEXER) FROM ARSSERV3.ARSAPP
WHERE SUBSTR(INDEXER,1) LIKE '%EXIT%'
ORDER BY LENGTH(INDEXER);
(this identifies the longest row with an exit and the length I may need to search on below)
I'm doing all this work via batch on z/OS.
Here's the JCL I use:
//JOBLIB DD DISP=SHR,DSN=DSN.DB2VA10.SDSNLOAD
//BATCHSQL EXEC PGM=IKJEFT01,DYNAMNBR=20
//SYSTSPRT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSTSIN DD *
DSN SYSTEM(DB1X)
RUN PROGRAM(DSNTEP2) PLAN(DSNTEP10) -
LIB('DSN.L2DB1X.RUNLIB.LOAD')
END
/*
//SYSIN DD *
SELECT LENGTH(INDEXER) FROM ARSSERV3.ARSAPP
WHERE SUBSTR(INDEXER,1) LIKE '%EXIT%'
ORDER BY LENGTH(INDEXER);
Unfortunately, because I run in batch I only get 133 columns of output so to see exactly what I'm doing I have to SUBSTRING the data out 133 columns at a time.
Also unfortunately, the character string EXIT could be within comments.
Anyway, so I end up running brute force SELECTs to get the INDEXER fields that have EXIT in them, 133 character columns at a time.
SELECT SUBSTR(INDEXER,1,133) FROM ARSSERV3.ARSAPP
WHERE SUBSTR(INDEXER,1,1000) LIKE '%EXIT%';
SELECT SUBSTR(INDEXER,134,133) FROM ARSSERV3.ARSAPP
WHERE SUBSTR(INDEXER,1,1000) LIKE '%EXIT%';
Comments and improvements welcome. ;D
Ed Arnold
Hi Ed,
Hope you are trying to find out the exits used. If that is the case try out the below query
SELECT NAME, SUBSTR(INDEXER,POSITION('EXIT',INDEXER,OCTETS),133) FROM ARSAPP
WHERE INDEXER LIKE '%EXIT%';
Hi Ed,
I am new to CMOD, but if you know how big your output will be, I would change my JCL to create a file for the SYSPRINT DD. That way you won't have to "substring" the output, if you don't want to. I do that with a lot of my jcl to allow me to catalog and compare results.
Thanks,
Janine