IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Get RECORD LENGTH, allocated space of a GDG from a REXX.


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
justjpr

New User


Joined: 03 Nov 2022
Posts: 33
Location: INDIA

PostPosted: Wed Jul 24, 2024 7:59 pm
Reply with quote

I have an input file with 50+ datasets. I need code an REXX to write an output file with same list of files appneded with the following details:

Data Set Type ( VSM / GDG / SEQ),
Record Format ( VB / FB),
Record Length,
Allocated Space units (BLKS, TRKS, CYLS)
Allocated Primary quantity (In above units)
Allocated Secondary quantity (In above units)

I am able to do it for both VSAM (Using LISTCAT) & SEQ files (Using LISTDSI). I am facing challenges to do it for GDG. Even I passed with GDG version also, it doesn't help. Note : No PDS in the input. I can identify data Set Type ( VSM / GDG / SEQ), from the dataset name pattern.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2145
Location: USA

PostPosted: Wed Jul 24, 2024 8:21 pm
Reply with quote

justjpr wrote:
I have an input file with 50+ datasets.

What does this mean?
It's the same as
Quote:
I have a pocket with 50+ bags.

Stopped further reading after this point.
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1316
Location: Vilnius, Lithuania

PostPosted: Wed Jul 24, 2024 8:26 pm
Reply with quote

Do a listcat on the base of the GDG, and parse the output.
Back to top
View user's profile Send private message
justjpr

New User


Joined: 03 Nov 2022
Posts: 33
Location: INDIA

PostPosted: Wed Jul 24, 2024 10:15 pm
Reply with quote

prino wrote:
Do a listcat on the base of the GDG, and parse the output.


I tried it before posting my question here. LISTCAT on GDG base or version doesn't help. FYI. I do listcat on VSAM and parsing the output, it works perfectly, I get all these parameters somewhere in the output.

LISTCAT on base gives output that has individual version names and their attributes alsong with attributes of the base. But does not have LRECL, Allocated space info, or record format type.

Code:
                                                                             
  LISTC ALL  ENT('K760.K391.ZELLE.DAILY.EXTRACT')                             
                                                                             
 GDG BASE ------ K760.K391.ZELLE.DAILY.EXTRACT                               
      IN-CAT --- CATALOG.DEVSEQ01                                             
      HISTORY                                                                 
        DATASET-OWNER-----A70900     CREATION--------2020.184                 
        RELEASE----------------2     LAST ALTER------2024.181                 
      ATTRIBUTES                                                             
        LIMIT------------------5      SCRATCH    NOEMPTY    LIFO       NOPURGE
      ASSOCIATIONS                                                           
        NONVSAM--K760.K391.ZELLE.DAILY.EXTRACT.G0001V00                       
                                                                             
    NONVSAM ---- K760.K391.ZELLE.DAILY.EXTRACT.G0001V00                       
      IN-CAT --- CATALOG.DEVSEQ01                                             
     ASSOCIATIONS                                                             
       GDG------K760.K391.ZELLE.DAILY.EXTRACT                                 
     ATTRIBUTES                                                               
       VERSION-NUMBER---------2                                               
       STRIPE-COUNT-----------1                                               
                                                                               
       ACT-DIC-TOKEN----X'60010000000400000000000000000000000000000000000000000
       COMP-FORMT      EXTENDED                                               
     STATISTICS                                                               
       USER-DATA-SIZE--------30425101623     COMP-USER-DATA-SIZE--------2900086196
       SIZES-VALID--------(YES)                                               
                                                                               
         THE NUMBER OF ENTRIES PROCESSED WAS:                                 
                   AIX -------------------0                                   
                   ALIAS -----------------0                                   
                   CLUSTER ---------------0                                   
                   DATA ------------------0                                   
                   GDG -------------------1             
                   INDEX -----------------0             
                   NONVSAM ---------------1             
                   PAGESPACE -------------0             
                   PATH ------------------0             
                   SPACE -----------------0             
                   USERCATALOG -----------0             
                   TAPELIBRARY -----------0             
                   TAPEVOLUME ------------0             
                   TOTAL -----------------2             
                                                         
         THE NUMBER OF PROTECTED ENTRIES SUPPRESSED WAS 0
                                                         
IDC0001I FUNCTION COMPLETED, HIGHEST CONDITION CODE WAS 0
Back to top
View user's profile Send private message
justjpr

New User


Joined: 03 Nov 2022
Posts: 33
Location: INDIA

