Posted: Fri May 27, 2016 4:47 pm Post subject: Getting sequential files used DASD space through REXX
Hi,
As part of performance improvement initiative i am identifying how much of space is used by files created by developers and which are not used and how much it is costing to organization.
I will be listing the sequential files in the input file.
I am using below code and job (got it from someone else) getting error message, please advise.
VIEW ,TEST.IP.REXX.INPUT.DSN ,Columns,00001,00072,
Command ===>, ,Scroll ===>,CSR ,
******,***************************** Top of Data ******************************
000100,TEST.IP.TESTFL04
000110,TEST.IP.TESTFL05
000200,TEST.IP.TESTFL06
******,**************************** Bottom of Data ****************************
REST.IP.PGM.REXXPGM1 is a sequential file where REXX program resides.
Code:
VIEW ,TEST.IP.PGM.REXXPGM1 ,Columns,00001,00072
Command ===>, ,Scroll ===>,CSR
******,***************************** Top of Data *****************************
000100,/********************** REXX *************************/
000200, /* THIS REXX READ A 80BYTE DATASET AND DOES */
000300, /* LISTDSI AGAINST EACH FILE. OUTPUT IS WRITTEN */
000400, /* OUT OF THE JOB. */
000500, /* */
000600, PARSE ARG DATASET
000700, DATASET = STRIP(DATASET,'B')
000800, CTRI1 = 0
000900, CTRO1 = 0
001000, ALLOC:
001100, "ALLOC FI(INPUTFLE) DA("||DATASET||") SHR REUSE"
001200, IF RC > 0 THEN DO
001300, SAY "ALLOCATE ERROR RC= " RC
001400, EXIT RC
001500, END
001600, READUMIN:
001700, /* READ IN THE INPUT FILES AS STEM VARIABLES */
001800, "EXECIO * DISKR INPUTFLE (STEM XXX. FINIS)"
001900, ADDRESS TSO "FREE F(INPUTFLE)"
002000, /* READ IN THE BASE INPUT FILE */
002100, GETREC:
002200, IF CTRI1 = XXX.0 THEN SIGNAL EXIT1
002300, CTRI1 = CTRI1 + 1
002400, DSNCHK = SUBSTR(XXX.CTRI1,1,44)
002500, DSNCHK = STRIP(DSNCHK,'B')
002600, ADDRESS TSO
002700, X = LISTDSI("'"DSNCHK"'")
002800, INTERPRET "X =" X
002900, IF SYSMSGLVL2 NE ' ' THEN
003000, DO
003100, ZEDLMSG = SYSMSGLVL2
003200, SAY DSNCHK||" "||ZEDLMSG
003300, SYSMSGLVL2 = ' '
003400, SIGNAL GETREC
003500, END
003600, SAY 'DATA SET NAME: ' SYSDSNAME
003700, SAY;
003800, SAY ' VOLUME SERIAL: ' SYSVOLUME
003900, SAY ' DEVICE TYPE: ' SYSUNIT',',
004000, '(TRKS/CYL 'SYSTRKSCYL', BLKS/TRK 'SYSBLKSTRK')'
004100, SAY ' ORGANIZATION: ' SYSDSORG
004200, SAY ' RECORD FORMAT: ' SYSRECFM
004300, SAY ' RECORD LENGTH: ' SYSLRECL
004400, SAY ' BLOCK SIZE: ' SYSBLKSIZE
004500, SAY ' ALLOCATION UNITS: ' SYSUNITS
004600, SAY ' SPACE ALLOCATED: ' SYSALLOC
004700, SAY ' SPACE USED: ' SYSUSED
004800, SAY ' PRIMARY ALLOCATION: ' SYSPRIMARY
004900, SAY ' SECONDARY ALLOCATION: ' SYSSECONDS
005000, SAY ' EXTENTS USED: ' SYSEXTENTS
005100, SAY ' CREATION DATE: ' SYSCREATE
005200, SAY ' EXPIRATION DATE: ' SYSEXDATE
005300, SIGNAL GETREC
005400, EXIT1:
005500, EXIT
******,**************************** Bottom of Data ******
Getting below error message:
Code:
********************************* TOP OF DATA **********************************
ACF0C038 ACF2 LOGONID ATTRIBUTES HAVE REPLACED DEFAULT USER ATTRIBUTES
READY
PROFILE NOPREFIX
READY
REXLIST1 TEST.IP.REXX.INPUT.DSN
IRX0408E Exec member name must not be specified when exec load DD refers to a se
READY
END
******************************** BOTTOM OF DATA ********************************
********************************* TOP OF DATA *************
T USER ATTRIBUTES
exec load DD refers to a sequential data set.
******************************** BOTTOM OF DATA ***********
Now look up the JCL and see why you have a REXLIST1 in your SYSTSIN. Once you figure that out it is resolve the error.
Alternatively You can get the %used space
1. Go to ISPF 3.4
2. Get the list of datasets for the pattern TEST.IP.TESTFL*
3. At the command prompt type in Sort %used and press enter.This will sort the datasets with %space used.
4. At the command prompt now type SAVE and press enter
5. Press PF1 to see the full name of the dataset this listing is saved
Given how incredibly cheap storage is nowadays, the time you spend on this it will probably cost the organization way more than the cost of the storage space for a year. Heck, the time you spent just asking this question would probably pay for that storage for a month.
The ratio between the cost of an hour of developer time and a megabyte of storage space is vast, and growing wider each year.
If it's a problem with DASD space, aggressively migrating developer files from DASD to tape is an effective solution. (And it's built into the operating system with SMS.)
You become a much more valuable employee when you can Suggest more effective ways to solve a problem for them. (But do it more tactfully than I did here.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum