Command reference / CL
RTVMBRD
Retrieve Member Description
Used in a CL program or REXX procedure to return member-level information from a database file into CL variables. The information covers the library, member name, file attribute and type, source type and source change date, creation and expiration dates, text, current and deleted record counts, open data path sharing, data space and access path sizes, change, save, and restore dates, the number of data members for a logical file, and the last-used date, days-used count, and days-used reset date.
Allowed environments: *BPGM, *IPGM, *BREXX, *IREXX.
Use within a CL program.
Positional parameters: 1.
Parameters
FILE
File
Names the file that contains the member. Qualifier 1 is the file name and qualifier 2 is its library. You need *USE authority on the file and *EXECUTE authority on the library.
*LIBL- All libraries in the thread's library list are searched until the first match is found.
*CURLIB- The job's current library is searched. If none is set in the library list, QGPL is used.
Qualified parts (object, then library; write LIBRARY/OBJECT)
File
File
Library
Library
Suggested / special values:
*LIBL, *CURLIB
MBR
Member
Specifies the member to retrieve, as a single value (*FIRST or *LAST) or as a reference member plus a relationship (*SAME, *NEXT, or *PRV). A generic name ending in an asterisk is also allowed.
*FIRST- The first member in a date-ordered list is retrieved.
*LAST- The last member in a date-ordered list is retrieved.
*FIRSTMBR- The first member in a name-ordered list is retrieved. Requires *SAME as the relationship.
*LASTMBR- The last member in a name-ordered list is retrieved. Requires *SAME as the relationship.
*SAME- The reference member itself is retrieved.
*NEXT- The member immediately after the reference member in name order is retrieved.
*PRV- The member immediately before the reference member in name order is retrieved.
Elements in order
Reference member
Reference member
Suggested / special values:
*FIRSTMBR, *LASTMBR
Relationship
Relationship
Allowed values:
*SAME, *NEXT, *PRV
RTNSYSTEM
CL var for RTNSYSTEM (4)
Receives the name of the system the file was retrieved from. Use a 4-character variable.
*LCL- The file was found on the local system.
*RMT- The file was found on a remote system.
RTNLIB
CL var for RTNLIB (10)
Receives the name of the library containing the file that holds the member. Use a 10-character variable.
RTNMBR
CL var for RTNMBR (10)
Receives the name of the member whose description is retrieved. Use a 10-character variable.
FILEATR
CL var for FILEATR (3)
FILETYPE
CL var for FILETYPE (5)
SRCTYPE
CL var for SRCTYPE (10)
SRCCHGDATE
CL var for SRCCHGDATE (13)
CRTDATE
CL var for CRTDATE (13)
Receives the member creation century, date, and time, in CYYMMDDHHMMSS format. Use a 13-character variable.
EXPDATE
CL var for EXPDATE (7)
TEXT
CL var for TEXT (50)
Receives the member text. Use a 50-character variable.
NBRCURRCD
CL var for NBRCURRCD (10 0)
Receives the current number of nondeleted records in the member. For a keyed logical member this is the number of index entries. For a join logical file it totals the records in the joined files.
NBRDLTRCD
CL var for NBRDLTRCD (10 0)
SHARE
CL var for SHARE (4)
DTASPCSIZ
CL var for DTASPCSIZ (15 0)
Receives the member's data space size in bytes. Zero is returned for a logical file member. Use a 15-digit decimal.
ACCPTHSIZ
CL var for ACCPTHSIZ (12 0)
CHGDATE
CL var for CHGDATE (13)
SAVDATE
CL var for SAVDATE (13)
RSTDATE
CL var for RSTDATE (13)
NBRDTAMBRS
CL var for NBRDTAMBRS (2 0)
USEDATE
CL var for USEDATE (7)
USECOUNT
CL var for USECOUNT (5 0)
RESETDATE
CL var for RESETDATE (7)
Examples
RTVMBRD FILE(*CURLIB/MYFILE) MBR(BMEMBER *SAME) RTNLIB(&LIB) RTNSYSTEM(&SYS) RTNMBR(&MBR) CRTDATE(&CRTDATE) TEXT(&TEXT) NBRCURRCD(&NBRRCD) DTASPCSIZ(&SIZE)
Retrieves the description of member BMEMBER in file MYFILE, found through the current library, and returns its library, system, name, creation date, text, record count, and data space size into the CL variables.
Generated from os/cl/catalog/RTVMBRD.json and os/cl/help/RTVMBRD.json.