
When the host variable appears in an SQL statement, the Db2 precompiler places this CCSID into the structures that it generates for the SQL statement. When it appears in an application program, the DECLARE VARIABLE statement causes the Db2 precompiler to tag a host variable with a specific CCSID. The DECLARE VARIABLE statement defines a CCSID for a host variable and the subtype of the variable.
#HPM VICTORIA 2 UPDATE#
Do the following: 1) Declare cursor C1 for select * from table where ac_no = :hv-acc-no 2) Open the file and Read the record, get the a/c number = file-acc-no, Until EOF 3) Move file-acc-no to hv-acc-no and open cursor C1 4) Fetch C1, Until SQLCODE = 100 (No more rows) 5) Update table set db2_name= :file-name where CURRENT OF C1 6) once.If you are using PDM, option 14 will create a bound program, and. To compile an SQLRPGLE source member, use the "Create SQL ILE RPG Object" (CRTSQLRPGI) command. In order to create an RPGLE source member that can use embedded SQL, you must use a source type of SQLRPGLE. SQLRPGLE Select Statement for db2 in iSeries (AS400) - Fetch using Cursor.All I want to do is make a Created Global Temp Table (CGTT) and append data to it.


Below is a elementary example of what I cannot get to work.

#HPM VICTORIA 2 CODE#
If I can get the below code to work I'm set for the whole project. I normally use SQL Server but for this project I'm having to learn DB2.
