View previous topic :: View next topic
|
Author |
Message |
umasankartt
New User
Joined: 14 Jul 2012 Posts: 10 Location: India
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1787 Location: Bloomington, IL
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
Back to top |
|
|
umasankartt
New User
Joined: 14 Jul 2012 Posts: 10 Location: India
|
|
|
|
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... |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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... |
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 |
|
|
umasankartt
New User
Joined: 14 Jul 2012 Posts: 10 Location: India
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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 |
|
|
umasankartt
New User
Joined: 14 Jul 2012 Posts: 10 Location: India
|
|
|
|
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 |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2593 Location: Silicon Valley
|
|
|
|
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 |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1787 Location: Bloomington, IL
|
|
|
|
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 |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2593 Location: Silicon Valley
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
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 |
|
|
|