I am trying to find the space taken by the latest GDG version, if a gDG base is provided to the rexx program.
I guess it could be done through LMDLIST service. I have written the following code.
Could someone please enlighten me what changes I make in this code.
Which are the variables to look for in to find the space consumed in bytes by this file.
/* REXX */
SAY PLEASE ENTER GDG BASE
PULL GDG */
X=OUTTRAP(LST.) /* LISTCAT GDG BASE */
" LISTC ENT('"GDG"')"
DO A = LST.0 TO 1 BY -1 /* FIRST FIND = 0 GDG */
IF POS('NONVSAM',LST.A) > 0 THEN DO
DSN = SUBSTR(LST.A,POS('NONVSAM',LST.A)+13,44)
A = 0
SAY "GDG=" GDG
SAY "DSN =" DSN