Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 3 Tools : $LISTPDS

$LISTPDS
Lists the member names of a partitioned data set (PDS), or retrieves the statistics for a PDS member. (C)
Invocation
CALL $LISTPDS(pds_name, buffer_address, member_name)
 
The pointer to the first or only buffer that contains the member names of the PDS. Each member name is 1 to 8 characters long and padded with blanks. The size of each buffer is 4096 bytes and can contain up to 511 member names. The buffers are provided by $LISTPDS.
To get the statistics for one PDS member: the 1- to 8‑character member name padded with blanks.

Exceptions
 
Examples
Listing Member Names
These sets of rules lists the names of the members of a PDS on the message log.

 
RULE EDITOR ===> SCROLL: P
LIST_PDS(PDS);
_ LOCAL PDSBUFF, BNEXT, MCOUNT, MEMBER;
_ -------------------------------------------------------------------------
_ ------------------------------------------------------------+------------
_ CALL MSGLOG('PDS_NAME entered: ' || PDS); ¦ 1
_ MEMBER = ' '; ¦ 2
_ CALL $LISTPDS(PDS, PDSBUFF, MEMBER); ¦ 3
_ UNTIL DONE : ¦ 4
_ @MAP.ADDRESS = PDSBUFF; ¦
_ @MAP.SIZE = 4096; ¦
_ INSERT @MAP('EXTERNALRO'); ¦
_ GET HZS81_MAP_WORD(PDSBUFF); ¦
_ BNEXT = HZS81_MAP_WORD.WORD; ¦
_ GET HZS81_MAP_WORD(PDSBUFF + 4); ¦
_ MCOUNT = HZS81_MAP_WORD.WORD; ¦
_ CALL LIST_PDS1(PDSBUFF, BNEXT, MCOUNT); ¦
_ PDSBUFF = BNEXT; ¦
_ END; ¦
_ CALL ENDMSG('Press PF2 to see the member list'); ¦ 5
_ -------------------------------------------------------------------------
_ ON ROUTINEFAIL :
_ CALL ENDMSG(RETURN_SYSMSG);

 
 
RULE EDITOR ===> SCROLL: P
LIST_PDS1(LIST, BNEXT, MCOUNT);
_
_ -------------------------------------------------------------------------
_ MCOUNT = 0; ¦ Y N N
_ BNEXT = 0; ¦ Y N
_ ------------------------------------------------------------+------------
_ CALL MSGLOG('No members in data set'); ¦ 1
_ FORALL HZS81_MAP_PDS(LIST + 8) WHERE KEY <= MCOUNT : ¦ 1 1
_ CALL MSGLOG(HZS81_MAP_PDS.MEMBER); ¦
_ END; ¦
_ SIGNAL DONE; ¦ 2 2
_ -------------------------------------------------------------------------

 
Executing the rules produces the following message log:

 
---------------------- INFORMATIONAL MESSAGE LOG -----------------------------
COMMAND ===> SCROLL ===> P
PDS_NAME entered: USR40.CNTL
EMAIL
FTP

 
Listing Information for a Member
The following set of rules receives the name of a member of a PDS and lists the statistics for that member.

 
RULE EDITOR ===> SCROLL: P
LIST_MEMSTATSS(PDS, MEMBER);
_ LOCAL PDSBUFF, LEN;
_ -------------------------------------------------------------------------
_ ------------------------------------------------------------+------------
_ CALL MSGLOG('PDS_NAME entered: ' || PDS ||'(' || MEMBER || ¦ 1
_ ')'); ¦
_ CALL $LISTPDS(PDS, PDSBUFF, MEMBER); ¦ 2
_ @MAP.ADDRESS = PDSBUFF; ¦ 3
_ @MAP.SIZE = 130; ¦ 4
_ INSERT @MAP('EXTERNALRO'); ¦ 5
_ GET HZS81_MAP_HALF(PDSBUFF); ¦ 6
_ LEN = HZS81_MAP_HALF.HALF; ¦ 7
_ CALL LIST_MEMSTATSS1(PDS, MEMBER, PDSBUFF, LEN); ¦ 8
_ -------------------------------------------------------------------------
_ ON ROUTINEFAIL :
_ CALL ENDMSG(RETURN_SYSMSG);

 
 
RULE EDITOR ===> SCROLL: P
LIST_MEMSTATSS1(PDS, MEMBER, PDSBUFF, LEN);
_ LOCAL VV, MM, SS, CREATED, CHANGED, HH, MN, SIZE, INITIAL, MODIFIED, USERID
_ ;
_ ---------------------------------------------------------------------------
_ LEN = 0; ¦ Y N N
_ LEN = 30; ¦ Y N
_ ------------------------------------------------------------+--------------
_ GET HZS81_MAP_STATS(PDSBUFF); ¦ 1
_ HZS81_MEMSTATS_H.* = HZS81_MAP_STATS.*; ¦ 2
_ HZS81_MEMSTATS_H.PDS_NAME = PDS; ¦ 3
_ HZS81_MEMSTATS_H.MEMBER = MEMBER; ¦ 4
_ INSERT HZS81_MEMSTATS_H('HZS81_MEMSTATS'); ¦ 5
_ DISPLAY HZS81_MEMSTATS; ¦ 6
_ CALL ENDMSG('No ISPF statistics exist for member: ' || ¦ 1
_ MEMBER); ¦
_ CALL ENDMSG( ¦ 1
_ 'User data is not ISPF statistics for member: ' || ¦
_ MEMBER); ¦
_ ---------------------------------------------------------------------------

 
Executing the rules produces the following information:

 
PDS NAME entered: USR40.CNTL
NAME VV MM CREATED CHANGED HH:MM:SS SIZE INITIAL MODIFIED USERID Len
EMAIL 1 2 103317 103317 21 22 12 18 22 1 USR40

 
See Also
The @MAP shareable tool.
 

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved