MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Getting sequential files used DASD space through REXX

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
dhansr
Beginner


Joined: 26 May 2016
Posts: 14
Topics: 6

PostPosted: Fri May 27, 2016 4:47 pm    Post subject: Getting sequential files used DASD space through REXX Reply with quote

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.
Code:

000700,//REXX1   EXEC PGM=IKJEFT01,DYNAMNBR=10,TIME=1
000800,//SYSTSPRT DD  SYSOUT=*
000900,//SYSEXEC  DD  DSN=TEST.IP.PGM.REXXPGM1,DISP=SHR
001000,//SYSPROC  DD  DSN=TEST.IP.PGM.REXXPGM1,DISP=SHR
001100,//MEMLIST  DD  SYSOUT=*
001200,//SYSPRINT DD  SYSOUT=*
001300,//SORTMSG  DD  SYSOUT=*
001400,//SYSOUT   DD  SYSOUT=*
001500,//OUTPUT   DD  SYSOUT=*
001600,//SYSTSIN  DD  *
001700,PROFILE NOPREFIX
001800,REXLIST1 TEST.IP.REXX.INPUT.DSN
001900,/*

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 ***********

RC = 12.

Thanks.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12358
Topics: 75
Location: San Jose

PostPosted: Sat May 28, 2016 11:07 am    Post subject: Reply with quote

dhansr,

Learn to use code tags. I have edited your posts to have the code tags. Here is an example of how to use code tags.

http://www.mvsforums.com/helpboards/viewtopic.php?p=19031#19031

Now coming to your issue. Did you look up the message IRX0408E ?

IRX0408E - Exec member name must not be specified when exec load DD refers to a sequential data set.

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


and get the list of datasets with the pat
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
dhansr
Beginner


Joined: 26 May 2016
Posts: 14
Topics: 6

PostPosted: Tue May 31, 2016 8:12 pm    Post subject: Reply with quote

Thank You for the information, I will try the options provided. Very Happy
Back to top
View user's profile Send private message
t-bonham@scc.net
Supermod


Joined: 18 Oct 2012
Posts: 30
Topics: 0
Location: Minneapolis, MN

PostPosted: Fri Jun 17, 2016 5:21 pm    Post subject: Reply with quote

Frankly, this is an absolutely silly task!

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. Smile
Back to top
View user's profile Send private message Send e-mail AIM Address
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group