Ü RTVMBRD
In the following CL procedure, a RTVMBRD command
retrieves the description of a specific member. Assume a database file called
MFILE exists in the current library (MYLIB) and contains 3 members (AMEMBER,
BMEMBER, and CMEMBER).
DCL &LIB TYPE(*CHAR) LEN(10)
DCL &MBR TYPE(*CHAR) LEN(10)
DCL &SYS TYPE(*CHAR) LEN(4)
DCL &MTYPE TYPE(*CHAR) LEN(5)
DCL &CRTDATE TYPE(*CHAR) LEN(13)
DCL &CHGDATE TYPE(*CHAR) LEN(13)
DCL &TEXT TYPE(*CHAR) LEN(50)
DCL &NBRRCD TYPE(*DEC) LEN(10 0)
DCL &SIZE TYPE(*DEC) LEN(10 0)
DCL &USEDATE TYPE(*CHAR) LEN(13)
DCL &USECNT TYPE(*DEC) LEN(5 0)
DCL &RESET TYPE(*CHAR) LEN(13)
.
RTVMBRD FILE(MYLIB/MYFILE) MBR(AMEMBER *NEXT) +
RTNLIB(&LIB) RTNSYSTEM(&SYS) RTNMBR(&MBR) +
FILEATR(&MTYPE) CRTDATE(&CRTDATE) TEXT(&TEXT) +
NBRCURRCD(&NBRRCD) DTASPCSIZ(&SIZE) USEDATE(&USEDATE) +
USECOUNT(&USECNT) RESETDATE(&RESET)
The following information is returned to the
procedure:
·
The current library name (MYLIB) is placed into the CL variable name
&LIB
·
The system that MYFILE was found on is placed into the CL variable name
&SYS (*LCL means the file was found on the local system, and *RMT means the
file was found on a remote system.)
·
The member name (BMEMBER), since BMEMBER is the member immediately after
AMEMBER in a name ordered member list (*NEXT), is placed into the CL variable
named &MBR
·
The file attribute of MYFILE is placed into the CL variable named
&MTYPE (*DATA means the member is a data member, and *SRC means the file is
a source member.)
·
The creation date of BMEMBER is placed into the CL variable called
&CRTDATE
·
The text used to describe BMEMBER is placed into the CL variable called
&TEXT
·
The current number of records in BMEMBER is placed into the CL variable
called &NBRRCD
·
The size of BMEMBER's data space (in bytes) is placed into the CL
variable called &SIZE
·
The date that BMEMBER was last used is placed into the CL variable
called &USEDATE
·
The number of days that BMEMBER has been used is placed into the CL
variable called &USECNT The start date of this count is the value placed
into the CL variable called &RESET