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

Listing PDS members along with size


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

New User


Joined: 14 Jul 2012
Posts: 10
Location: India

PostPosted: Fri Sep 28, 2012 12:55 am
Reply with quote

Hi All,

The Requirement is to List all the members in a PDS Dataset along with size of the MEMBERs. Is it possible in REXX. Please give some tips to built further. PDS contains 2000+ Members.

Tnx
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4651
Location: Raleigh, NC, USA

PostPosted: Fri Sep 28, 2012 1:12 am
Reply with quote

What do you consider to represent the SIZE of a member? Number of lines? You can get all of this and more in ISPF.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Fri Sep 28, 2012 1:27 am
Reply with quote

An interesting question. The ISPF statistics of course include number of lines, as superk indicates, and the directory of a load library includes a SIZE (in bytes) field. I do not think, though, that there is a general method available through REXX of doing so, although you may not actually need a highly generalized method. What sort of PDS is it?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri Sep 28, 2012 2:57 am
Reply with quote

Reset ISPF statistics utility (option 3.5)
open the member window, in 3.5 or 3.4 or 3.2 or 3.1
save <listid>

now, you have a listing of pds members and their line count.
Back to top
View user's profile Send private message
umasankartt

New User


Joined: 14 Jul 2012
Posts: 10
Location: India

PostPosted: Mon Oct 01, 2012 12:32 am
Reply with quote

Akatsukami wrote:
An interesting question. The ISPF statistics of course include number of lines, as superk indicates, and the directory of a load library includes a SIZE (in bytes) field. I do not think, though, that there is a general method available through REXX of doing so, although you may not actually need a highly generalized method. What sort of PDS is it?



------

As you said and superk said, if the PDS contains normal data or some jcl it is possible to check the no. of line count and get the info. but my req. is for LOAD members. Some members contains 2 to 3 lines only but size is 20 bytes. So I am not able to get... icon_confused.gif
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Oct 01, 2012 1:52 am
Reply with quote

Hello,

Suggest you post part of the browse directory list (from tso/ispf 3.4).

I suspect you are not yet familiar with the info presented.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Oct 01, 2012 2:57 am
Reply with quote

umasankartt wrote:
[...] but my req. is for LOAD members. Some members contains 2 to 3 lines only but size is 20 bytes. So I am not able to get... icon_confused.gif


Do you mean 20k or something, or actually 20 bytes. If actually 20 bytes, it is not a load module.

In addition to the PDS information Dick is drawing your attention to, which does have the size of the load module (the "size"), AMBLIST reports on modules, including "LENGTH OF MODULE". There is a lot of additional information, but if you have a bit of rexx (or whatever) to process the output listing from AMBLIST, when you happen sometime in the future to need to know something else that is on the report, you'll be 90% of the way there already.
Back to top
View user's profile Send private message
umasankartt

New User


Joined: 14 Jul 2012
Posts: 10
Location: India

PostPosted: Tue Oct 02, 2012 1:34 am
Reply with quote

Hi,

Code:
 Menu  Functions  Confirm  Utilities  Help                                   
 ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
 SYSUMA DSLIST     SSSSS.EEEEE.LOAD                       Row 00001 of 06096
 Command ===>                                                  Scroll ===> CSR 
            Name     Prompt        Alias-of     Size      TTR     AC   AM   RM 
 _________ AAAAAA                             00002278   2C1B19   00    31  ANY
 _________ AAABBB                             00003278   2A4917   00    31  ANY
 _________ AACCCC                             000033C8   2A4A05   00    31  ANY
 _________ AADDDD                             000033C8   2A4A15   00    31  ANY
 _________ AAEEEEE                             00003260   2A4B01   00    31  ANY
 _________ AAFFFFF                             00002260   2A4B11   00    31  ANY
 _________ AARRRR                             00003260   2A4B20   00    31  ANY
 _________ AAGGGG                            00002278   2A4C09   00    31  ANY
 _________ AAHHHH                             000022B8   2A4C18   00    31  ANY
 _________ AAIIII                             00002260   2A4D04   00    31  ANY
 _________ AAECAB                             00003A10   2A4D13   00    31  ANY
   -ISFPCU4 OS390U   *DSLIST     


Here in code AAAAAAA member the no. of lines is 15 and size is 2278, I want to capture this member list along with size for 6000+ member(find at top). And I started coding REXX from 25th Sep so i am new to REXX functions and new concepts. If u suggest some sites to get knowledge hope that is ok to start writing for req.

Thanks to dick scherrer & Bill Woodger
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Oct 02, 2012 1:38 am
Reply with quote

Hello,

In the member you mention, the length is 2278 (in Hex). In decimal this is 8824.

The number of lines is not the length.
Back to top
View user's profile Send private message
umasankartt

New User