PostPosted: Wed Jul 24, 2024 10:47 pm
Reply with quote

sergeyken wrote:
justjpr wrote:
I have an input file with 50+ datasets.

What does this mean?
It's the same as
Quote:
I have a pocket with 50+ bags.

Stopped further reading after this point.

Sample input :
Code:
 Command ===>                                                  Scroll ===> CSR 
****** ***************************** Top of Data ******************************
000001 ----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
000002 FILE NAME (MAX LENGTH 36)----------- TYP FMT-LEN1------ PRY-- SEC-- UNT-
000003 ----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
000004 A001.XS01.BTDGB.ACCUM                                                   
000005 A005.AX15.MASTER.PLA                                                   
000006 C009.DP25.CH001.AIEEXTR.DOWNLOAD                                       
000007 B101.IS91.DAILY.EXTRACT                                                 
000008 D005.AC50.CMSBT02.MASTER                                               
000009 A059.SI30.PRINT.ADVICE                                                 
****** **************************** Bottom of Data ****************************


Sample output :

Code:
Command ===>                                                  Scroll ===> CSR 
****** ***************************** Top of Data ******************************
000001 ----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
000002 FILE NAME (MAX LENGTH 36)----------- TYP FMT-LEN1------ PRY-- SEC-- UNT-
000003 ----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
000004 A001.XS01.BTDGB.ACCUM                GDG FB          94    10    50 CYL
000005 A005.AX15.MASTER.PLA                 VSM FB         200    15   100 CYL
000006 C009.DP25.CH001.AIEEXTR.DOWNLOAD     SEQ FB         650     1    20 TRK
000007 B101.IS91.DAILY.EXTRACT              GDG VB        4869  2003  1500 CYL
000008 D005.AC50.CMSBT02.MASTER             VSM VB        1546   300   200 CYL
000009 A059.SI30.PRINT.ADVICE               SEQ VB        3036     8    01 BLK
****** **************************** Bottom of Data ****************************
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2145
Location: USA

PostPosted: Wed Jul 24, 2024 11:42 pm
Reply with quote

justjpr wrote:
sergeyken wrote:
justjpr wrote:
I have an input file with 50+ datasets.

What does this mean?
It's the same as
Quote:
I have a pocket with 50+ bags.

Stopped further reading after this point.

Sample input :
Code:
 Command ===>                                                  Scroll ===> CSR 
****** ***************************** Top of Data ******************************
000001 ----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
000002 FILE NAME (MAX LENGTH 36)----------- TYP FMT-LEN1------ PRY-- SEC-- UNT-
000003 ----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
000004 A001.XS01.BTDGB.ACCUM                                                   
000005 A005.AX15.MASTER.PLA                                                   
000006 C009.DP25.CH001.AIEEXTR.DOWNLOAD                                       
000007 B101.IS91.DAILY.EXTRACT                                                 
000008 D005.AC50.CMSBT02.MASTER                                               
000009 A059.SI30.PRINT.ADVICE                                                 
****** **************************** Bottom of Data ****************************

The correct description might be
Quote:
I have an input with 50+ DATASET NAMES.

This is a completely different story...
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2145
Location: USA

PostPosted: Wed Jul 24, 2024 11:47 pm
Reply with quote

justjpr wrote:
I tried it before posting my question here. LISTCAT on GDG base or version doesn't help. FYI. I do listcat on VSAM and parsing the output, it works perfectly, I get all these parameters somewhere in the output.

LISTCAT on base gives output that has individual version names and their attributes alsong with attributes of the base. But does not have LRECL, Allocated space info, or record format type.

It is possible, that every version of GDG may have its own attributes (though it almost never happens).
Nevertheless, after particular DSNAME for each GDG version has been found, the next step must be the same as for a normal PS dataset: consider it and process it as a stand-alone PS dataset.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10888
Location: italy

PostPosted: Thu Jul 25, 2024 12:02 am
Reply with quote

investigate the use of the LISTDSI command for each dataset in the input file

www.ibm.com/docs/en/zos/2.4.0?topic=tef-listdsi
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Run rexx with JCL Job CLIST & REXX 1
No new posts Run rexx in batch job CLIST & REXX 7
No new posts Does anyone know rexx for VSE CLIST & REXX 3
No new posts TSO ALLOC In REXX Needs Improvement JCL & VSAM 3
No new posts Copy only TEXT or String from a record SYNCSORT 4
Search our Forums:

Back to Top