Figure 1. Listing from a precompiler5722ST1 V5R4M0 060210 Create SQL ILE C Object UPDATEPGM 02/10/06 14:30:10 Page 1
Source type...............C
Object name...............TST/UPDATEPGM
Source file...............*LIBL/QCSRC
Member....................*OBJ
Options...................*XREF
Listing option............*PRINT
Target release............*CURRENT
INCLUDE file..............*LIBL/*SRCFILE
Commit....................*CHG
Allow copy of data........*YES
Close SQL cursor..........*ENDACTGRP
Allow blocking............*READ
Delay PREPARE.............*NO
Generation level..........10
Margins...................*SRCFILE
Printer file..............*LIBL/QSYSPRT
Date format...............*JOB
Date separator............*JOB
Time format...............*HMS
Time separator ...........*JOB
Replace...................*YES
Relational database.......RCHASLKM
User .....................*CURRENT
RDB connect method........*DUW
Default Collection........*NONE
Package name..............*OBJLIB/*OBJ
Created object type.......*PGM
Debugging view............*NONE
Dynamic User Profile......*USER
Sort Sequence.............*JOB
Language ID...............*JOB
IBM SQL flagging..........*NOFLAG
ANS flagging..............*NONE
Text......................*SRCMBRTXT
Source file CCSID.........37
Job CCSID.................65535
Source member changed on 02/10/06 14:25:33
5722ST1 V5R4M0 060210 Create SQL ILE C Object UPDATEPGM 02/10/06 14:30:10 Page 2
Record*...+... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 ...+... 8 SEQNBR Last change
1 /********************************************************************/ 100
2 /* This program is called to update the DEPTCODE of file RWDS/DPT1 */ 200
3 /* to NULL. This is run once a month to clear out the old */ 300
4 /* data. */ 400
5 /* */ 500
6 /* NOTE: Because this program was compiled with an RDB name, it is */ 600
7 /* not necessary to do a connect, as an implicit connect will take */ 700
8 /* place when the program is called. */ 800
9 /********************************************************************/ 900
10 #include <stdio.h> 1000
11 #include <stdlib.h> 1100
12 exec sql include sqlca; 1200
13 1300
14 main() 1400
15 { 1500
16 /* Just update RWDS/DPT1, setting deptcode = NULL */ 1600
17 exec sql update RWDS/DPT1 1700
18 set deptcode = NULL; 1800
19 } 1900
* * * * * E N D O F S O U R C E * * * * *
Figure 2. Listing from a precompiler (continued)
5722ST1 V5R4M0 060210 Create SQL ILE C Object UPDATEPGM 02/10/06 14:30:10 Page 3
CROSS REFERENCE
Data Names Define Reference
DEPTCODE **** COLUMN
18
DPT1 **** TABLE IN RWDS
17
RWDS **** COLLECTION
17
5722ST1 V5R4M0 060210 Create SQL ILE C Object UPDATEPGM 02/10/06 14:30:10 Page 4
DIAGNOSTIC MESSAGES
MSG ID SEV RECORD TEXT
SQL0088 0 17 Position 15 UPDATE applies to entire table.
SQL1103 10 17 Field definitions for file DPT1 in RWDS not found.
Message Summary
Total Info Warning Error Severe Terminal
2 1 1 0 0 0
10 level severity errors found in source
19 Source records processed
* * * * * E N D O F L I S T I N G * * * * *