Joined: 14 Jul 2012
Posts: 10
Location: India

PostPosted: Tue Oct 02, 2012 1:56 am
Reply with quote

Hi Bill,

As you said I used AMBLIST keyword and get the jcl and submitted it shows lot of info including the size. now i will get the length thro REXX. Thank u thank u......
Code:

//AMBLISTS JOB 'UMAS',CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1), 
//   REGION=0M,NOTIFY=&SYSUID                             
//* SHOW LOAD MODULE ATTRIBUTES                           
//AMBLIST  EXEC PGM=AMBLIST                               
//SYSPRINT DD  SYSOUT=*                                   
//SYSIN    DD *                                           
 LISTLOAD DDN=SYSLMOD                                     
/*                                                       
//SYSLMOD  DD DSN=XXXX.EEEEE.LOAD,DISP=SHR               
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2372
Location: Silicon Valley

PostPosted: Tue Oct 02, 2012 2:17 am
Reply with quote

Quote:
Here in code AAAAAAA member the no. of lines is 15


Where did you get the number of lines? Load module datasets should have a record format of U (unformatted). That is, there are not any lines.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Tue Oct 02, 2012 3:27 am
Reply with quote

Uma Sankar, begin with this. If it is unclear, we will talk further.
Code:
/* Rexx */                                                             
/*********************************************************************/
/*                                                                   */
/* This routine incorporates ideas and algorithms by Doug Nadel.     */
/*                                                                   */
/*********************************************************************/
  trace o                                                               
  x = msg("OFF")                                                       
  arg pds                                                               
                                                                       
  y = LISTDSI("'" || pds || "'")                                       
                                                                       
  if (y¬=0) then                                                       
    return 8                                                           
                                                                       
  if (substr(sysdsorg,1,2)¬="PO") then                                 
    return 12                                                           
                                                                       
  "ALLOC DA('" || pds || "') FI(TULUT1) SHR LRECL(256) RECFM(F B) DSORG(PS)"
  "EXECIO * DISKR TULUT1 (FINIS STEM ENTRY."                           
  "FREE FI(TULUT1)"                                                     
                                                                       
  do i = 1 to   entry.0                                                 
    /* the first two bytes are the logical record length */             
    parse var entry.i entryl 3 entry.i                                 
    entry.i = substr(entry.i,1,c2d(entryl)-2)                           
                                                                       
    do while (entry.i¬='')                                             
      parse var entry.i member 9 ttr 12 pds2indc 13 . 23 length 26 entry.i
      b = x2b(c2x(pds2indc))                                           
                                                                       
      if (substr(b,1,1)='1') then do                                   
        parse var entry.i . 12 alias 20 entry.i                         
        c = (x2d(b2x(substr(b,5))) * 2)                                 
      end                                                               
      else do                                 
        alias = ''                             
        c = (x2d(b2x(substr(b,4))) * 2) - 13   
      end                                     
                                               
      if (member='FFFFFFFFFFFFFFFF'x) then     
        leave i                               
                                               
      ttr = c2x(ttr)                           
      length = c2x(length)                     
      say member "is" length "(hex) bytes long"
                                               
      if (alias¬='') then member = alias       
      entry.i = delstr(entry.i,1,c)           
    end                                       
  end                                         
                                               
  return 0                                     
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2372
Location: Silicon Valley

PostPosted: Tue Oct 02, 2012 4:32 am
Reply with quote

Quote:
If actually 20 bytes, it is not a load module.


I just checked IEFBR14 and the member list shows a size of 00000008, with:
Code:
********************************* Top of Data **********************************
.Ø......IEFBR14 ........                                                       
س..............................................................................
Ø..5695PMB01 ....|..ë.                                                         
Ø..Ø..566896201 ....¤                                                           
Ø.h......RSI53390780                                                           
............ .......                                                           
...Ú....                                                                       
******************************** Bottom of Data ********************************


Now I am confused about what a size of '8' really means. Clearly there are more than 8 bytes in the member. Nor are there 8 blocks of data.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10833
Location: italy

PostPosted: Tue Oct 02, 2012 4:50 am
Reply with quote

the ISPF member list shows the SIZE of the <module> i.e what gets loaded and executed
the rest is binder/loader info needed for the proper <loading> and relocating of the executable in virtual storage
for example all the RLD ( Relocation and Linkage Directory ) needed to adjust the addresses of relocatable entries inside the load.
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 Dataset size increase on adding 1 byt... DFSORT/ICETOOL 8
No new posts list pds members name starting with xyz CLIST & REXX 11
No new posts REXX editmacro to compare two members... CLIST & REXX 7
No new posts TWA size of the CPLT transaction CICS 0
No new posts Easy way to delete selected members f... IBM Tools 12
Search our Forums:

Back to Top