Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 9

Use of various Commands in CL

Add Library List Entry (ADDLIBLE) Adds a library name to the user portion of the library list. User can specify whether the library is added to the beginning, to the end, or to the library list before, after or replacing a library that is currently in the user portion of the library list. ADDLIBLE LIB(LIBA) POSITION(*FIRST) Remove Library List Entry (RMVLIBLE) This command removes a library name from the user portion of the library list. RMVLIBLE LIB(LIBA)

Use of various Commands in CL


Retrieve Member Description (RTVMBRD) Used to retrieve information about a member of a database file for use in your applications. 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)

Retrieve Job Attributes (RTVJOBA) Used in a CL program to retrieve the values of one or more job attributes and place the values into the specified CL variable.
RTVJOBA JOB(&JOB) USER(&USER) NBR(&NBR)

Use of various Commands in CL


Retrieve System Value (RTVSYSVAL) Used in a CL program to retrieve the value from the specified system value so that it can be used in the program. RTVSYSVAL SYSVAL(QTIME) RTNVAR(&TIME) Retrieve User Profile (RTVUSRPRF) Used in a CL program to get one or more of the values that are stored and associated with a user.

RTVUSRPRF RTNUSRPRF(&USRPRF)

Use of various Commands in CL


Check Object (CHKOBJ) The Check Object (CHKOBJ) command checks object existence and verifies the user's authority to the object before trying to access it. CHKOBJ OBJ(MYLIB/MYFILE) OBJTYPE(*FILE) Clear Physical File Member (CLRPFM) This command removes all the data (including deleted records) from the specified member of a physical file.

CLRPFM FILE(MYLIB/MYFIL) MBR(MYMBR)

Use of various Commands in CL


Override with Data Base File (OVRDBF) This command is used to (1) Override (replace) the file named in the program. (2) Override certain parameters of a file that are used by the program.

Open Query File (OPNQRYF) This command opens a file to a set of database records that satisfies a database query request.

Use of various Commands in CL


Display File Description (DSPFD) This command shows one or more types of information retrieved from the file descriptions of one or more database and/or device files. The information is provided for each access. The information can be shown, printed, or directed to a database output file (OUTFILE). Display File Field Description (DSPFFD) This command shows, prints, or places in a database file field-level information for one or more files in a specific library or all the libraries to which the user has access.

Use of various Commands in CL


Display Program (DSPPGM) This command displays information about a program. The display includes information about the compiler, the source from which the program was created, certain processing attributes of the program, the size of the program, and the number of parameters that must be passed to the program when it is called.

Use of various Commands in CL


Display Program References (DSPPGMREF) This command provides a list of the system objects referred to by the specified programs. The following list shows the system objects provided for the respective program types: RPG *FILE, *DTAARA, and *PGM RPGLE *FILE, *PGM, *DTAARA, and *SRVPGM
This information can be displayed, printed, or placed in a database output file.

You might also like