Skip to content

Latest commit

 

History

History
16 lines (16 loc) · 1.25 KB

README.md

File metadata and controls

16 lines (16 loc) · 1.25 KB

WRKOBJSQL

Work with SQL Objects for IBM i

The WRKOBJSQL command allows you to view a list of SQL-related objects for the specified library. You may do things like retrieve the SQL source code that was used to create the SQL object, view that source code, delete (drop) the object and more.

Compiling instructions

After uploading the source code to your IBM i source file members, use the following CL commands to create this utility.

Step 1: Create the Command Definition Object

CRTCMD CMD(COZTOOLS/WRKOBJSQL) PGM(COZTOOLS/WRKOBJSQL) SRCFILE(COZTOOLS/QCMDSRC) SRCMBR(WRKOBJSQL) REPLACE(*YES) 

Step 2: Create the Display File used by the RPG IV program

CRTDSPF FILE(COZTOOLS/WRKOBJSQL) SRCFILE(COZTOOLS/QDDSSRC) SRCMBR(WRKOBJSQL) REPLACE(*YES)

Step 3: Lastly, compile the SQL RPG IV source member

CRTSQLRPGI OBJ(COZTOOLS/WRKOBJSQL) SRCFILE(COZTOOLS/QRPGLESRC) SRCMBR(WRKOBJSQL) OBJTYPE(*PGM) REPLACE(*YES)

Using WRKOBJSQL

After compiling the command and related objects, use the WRKOBJSQL CL command to work with SQL objects in any library.

WRKOBJSQL SQLTOOLS

In this example, the SQL Tools product library is used. You should explore the QSYS2 library as well.