home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a524 / 42.ddi < prev    next >
DiskDupe Disk Image  |  1994-05-19  |  1.2 MB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: DiskDupe Disk Image (archive/diskDupeDiskImage).

You can browse this item here: 42.ddi

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert DiskDupe Disk Image (archive/diskDupeDiskImage) magic Supported
100% file data default
99% TrID DiskDupe Disk Image (newer/generic) default
0% TrID Sybase iAnywhere database files default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 49 4d 00 00 00 00 00 00 | 00 00 02 00 00 00 00 00 |IM......|........|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000060| 00 00 00 00 01 01 00 00 | 00 01 01 02 00 00 00 01 |........|........|
|00000070| 01 03 00 00 00 01 01 04 | 00 00 00 01 01 05 00 00 |........|........|
|00000080| 00 01 01 06 00 00 00 01 | 01 07 00 00 00 01 01 08 |........|........|
|00000090| 00 00 00 01 01 09 00 00 | 00 01 01 0a 00 00 00 01 |........|........|
|000000a0| 01 0b 00 00 00 01 01 0c | 00 00 00 01 01 0d 00 00 |........|........|
|000000b0| 00 01 01 0e 00 00 00 01 | 01 0f 00 00 00 01 01 10 |........|........|
|000000c0| 00 00 00 01 01 11 00 00 | 00 01 01 12 00 00 00 01 |........|........|
|000000d0| 01 13 00 00 00 01 01 14 | 00 00 00 01 01 15 00 00 |........|........|
|000000e0| 00 01 01 16 00 00 00 01 | 01 17 00 00 00 01 01 18 |........|........|
|000000f0| 00 00 00 01 01 19 00 00 | 00 01 01 1a 00 00 00 01 |........|........|
|00000100| 01 1b 00 00 00 01 01 1c | 00 00 00 01 01 1d 00 00 |........|........|
|00000110| 00 01 01 1e 00 00 00 01 | 01 1f 00 00 00 01 01 20 |........|....... |
|00000120| 00 00 00 01 01 21 00 00 | 00 01 01 22 00 00 00 01 |.....!..|..."....|
|00000130| 01 23 00 00 00 01 01 24 | 00 00 00 01 01 25 00 00 |.#.....$|.....%..|
|00000140| 00 01 01 26 00 00 00 01 | 01 27 00 00 00 01 01 28 |...&....|.'.....(|
|00000150| 00 00 00 01 01 29 00 00 | 00 01 01 2a 00 00 00 01 |.....)..|...*....|
|00000160| 01 2b 00 00 00 01 01 2c | 00 00 00 01 01 2d 00 00 |.+.....,|.....-..|
|00000170| 00 01 01 2e 00 00 00 01 | 01 2f 00 00 00 01 01 30 |........|./.....0|
|00000180| 00 00 00 01 01 31 00 00 | 00 01 01 32 00 00 00 01 |.....1..|...2....|
|00000190| 01 33 00 00 00 01 01 34 | 00 00 00 01 01 35 00 00 |.3.....4|.....5..|
|000001a0| 00 01 01 36 00 00 00 01 | 01 37 00 00 00 01 01 38 |...6....|.7.....8|
|000001b0| 00 00 00 01 01 39 00 00 | 00 01 01 3a 00 00 00 01 |.....9..|...:....|
|000001c0| 01 3b 00 00 00 01 01 3c | 00 00 00 01 01 3d 00 00 |.;.....<|.....=..|
|000001d0| 00 01 01 3e 00 00 00 01 | 01 3f 00 00 00 01 01 40 |...>....|.?.....@|
|000001e0| 00 00 00 01 01 41 00 00 | 00 01 01 42 00 00 00 01 |.....A..|...B....|
|000001f0| 01 43 00 00 00 01 01 44 | 00 00 00 01 01 45 00 00 |.C.....D|.....E..|
|00000200| 00 01 01 46 00 00 00 01 | 01 47 00 00 00 01 01 48 |...F....|.G.....H|
|00000210| 00 00 00 01 01 49 00 00 | 00 01 01 4a 00 00 00 01 |.....I..|...J....|
|00000220| 01 4b 00 00 00 01 01 4c | 00 00 00 01 01 4d 00 00 |.K.....L|.....M..|
|00000230| 00 01 01 4e 00 00 00 01 | 01 4f 00 00 00 01 01 50 |...N....|.O.....P|
|00000240| 00 00 00 01 01 51 00 00 | 00 01 01 52 00 00 00 01 |.....Q..|...R....|
|00000250| 01 53 00 00 00 01 01 54 | 00 00 00 01 01 55 00 00 |.S.....T|.....U..|
|00000260| 00 01 01 56 00 00 00 01 | 01 57 00 00 00 01 01 58 |...V....|.W.....X|
|00000270| 00 00 00 01 01 59 00 00 | 00 01 01 5a 00 00 00 01 |.....Y..|...Z....|
|00000280| 01 5b 00 00 00 01 01 5c | 00 00 00 01 01 5d 00 00 |.[.....\|.....]..|
|00000290| 00 01 01 5e 00 00 00 01 | 01 5f 00 00 00 01 01 60 |...^....|._.....`|
|000002a0| 00 00 00 01 01 61 00 00 | 00 01 01 62 00 00 00 01 |.....a..|...b....|
|000002b0| 01 63 00 00 00 01 01 64 | 00 00 00 01 01 65 00 00 |.c.....d|.....e..|
|000002c0| 00 01 01 66 00 00 00 01 | 01 67 00 00 00 01 01 68 |...f....|.g.....h|
|000002d0| 00 00 00 01 01 69 00 00 | 00 01 01 6a 00 00 00 01 |.....i..|...j....|
|000002e0| 01 6b 00 00 00 01 01 6c | 00 00 00 01 01 6d 00 00 |.k.....l|.....m..|
|000002f0| 00 01 01 6e 00 00 00 01 | 01 6f 00 00 00 01 01 70 |...n....|.o.....p|
|00000300| 00 00 00 01 01 71 00 00 | 00 01 01 72 00 00 00 01 |.....q..|...r....|
|00000310| 01 73 00 00 00 01 01 74 | 00 00 00 01 01 75 00 00 |.s.....t|.....u..|
|00000320| 00 01 01 76 00 00 00 01 | 01 77 00 00 00 01 01 78 |...v....|.w.....x|
|00000330| 00 00 00 01 01 79 00 00 | 00 01 01 7a 00 00 00 01 |.....y..|...z....|
|00000340| 01 7b 00 00 00 01 01 7c | 00 00 00 01 01 7d 00 00 |.{.....||.....}..|
|00000350| 00 01 01 7e 00 00 00 01 | 01 7f 00 00 00 01 01 80 |...~....|........|
|00000360| 00 00 00 01 01 81 00 00 | 00 01 01 82 00 00 00 01 |........|........|
|00000370| 01 83 00 00 00 01 01 84 | 00 00 00 01 01 85 00 00 |........|........|
|00000380| 00 01 01 86 00 00 00 01 | 01 87 00 00 00 01 01 88 |........|........|
|00000390| 00 00 00 01 01 89 00 00 | 00 01 01 8a 00 00 00 01 |........|........|
|000003a0| 01 8b 00 00 00 01 01 8c | 00 00 00 01 01 8d 00 00 |........|........|
|000003b0| 00 01 01 8e 00 00 00 01 | 01 8f 00 00 00 01 01 90 |........|........|
|000003c0| 00 00 00 01 01 91 00 00 | 00 01 01 92 00 00 00 01 |........|........|
|000003d0| 01 93 00 00 00 01 01 94 | 00 00 00 01 01 95 00 00 |........|........|
|000003e0| 00 01 01 96 00 00 00 01 | 01 97 00 00 00 01 01 98 |........|........|
|000003f0| 00 00 00 01 01 99 00 00 | 00 01 01 9a 00 00 00 01 |........|........|
|00000400| 01 9b 00 00 00 01 01 9c | 00 00 00 01 01 9d 00 00 |........|........|
|00000410| 00 01 01 9e 00 00 00 01 | 01 9f 00 00 00 01 01 a0 |........|........|
|00000420| 00 00 00 01 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000430| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000440| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000450| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000460| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000470| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000480| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000490| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000500| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000510| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000520| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000530| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000540| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000550| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000560| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000570| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000580| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000590| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000600| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000610| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000620| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000630| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000640| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000650| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000660| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000670| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000680| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000690| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000700| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000710| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000720| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000730| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000740| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000750| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000760| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000770| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000780| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000790| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000800| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000810| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000820| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000830| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000840| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000850| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000860| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000870| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000880| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000890| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000900| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000910| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000920| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000930| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000940| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000950| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000960| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000970| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000980| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000990| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000aa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ab0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ac0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ad0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ae0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000af0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ba0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000bb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000bc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000bd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000be0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000bf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000c00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000c10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000c20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000c30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000c40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000c50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000c60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000c70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000c80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000c90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ca0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000cb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000cc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000cd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ce0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000cf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000da0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000db0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000dc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000dd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000de0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000df0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000e00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000e10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000e20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000e30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000e40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000e50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000e60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000e70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000e80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000e90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ea0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000eb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ec0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ed0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ee0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ef0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000fa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000fb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000fc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000fd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000fe0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ff0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001000| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001060| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001070| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001080| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001090| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001100| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001120| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001200| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001210| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001220| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001230| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001260| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001270| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001280| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001290| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000012a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000012b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000012c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000012d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000012e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000012f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001300| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001310| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001320| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001350| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001380| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000013a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000013b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000013c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000013d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000013e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000013f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001400| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001410| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001420| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001430| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001440| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001450| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001460| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001470| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001480| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001490| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000014a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000014b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000014c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000014d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000014e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000014f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001500| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001510| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001520| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001530| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001540| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001550| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001560| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001570| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001580| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001590| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000015a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000015b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000015c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000015d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000015e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000015f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001600| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001610| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001620| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001630| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001640| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001650| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001660| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001670| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001680| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001690| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000016a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000016b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000016c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000016d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000016e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000016f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001700| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001710| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001720| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001730| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001740| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001750| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001760| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001770| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001780| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001790| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000017a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000017b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000017c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000017d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000017e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000017f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001800| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001810| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001820| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001830| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001840| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001850| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001860| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001870| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001880| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001890| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000018a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000018b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000018c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000018d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000018e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000018f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001900| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001910| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001920| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001930| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001940| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001950| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001960| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001970| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001980| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001990| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001a00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001a10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001a20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001a30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001a40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001a50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001a60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001a70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001a80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001a90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001aa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ab0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ac0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ad0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ae0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001af0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ba0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001bb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001bc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001bd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001be0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001bf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001c00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001c10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001c20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001c30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001c40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001c50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001c60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001c70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001c80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001c90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ca0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001cb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001cc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001cd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ce0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001cf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001d00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001d10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001d20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001d30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001d40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001d50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001d60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001d70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001d80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001d90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001da0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001db0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001dc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001dd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001de0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001df0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001e00| 30 37 30 37 30 37 30 30 | 30 34 35 30 30 31 31 32 |07070700|04500112|
|00001e10| 37 35 30 34 30 37 37 37 | 30 30 30 33 31 31 30 30 |75040777|00031100|
|00001e20| 30 30 36 32 30 30 30 30 | 30 36 30 30 30 30 30 30 |00620000|06000000|
|00001e30| 30 34 37 36 34 35 37 35 | 37 31 32 30 30 30 30 30 |04764575|71200000|
|00001e40| 32 30 30 30 30 30 30 30 | 30 30 30 30 2e 00 30 37 |20000000|0000..07|
|00001e50| 30 37 30 37 30 30 30 34 | 35 30 30 31 31 32 37 36 |07070004|50011276|
|00001e60| 30 34 30 37 35 35 30 30 | 30 33 31 31 30 30 30 30 |04075500|03110000|
|00001e70| 36 32 30 30 30 30 30 32 | 30 30 30 30 30 30 30 34 |62000002|00000004|
|00001e80| 37 36 34 36 34 37 30 33 | 30 30 30 30 30 30 35 30 |76464703|00000050|
|00001e90| 30 30 30 30 30 30 30 30 | 30 30 64 65 6d 6f 00 30 |00000000|00demo.0|
|00001ea0| 37 30 37 30 37 30 30 30 | 34 35 30 30 31 31 32 37 |70707000|45001127|
|00001eb0| 37 31 30 30 36 34 34 30 | 30 30 33 31 31 30 30 30 |71006440|00311000|
|00001ec0| 30 36 32 30 30 30 30 30 | 31 30 30 30 30 30 30 30 |06200000|10000000|
|00001ed0| 34 37 36 34 35 37 35 36 | 33 31 30 30 30 30 31 35 |47645756|31000015|
|00001ee0| 30 30 30 30 30 30 33 37 | 30 37 36 64 65 6d 6f 2f |00000037|076demo/|
|00001ef0| 64 73 71 6c 2e 70 63 00 | 23 69 66 64 65 66 20 52 |dsql.pc.|#ifdef R|
|00001f00| 43 53 49 44 0a 73 74 61 | 74 69 63 20 63 68 61 72 |CSID.sta|tic char|
|00001f10| 20 2a 52 43 53 69 64 20 | 3d 20 0a 20 20 20 22 24 | *RCSid |= . "$|
|00001f20| 48 65 61 64 65 72 3a 20 | 64 73 71 6c 2e 70 63 2c |Header: |dsql.pc,|
|00001f30| 76 20 31 30 33 31 32 30 | 30 2e 31 20 38 39 2f 30 |v 103120|0.1 89/0|
|00001f40| 36 2f 31 35 20 31 37 3a | 31 35 3a 33 38 20 6e 73 |6/15 17:|15:38 ns|
|00001f50| 61 6c 61 68 20 45 78 70 | 20 24 20 64 73 71 6c 2e |alah Exp| $ dsql.|
|00001f60| 70 63 20 43 6f 70 79 72 | 20 28 63 29 20 31 39 38 |pc Copyr| (c) 198|
|00001f70| 39 20 4f 72 61 63 6c 65 | 22 3b 0a 23 65 6e 64 69 |9 Oracle|";.#endi|
|00001f80| 66 20 2f 2a 20 52 43 53 | 49 44 20 2a 2f 0a 0a 2f |f /* RCS|ID */../|
|00001f90| 2a 20 70 63 63 2c 31 30 | 32 31 30 2c 76 35 24 73 |* pcc,10|210,v5$s|
|00001fa0| 72 63 3a 5b 70 63 63 2e | 31 30 32 31 30 5d 20 2a |rc:[pcc.|10210] *|
|00001fb0| 2f 0a 2f 2a 20 43 6f 70 | 79 72 69 67 68 74 20 28 |/./* Cop|yright (|
|00001fc0| 63 29 20 31 39 38 34 2c | 31 39 38 37 20 62 79 20 |c) 1984,|1987 by |
|00001fd0| 4f 72 61 63 6c 65 20 43 | 6f 72 70 6f 72 61 74 69 |Oracle C|orporati|
|00001fe0| 6f 6e 2e 20 2a 2f 0a 20 | 0a 2f 2a 0a 4e 41 4d 45 |on. */. |./*.NAME|
|00001ff0| 0a 20 20 44 53 51 4c 20 | 3a 20 44 79 6e 61 6d 69 |. DSQL |: Dynami|
|00002000| 63 20 53 51 4c 20 2d 20 | 43 20 43 6f 6d 70 69 6c |c SQL - |C Compil|
|00002010| 65 72 20 56 65 72 73 69 | 6f 6e 2e 0a 46 55 4e 43 |er Versi|on..FUNC|
|00002020| 54 49 4f 4e 0a 20 20 50 | 72 6f 67 72 61 6d 20 74 |TION. P|rogram t|
|00002030| 6f 20 64 65 6d 6f 6e 73 | 74 72 61 74 65 20 64 79 |o demons|trate dy|
|00002040| 6e 61 6d 69 63 20 53 51 | 4c 20 73 74 61 74 65 6d |namic SQ|L statem|
|00002050| 65 6e 74 73 20 77 69 74 | 68 20 74 68 65 20 43 20 |ents wit|h the C |
|00002060| 70 72 65 63 6f 6d 70 69 | 6c 65 72 2e 0a 20 0a 20 |precompi|ler.. . |
|00002070| 20 54 6f 20 62 75 69 6c | 64 20 44 53 51 4c 20 28 | To buil|d DSQL (|
|00002080| 6f 6e 20 56 4d 53 29 3a | 0a 20 0a 20 20 20 20 24 |on VMS):|. . $|
|00002090| 20 50 43 43 20 49 4e 41 | 4d 45 3d 44 53 51 4c 2e | PCC INA|ME=DSQL.|
|000020a0| 50 43 20 49 4e 43 4c 55 | 44 45 3d 53 59 53 24 4f |PC INCLU|DE=SYS$O|
|000020b0| 52 41 43 4c 45 3a 0a 20 | 20 20 20 24 20 43 43 20 |RACLE:. | $ CC |
|000020c0| 44 53 51 4c 0a 20 20 20 | 20 24 20 40 53 59 53 24 |DSQL. | $ @SYS$|
|000020d0| 4f 52 41 43 4c 45 3a 4c | 4f 55 54 4c 20 44 53 51 |ORACLE:L|OUTL DSQ|
|000020e0| 4c 20 44 53 51 4c 2c 53 | 59 53 24 4f 52 41 43 4c |L DSQL,S|YS$ORACL|
|000020f0| 45 3a 53 51 4c 4c 49 42 | 2f 4c 49 42 20 44 53 51 |E:SQLLIB|/LIB DSQ|
|00002100| 4c 20 53 0a 20 20 20 20 | 24 20 52 55 4e 20 44 53 |L S. |$ RUN DS|
|00002110| 51 4c 0a 20 0a 20 20 54 | 6f 20 62 75 69 6c 64 20 |QL. . T|o build |
|00002120| 44 53 51 4c 20 28 6f 6e | 20 56 4d 2f 43 4d 53 29 |DSQL (on| VM/CMS)|
|00002130| 3a 0a 20 0a 20 20 20 20 | 50 43 43 20 49 4e 41 3d |:. . |PCC INA=|
|00002140| 44 53 51 4c 2e 43 53 51 | 4c 0a 20 20 20 20 43 43 |DSQL.CSQ|L. CC|
|00002150| 20 44 53 51 4c 0a 20 20 | 20 20 4c 49 4e 4b 53 51 | DSQL. | LINKSQ|
|00002160| 4c 20 44 53 51 4c 0a 20 | 20 20 20 44 53 51 4c 0a |L DSQL. | DSQL.|
|00002170| 20 0a 4d 4f 44 49 46 49 | 45 44 0a 20 20 20 20 30 | .MODIFI|ED. 0|
|00002180| 35 2f 32 31 2f 38 34 20 | 20 43 6c 61 72 65 20 20 |5/21/84 | Clare |
|00002190| 20 20 52 65 6d 6f 76 65 | 64 20 75 6e 6e 65 63 65 | Remove|d unnece|
|000021a0| 73 73 61 72 79 20 64 75 | 6d 6d 79 20 66 75 6e 63 |ssary du|mmy func|
|000021b0| 20 66 6f 6f 28 29 2e 0a | 20 20 20 20 30 35 2f 32 | foo()..| 05/2|
|000021c0| 32 2f 38 34 20 20 43 6c | 61 72 65 20 20 20 20 46 |2/84 Cl|are F|
|000021d0| 69 78 65 64 20 6e 75 6c | 6c 20 63 6f 6c 75 6d 6e |ixed nul|l column|
|000021e0| 20 70 72 69 6e 74 20 61 | 6c 69 67 6e 6d 65 6e 74 | print a|lignment|
|000021f0| 20 65 72 72 2e 0a 20 20 | 20 20 30 39 2f 31 39 2f | err.. | 09/19/|
|00002200| 38 34 20 20 43 6c 61 72 | 65 20 20 20 20 50 6f 72 |84 Clar|e Por|
|00002210| 74 3a 20 72 65 6d 6f 76 | 65 20 56 4d 53 69 73 6d |t: remov|e VMSism|
|00002220| 73 2e 0a 20 20 20 20 31 | 32 2f 31 37 2f 38 34 20 |s.. 1|2/17/84 |
|00002230| 20 43 6c 61 72 65 20 20 | 20 20 50 6f 72 74 20 4d | Clare | Port M|
|00002240| 55 20 74 6f 20 56 4d 2f | 43 4d 53 3b 20 46 69 78 |U to VM/|CMS; Fix|
|00002250| 20 73 64 70 20 72 65 64 | 65 66 2e 0a 20 20 20 20 | sdp red|ef.. |
|00002260| 43 6c 61 72 65 20 20 20 | 20 20 20 30 33 2f 30 34 |Clare | 03/04|
|00002270| 2f 38 36 20 2d 20 55 73 | 65 20 6e 65 77 20 44 45 |/86 - Us|e new DE|
|00002280| 53 43 52 49 42 45 2e 0a | 20 20 20 20 43 6c 61 72 |SCRIBE..| Clar|
|00002290| 65 20 20 20 20 20 20 30 | 33 2f 30 37 2f 38 36 20 |e 0|3/07/86 |
|000022a0| 2d 20 46 69 78 3a 20 69 | 6d 70 72 6f 70 65 72 20 |- Fix: i|mproper |
|000022b0| 53 51 4c 57 41 52 4e 49 | 4e 47 20 68 61 6e 64 6c |SQLWARNI|NG handl|
|000022c0| 69 6e 67 2e 0a 20 20 20 | 20 4d 75 6c 6c 65 72 20 |ing.. | Muller |
|000022d0| 20 20 20 20 31 31 2f 31 | 33 2f 38 37 20 2d 20 43 | 11/1|3/87 - C|
|000022e0| 4f 52 50 53 55 50 3a 20 | 74 68 65 20 75 73 65 72 |ORPSUP: |the user|
|000022f0| 73 20 77 61 6e 74 65 64 | 20 69 74 2e 0a 2a 2f 0a |s wanted| it..*/.|
|00002300| 20 0a 23 69 6e 63 6c 75 | 64 65 20 3c 73 74 64 69 | .#inclu|de <stdi|
|00002310| 6f 2e 68 3e 0a 23 69 6e | 63 6c 75 64 65 20 3c 63 |o.h>.#in|clude <c|
|00002320| 74 79 70 65 2e 68 3e 0a | 0a 23 64 65 66 69 6e 65 |type.h>.|.#define|
|00002330| 20 54 52 55 45 20 31 0a | 23 64 65 66 69 6e 65 20 | TRUE 1.|#define |
|00002340| 46 41 4c 53 45 20 30 0a | 23 20 64 65 66 69 6e 65 |FALSE 0.|# define|
|00002350| 20 20 20 20 45 58 5f 46 | 54 4c 20 20 20 20 20 20 | EX_F|TL |
|00002360| 31 20 20 20 20 20 20 20 | 20 20 20 20 20 20 2f 2a |1 | /*|
|00002370| 20 61 20 73 65 72 69 6f | 75 73 20 65 72 72 6f 72 | a serio|us error|
|00002380| 20 6f 63 63 75 72 72 65 | 64 20 2a 2f 0a 23 75 6e | occurre|d */.#un|
|00002390| 64 65 66 20 54 0a 23 75 | 6e 64 65 66 20 46 0a 20 |def T.#u|ndef F. |
|000023a0| 0a 23 64 65 66 69 6e 65 | 20 20 20 20 20 20 20 20 |.#define| |
|000023b0| 43 52 20 20 20 20 20 20 | 31 33 0a 20 0a 45 58 45 |CR |13. .EXE|
|000023c0| 43 20 53 51 4c 20 42 45 | 47 49 4e 20 44 45 43 4c |C SQL BE|GIN DECL|
|000023d0| 41 52 45 20 53 45 43 54 | 49 4f 4e 3b 0a 09 20 56 |ARE SECT|ION;.. V|
|000023e0| 41 52 43 48 41 52 20 20 | 20 75 69 64 5b 33 30 5d |ARCHAR | uid[30]|
|000023f0| 3b 09 20 20 20 20 20 20 | 20 2f 2a 20 75 73 65 72 |;. | /* user|
|00002400| 69 64 09 09 09 20 20 20 | 20 20 20 2a 2f 0a 09 20 |id... | */.. |
|00002410| 56 41 52 43 48 41 52 20 | 20 20 70 73 73 77 64 5b |VARCHAR | psswd[|
|00002420| 33 30 5d 3b 09 20 20 20 | 20 20 20 20 2f 2a 20 70 |30];. | /* p|
|00002430| 61 73 73 77 6f 72 64 09 | 09 09 20 20 20 20 20 20 |assword.|.. |
|00002440| 2a 2f 0a 09 20 63 68 61 | 72 09 20 20 2a 73 74 6d |*/.. cha|r. *stm|
|00002450| 74 3b 09 20 20 20 20 20 | 20 20 2f 2a 20 53 51 4c |t;. | /* SQL|
|00002460| 20 73 74 6d 74 20 65 6e | 74 65 72 65 64 20 62 79 | stmt en|tered by|
|00002470| 20 75 73 65 72 09 20 20 | 20 20 20 20 2a 2f 0a 20 | user. | */. |
|00002480| 0a 45 58 45 43 20 53 51 | 4c 20 45 4e 44 20 44 45 |.EXEC SQ|L END DE|
|00002490| 43 4c 41 52 45 20 53 45 | 43 54 49 4f 4e 3b 0a 20 |CLARE SE|CTION;. |
|000024a0| 0a 45 58 45 43 20 53 51 | 4c 20 49 4e 43 4c 55 44 |.EXEC SQ|L INCLUD|
|000024b0| 45 20 53 51 4c 43 41 2e | 48 3b 0a 45 58 45 43 20 |E SQLCA.|H;.EXEC |
|000024c0| 53 51 4c 20 49 4e 43 4c | 55 44 45 20 53 51 4c 44 |SQL INCL|UDE SQLD|
|000024d0| 41 2e 48 3b 0a 20 0a 09 | 20 53 51 4c 44 41 09 20 |A.H;. ..| SQLDA. |
|000024e0| 20 2a 62 64 70 3b 20 09 | 20 20 20 20 20 20 20 2f | *bdp; .| /|
|000024f0| 2a 20 2d 3e 20 44 65 73 | 63 72 69 70 74 6f 72 20 |* -> Des|criptor |
|00002500| 75 73 65 64 20 66 6f 72 | 20 42 49 4e 44 20 76 61 |used for| BIND va|
|00002510| 72 73 20 20 20 20 2a 2f | 0a 09 20 53 51 4c 44 41 |rs */|.. SQLDA|
|00002520| 09 20 20 2a 73 64 70 3b | 20 09 20 20 20 20 20 20 |. *sdp;| . |
|00002530| 20 2f 2a 20 2d 3e 20 44 | 65 73 63 72 69 70 74 6f | /* -> D|escripto|
|00002540| 72 20 75 73 65 64 20 66 | 6f 72 20 53 45 4c 45 43 |r used f|or SELEC|
|00002550| 54 20 76 61 72 73 20 20 | 2a 2f 0a 09 20 73 68 6f |T vars |*/.. sho|
|00002560| 72 74 09 20 20 2a 73 64 | 74 09 3d 20 30 3b 09 20 |rt. *sd|t.= 0;. |
|00002570| 20 20 20 20 20 20 2f 2a | 20 2d 3e 20 61 72 72 20 | /*| -> arr |
|00002580| 6f 66 20 6f 72 69 67 69 | 6e 61 6c 20 44 45 53 43 |of origi|nal DESC|
|00002590| 52 49 42 45 27 64 20 74 | 79 70 65 73 20 2a 2f 0a |RIBE'd t|ypes */.|
|000025a0| 09 20 69 6e 74 09 20 20 | 20 73 64 74 6c 3b 09 20 |. int. | sdtl;. |
|000025b0| 20 20 20 20 20 20 2f 2a | 20 6e 72 20 6f 66 20 65 | /*| nr of e|
|000025c0| 6e 74 72 69 65 73 20 69 | 6e 20 73 64 74 5b 5d 09 |ntries i|n sdt[].|
|000025d0| 20 20 20 20 20 20 2a 2f | 0a 09 20 63 68 61 72 09 | */|.. char.|
|000025e0| 20 20 2a 76 61 72 73 20 | 3d 20 30 3b 09 20 20 20 | *vars |= 0;. |
|000025f0| 20 20 20 20 2f 2a 20 2d | 3e 20 61 72 65 61 20 75 | /* -|> area u|
|00002600| 73 65 64 20 74 6f 20 68 | 6f 6c 64 20 42 69 6e 64 |sed to h|old Bind|
|00002610| 20 76 61 72 73 20 20 20 | 20 20 20 2a 2f 0a 09 20 | vars | */.. |
|00002620| 69 6e 74 09 20 20 20 62 | 64 53 69 7a 65 20 3d 20 |int. b|dSize = |
|00002630| 35 3b 09 20 20 20 20 20 | 20 20 2f 2a 20 53 69 7a |5;. | /* Siz|
|00002640| 65 20 6f 66 20 42 69 6e | 64 20 76 61 72 69 61 62 |e of Bin|d variab|
|00002650| 6c 65 20 64 65 73 63 72 | 69 70 74 6f 72 20 20 20 |le descr|iptor |
|00002660| 20 2a 2f 0a 09 20 69 6e | 74 09 20 20 20 62 76 53 | */.. in|t. bvS|
|00002670| 69 7a 65 20 3d 20 31 30 | 3b 20 20 20 20 20 20 20 |ize = 10|; |
|00002680| 20 2f 2a 20 4d 61 78 20 | 6e 72 20 6f 66 20 63 68 | /* Max |nr of ch|
|00002690| 61 72 73 20 69 6e 20 42 | 69 6e 64 20 56 61 72 20 |ars in B|ind Var |
|000026a0| 6e 61 6d 65 20 20 20 20 | 2a 2f 0a 09 20 69 6e 74 |name |*/.. int|
|000026b0| 09 20 20 20 73 64 53 69 | 7a 65 20 3d 20 35 3b 09 |. sdSi|ze = 5;.|
|000026c0| 20 20 20 20 20 20 20 2f | 2a 20 53 69 7a 65 20 6f | /|* Size o|
|000026d0| 66 20 53 65 6c 65 63 74 | 20 6c 69 73 74 20 64 65 |f Select| list de|
|000026e0| 73 63 72 69 70 74 6f 72 | 20 20 20 20 20 20 2a 2f |scriptor| */|
|000026f0| 0a 09 20 69 6e 74 09 20 | 20 20 73 76 53 69 7a 65 |.. int. | svSize|
|00002700| 20 3d 20 38 30 3b 20 20 | 20 20 20 20 20 20 2f 2a | = 80; | /*|
|00002710| 20 4d 61 78 20 6e 72 20 | 63 68 61 72 73 20 69 6e | Max nr |chars in|
|00002720| 20 53 65 6c 65 63 74 20 | 4c 69 73 74 20 63 6f 6c | Select |List col|
|00002730| 6e 61 6d 65 73 2a 2f 0a | 09 20 69 6e 74 09 20 20 |names*/.|. int. |
|00002740| 20 61 75 74 6f 43 6f 6d | 20 3d 20 46 41 4c 53 45 | autoCom| = FALSE|
|00002750| 3b 20 20 20 20 2f 2a 20 | 50 65 72 66 6f 72 6d 20 |; /* |Perform |
|00002760| 61 75 74 6f 6d 61 74 69 | 63 20 63 6f 6d 6d 69 74 |automati|c commit|
|00002770| 73 3f 09 20 20 20 20 20 | 20 2a 2f 0a 09 20 69 6e |s?. | */.. in|
|00002780| 74 09 20 20 20 64 6f 6e | 65 20 3d 20 46 41 4c 53 |t. don|e = FALS|
|00002790| 45 3b 20 20 20 20 20 20 | 20 2f 2a 20 44 6f 6e 65 |E; | /* Done|
|000027a0| 20 65 78 65 63 75 74 69 | 6e 67 20 73 74 61 74 65 | executi|ng state|
|000027b0| 6d 65 6e 74 73 3f 09 20 | 20 20 20 20 20 2a 2f 0a |ments?. | */.|
|000027c0| 09 20 69 6e 74 09 20 20 | 20 72 65 45 78 65 63 3b |. int. | reExec;|
|000027d0| 09 20 20 20 20 20 20 20 | 2f 2a 20 52 65 2d 65 78 |. |/* Re-ex|
|000027e0| 65 63 75 74 65 20 74 68 | 65 20 73 61 6d 65 20 73 |ecute th|e same s|
|000027f0| 71 6c 20 73 74 61 74 65 | 6d 65 6e 74 3f 20 20 2a |ql state|ment? *|
|00002800| 2f 0a 20 0a 20 0a 65 78 | 74 65 72 6e 09 20 63 68 |/. . .ex|tern. ch|
|00002810| 61 72 09 20 20 2a 6d 61 | 6c 6c 6f 63 28 29 3b 09 |ar. *ma|lloc();.|
|00002820| 20 20 20 20 20 20 20 2f | 2a 20 41 6c 6c 6f 63 61 | /|* Alloca|
|00002830| 74 65 20 4d 65 6d 6f 72 | 79 09 09 20 20 20 20 20 |te Memor|y.. |
|00002840| 20 2a 2f 0a 65 78 74 65 | 72 6e 09 20 53 51 4c 44 | */.exte|rn. SQLD|
|00002850| 41 09 20 20 2a 73 71 6c | 61 6c 64 28 29 3b 09 20 |A. *sql|ald();. |
|00002860| 20 20 20 20 20 20 2f 2a | 20 41 6c 6c 6f 63 61 74 | /*| Allocat|
|00002870| 65 20 44 65 73 63 72 69 | 70 74 6f 72 09 09 20 20 |e Descri|ptor.. |
|00002880| 20 20 20 20 2a 2f 0a 65 | 78 74 65 72 6e 09 20 76 | */.e|xtern. v|
|00002890| 6f 69 64 09 20 20 20 6d | 75 66 77 72 6e 28 29 3b |oid. m|ufwrn();|
|000028a0| 09 20 20 20 20 20 20 20 | 2f 2a 20 49 73 73 75 65 |. |/* Issue|
|000028b0| 20 53 51 4c 57 41 52 4e | 49 4e 47 20 45 72 72 20 | SQLWARN|ING Err |
|000028c0| 4d 73 67 09 20 20 20 20 | 20 20 2a 2f 0a 20 0a 6d |Msg. | */. .m|
|000028d0| 61 69 6e 28 61 72 67 63 | 2c 20 61 72 67 76 29 0a |ain(argc|, argv).|
|000028e0| 09 20 69 6e 74 09 20 20 | 20 61 72 67 63 3b 0a 09 |. int. | argc;..|
|000028f0| 20 63 68 61 72 09 20 20 | 2a 61 72 67 76 5b 5d 3b | char. |*argv[];|
|00002900| 0a 7b 0a 09 20 69 6e 74 | 09 20 20 20 69 3b 0a 09 |.{.. int|. i;..|
|00002910| 20 69 6e 74 09 20 20 20 | 66 69 72 73 74 54 69 6d | int. |firstTim|
|00002920| 65 3b 09 20 20 20 20 20 | 20 20 2f 2a 20 31 73 74 |e;. | /* 1st|
|00002930| 20 74 69 6d 65 20 73 74 | 61 74 65 6d 65 6e 74 20 | time st|atement |
|00002940| 65 78 65 63 75 74 65 64 | 20 3f 20 20 20 20 20 20 |executed| ? |
|00002950| 20 2a 2f 0a 09 20 63 68 | 61 72 09 20 20 20 61 6e | */.. ch|ar. an|
|00002960| 73 77 65 72 5b 34 5d 3b | 09 20 20 20 20 20 20 20 |swer[4];|. |
|00002970| 2f 2a 20 53 74 72 69 6e | 67 20 74 6f 20 68 6f 6c |/* Strin|g to hol|
|00002980| 64 20 61 6e 73 77 65 72 | 20 74 6f 20 71 75 65 73 |d answer| to ques|
|00002990| 74 69 6f 6e 73 20 20 2a | 2f 0a 20 0a 2f 2a 20 62 |tions *|/. ./* b|
|000029a0| 65 67 69 6e 20 64 73 71 | 6c 20 2a 2f 0a 20 0a 70 |egin dsq|l */. .p|
|000029b0| 72 69 6e 74 66 28 22 44 | 53 51 4c 20 56 31 2e 31 |rintf("D|SQL V1.1|
|000029c0| 20 20 49 6e 74 65 72 61 | 63 74 69 76 65 20 53 51 | Intera|ctive SQ|
|000029d0| 4c 20 53 74 61 74 65 6d | 65 6e 74 20 45 78 65 63 |L Statem|ent Exec|
|000029e0| 75 74 6f 72 5c 6e 5c 6e | 22 29 3b 0a 70 72 69 6e |utor\n\n|");.prin|
|000029f0| 74 66 28 22 46 6f 72 20 | 68 65 6c 70 2c 20 74 79 |tf("For |help, ty|
|00002a00| 70 65 20 27 2f 68 65 6c | 70 3b 27 20 61 74 20 74 |pe '/hel|p;' at t|
|00002a10| 68 65 20 70 72 6f 6d 70 | 74 2e 5c 6e 22 29 3b 0a |he promp|t.\n");.|
|00002a20| 20 0a 6c 6f 67 69 6e 28 | 61 72 67 63 2c 20 61 72 | .login(|argc, ar|
|00002a30| 67 76 29 3b 0a 20 0a 2f | 2a 20 41 6c 6c 6f 63 61 |gv);. ./|* Alloca|
|00002a40| 74 65 20 73 74 6f 72 61 | 67 65 20 66 6f 72 20 74 |te stora|ge for t|
|00002a50| 68 65 20 76 61 72 69 6f | 75 73 20 64 65 73 63 72 |he vario|us descr|
|00002a60| 69 70 74 6f 72 73 20 61 | 6e 64 20 73 74 72 69 6e |iptors a|nd strin|
|00002a70| 67 73 20 20 2a 2f 0a 2f | 2a 20 77 68 69 63 68 20 |gs */./|* which |
|00002a80| 77 69 6c 6c 20 62 65 20 | 75 73 65 64 2c 20 61 6e |will be |used, an|
|00002a90| 64 20 67 65 74 20 74 68 | 65 20 66 69 72 73 74 20 |d get th|e first |
|00002aa0| 63 6f 6d 6d 61 6e 64 20 | 73 74 72 69 6e 67 20 20 |command |string |
|00002ab0| 20 20 20 20 2a 2f 0a 73 | 74 6d 74 20 3d 20 6d 61 | */.s|tmt = ma|
|00002ac0| 6c 6c 6f 63 28 32 35 36 | 29 3b 0a 20 0a 69 66 20 |lloc(256|);. .if |
|00002ad0| 28 20 73 74 6d 74 20 3d | 3d 20 4e 55 4c 4c 20 29 |( stmt =|= NULL )|
|00002ae0| 0a 20 20 7b 2f 2a 20 50 | 72 6f 62 6c 65 6d 20 61 |. {/* P|roblem a|
|00002af0| 6c 6c 6f 63 27 69 6e 67 | 20 6d 65 6d 6f 72 79 21 |lloc'ing| memory!|
|00002b00| 3f 21 20 2a 2f 0a 20 20 | 70 75 74 73 28 22 44 53 |?! */. |puts("DS|
|00002b10| 51 4c 20 46 41 49 4c 3a | 20 73 74 6d 74 20 3d 20 |QL FAIL:| stmt = |
|00002b20| 6d 61 6c 6c 6f 63 28 32 | 35 36 29 22 29 3b 0a 20 |malloc(2|56)");. |
|00002b30| 20 65 78 69 74 28 45 58 | 5f 46 54 4c 29 3b 0a 20 | exit(EX|_FTL);. |
|00002b40| 20 7d 0a 20 0a 62 64 70 | 20 3d 20 73 71 6c 61 6c | }. .bdp| = sqlal|
|00002b50| 64 28 62 64 53 69 7a 65 | 2c 20 62 76 53 69 7a 65 |d(bdSize|, bvSize|
|00002b60| 2c 20 31 30 29 3b 0a 20 | 0a 69 66 20 28 20 62 64 |, 10);. |.if ( bd|
|00002b70| 70 20 3d 3d 20 4e 55 4c | 4c 20 29 0a 20 20 7b 2f |p == NUL|L ). {/|
|00002b80| 2a 20 50 72 6f 62 6c 65 | 6d 20 61 6c 6c 6f 63 61 |* Proble|m alloca|
|00002b90| 74 69 6e 67 20 6d 65 6d | 6f 72 79 3f 21 3f 20 2a |ting mem|ory?!? *|
|00002ba0| 2f 0a 20 20 70 75 74 73 | 28 22 44 53 51 4c 20 46 |/. puts|("DSQL F|
|00002bb0| 41 49 4c 3a 20 62 64 70 | 20 3d 20 73 71 6c 61 6c |AIL: bdp| = sqlal|
|00002bc0| 64 28 62 64 53 69 7a 65 | 2c 20 62 76 53 69 7a 65 |d(bdSize|, bvSize|
|00002bd0| 2c 20 31 30 29 22 29 3b | 0a 20 20 65 78 69 74 28 |, 10)");|. exit(|
|00002be0| 45 58 5f 46 54 4c 29 3b | 0a 20 20 7d 0a 20 0a 73 |EX_FTL);|. }. .s|
|00002bf0| 64 70 20 3d 20 73 71 6c | 61 6c 64 28 73 64 53 69 |dp = sql|ald(sdSi|
|00002c00| 7a 65 2c 20 73 76 53 69 | 7a 65 2c 20 30 29 3b 20 |ze, svSi|ze, 0); |
|00002c10| 20 20 20 20 2f 2a 20 41 | 6c 6c 6f 63 61 74 65 20 | /* A|llocate |
|00002c20| 61 20 6e 65 77 20 64 65 | 73 63 72 69 70 74 6f 72 |a new de|scriptor|
|00002c30| 09 20 20 20 20 2a 2f 0a | 20 0a 69 66 20 28 20 73 |. */.| .if ( s|
|00002c40| 64 70 20 3d 3d 20 4e 55 | 4c 4c 20 29 0a 20 20 7b |dp == NU|LL ). {|
|00002c50| 2f 2a 20 50 72 6f 62 6c | 65 6d 20 61 6c 6c 6f 63 |/* Probl|em alloc|
|00002c60| 61 74 69 6e 67 20 6d 65 | 6d 6f 72 79 3f 21 3f 20 |ating me|mory?!? |
|00002c70| 2a 2f 0a 20 20 70 75 74 | 73 28 22 44 53 51 4c 20 |*/. put|s("DSQL |
|00002c80| 46 41 49 4c 3a 20 73 64 | 70 20 3d 20 73 71 6c 61 |FAIL: sd|p = sqla|
|00002c90| 6c 64 28 73 64 53 69 7a | 65 2c 20 73 76 53 69 7a |ld(sdSiz|e, svSiz|
|00002ca0| 65 2c 20 30 29 22 29 3b | 0a 20 20 65 78 69 74 28 |e, 0)");|. exit(|
|00002cb0| 45 58 5f 46 54 4c 29 3b | 0a 20 20 7d 0a 20 0a 73 |EX_FTL);|. }. .s|
|00002cc0| 64 70 2d 3e 4e 20 3d 20 | 30 3b 09 09 09 20 20 20 |dp->N = |0;... |
|00002cd0| 20 20 2f 2a 20 69 6e 69 | 74 20 69 6e 20 63 61 73 | /* ini|t in cas|
|00002ce0| 65 20 65 78 69 74 20 62 | 65 66 6f 72 65 20 44 45 |e exit b|efore DE|
|00002cf0| 53 43 52 49 42 45 20 20 | 20 2a 2f 0a 20 0a 77 68 |SCRIBE | */. .wh|
|00002d00| 69 6c 65 20 28 21 67 65 | 74 43 6f 6d 28 73 74 6d |ile (!ge|tCom(stm|
|00002d10| 74 29 29 3b 0a 20 0a 2f | 2a 20 42 65 67 69 6e 20 |t));. ./|* Begin |
|00002d20| 4d 61 69 6e 20 4c 6f 6f | 70 09 09 09 09 09 20 20 |Main Loo|p..... |
|00002d30| 20 20 20 2a 2f 0a 77 68 | 69 6c 65 20 28 21 64 6f | */.wh|ile (!do|
|00002d40| 6e 65 29 0a 20 20 7b 0a | 20 20 45 58 45 43 20 53 |ne). {.| EXEC S|
|00002d50| 51 4c 20 57 48 45 4e 45 | 56 45 52 20 53 51 4c 45 |QL WHENE|VER SQLE|
|00002d60| 52 52 4f 52 20 20 20 47 | 4f 54 4f 20 43 48 45 43 |RROR G|OTO CHEC|
|00002d70| 4b 45 52 52 3b 0a 20 20 | 2f 2a 20 50 72 6f 63 65 |KERR;. |/* Proce|
|00002d80| 73 73 20 61 6e 79 20 70 | 73 65 75 64 6f 20 63 6f |ss any p|seudo co|
|00002d90| 6d 6d 61 6e 64 73 20 77 | 68 69 63 68 20 74 68 65 |mmands w|hich the|
|00002da0| 20 75 73 65 72 20 65 6e | 74 65 72 73 09 20 20 20 | user en|ters. |
|00002db0| 20 20 2a 2f 0a 20 20 77 | 68 69 6c 65 20 28 73 74 | */. w|hile (st|
|00002dc0| 6d 74 5b 30 5d 20 3d 3d | 20 27 2f 27 29 0a 20 20 |mt[0] ==| '/'). |
|00002dd0| 20 20 7b 0a 20 20 20 20 | 70 72 6f 63 43 6d 64 28 | {. |procCmd(|
|00002de0| 26 73 74 6d 74 5b 31 5d | 29 3b 09 20 20 20 20 20 |&stmt[1]|);. |
|00002df0| 2f 2a 20 50 72 6f 63 65 | 73 73 20 74 68 65 20 70 |/* Proce|ss the p|
|00002e00| 73 65 75 64 6f 20 63 6f | 6d 6d 61 6e 64 20 20 20 |seudo co|mmand |
|00002e10| 2a 2f 0a 20 20 20 20 69 | 66 20 28 64 6f 6e 65 29 |*/. i|f (done)|
|00002e20| 20 62 72 65 61 6b 3b 09 | 20 20 20 20 20 2f 2a 20 | break;.| /* |
|00002e30| 44 6f 6e 27 74 20 67 65 | 74 20 61 6e 6f 74 68 65 |Don't ge|t anothe|
|00002e40| 72 20 73 74 6d 6e 74 20 | 20 20 20 20 20 2a 2f 0a |r stmnt | */.|
|00002e50| 20 20 20 20 77 68 69 6c | 65 20 28 21 67 65 74 43 | whil|e (!getC|
|00002e60| 6f 6d 28 73 74 6d 74 29 | 29 3b 20 20 20 2f 2a 20 |om(stmt)|); /* |
|00002e70| 47 65 74 20 61 6e 6f 74 | 68 65 72 20 63 6f 6d 6d |Get anot|her comm|
|00002e80| 61 6e 64 09 20 20 20 20 | 20 2a 2f 0a 20 20 20 20 |and. | */. |
|00002e90| 7d 0a 20 20 69 66 20 28 | 64 6f 6e 65 29 20 62 72 |}. if (|done) br|
|00002ea0| 65 61 6b 3b 09 20 20 20 | 20 20 2f 2a 20 45 78 69 |eak;. | /* Exi|
|00002eb0| 74 20 6c 6f 6f 70 20 61 | 6e 64 20 63 6c 65 61 6e |t loop a|nd clean|
|00002ec0| 75 70 09 20 20 20 20 20 | 2a 2f 0a 20 20 2f 2a 20 |up. |*/. /* |
|00002ed0| 50 61 72 73 65 20 74 68 | 65 20 65 6e 74 65 72 65 |Parse th|e entere|
|00002ee0| 64 20 73 74 61 74 65 6d | 65 6e 74 09 09 09 20 20 |d statem|ent... |
|00002ef0| 20 20 20 2a 2f 0a 20 20 | 45 58 45 43 20 53 51 4c | */. |EXEC SQL|
|00002f00| 20 50 52 45 50 41 52 45 | 20 53 20 46 52 4f 4d 20 | PREPARE| S FROM |
|00002f10| 3a 73 74 6d 74 3b 0a 20 | 0a 20 20 69 66 20 28 20 |:stmt;. |. if ( |
|00002f20| 73 71 6c 63 61 2e 73 71 | 6c 77 61 72 6e 5b 30 5d |sqlca.sq|lwarn[0]|
|00002f30| 20 3d 3d 20 27 57 27 20 | 29 0a 20 20 20 20 6d 75 | == 'W' |). mu|
|00002f40| 66 77 72 6e 28 29 3b 20 | 20 2f 2a 20 49 73 73 75 |fwrn(); | /* Issu|
|00002f50| 65 20 53 51 4c 57 41 52 | 4e 49 4e 47 20 45 72 72 |e SQLWAR|NING Err|
|00002f60| 20 4d 73 67 20 2a 2f 0a | 20 0a 20 20 45 58 45 43 | Msg */.| . EXEC|
|00002f70| 20 53 51 4c 20 44 45 43 | 4c 41 52 45 20 43 20 43 | SQL DEC|LARE C C|
|00002f80| 55 52 53 4f 52 20 46 4f | 52 20 53 3b 0a 20 0a 20 |URSOR FO|R S;. . |
|00002f90| 20 2f 2a 20 44 65 73 63 | 72 69 62 65 20 74 68 65 | /* Desc|ribe the|
|00002fa0| 20 62 69 6e 64 20 76 61 | 72 69 61 62 6c 65 73 20 | bind va|riables |
|00002fb0| 69 6e 74 6f 20 74 68 65 | 20 64 65 73 63 72 69 70 |into the| descrip|
|00002fc0| 74 6f 72 20 62 64 70 20 | 20 20 20 20 2a 2f 0a 20 |tor bdp | */. |
|00002fd0| 20 62 64 70 2d 3e 4e 20 | 3d 20 62 64 53 69 7a 65 | bdp->N |= bdSize|
|00002fe0| 3b 0a 20 20 64 65 73 63 | 42 69 6e 64 28 29 3b 0a |;. desc|Bind();.|
|00002ff0| 20 0a 20 20 66 69 72 73 | 74 54 69 6d 65 20 3d 20 | . firs|tTime = |
|00003000| 54 52 55 45 3b 0a 20 20 | 20 20 2f 2a 20 4d 61 6b |TRUE;. | /* Mak|
|00003010| 65 20 61 20 6e 6f 74 65 | 20 6f 66 20 74 68 65 20 |e a note| of the |
|00003020| 66 61 63 74 20 74 68 61 | 74 20 74 68 69 73 20 69 |fact tha|t this i|
|00003030| 73 20 74 68 65 20 66 69 | 72 73 74 20 74 69 6d 65 |s the fi|rst time|
|00003040| 20 20 20 2a 2f 0a 20 20 | 20 20 2f 2a 20 74 68 61 | */. | /* tha|
|00003050| 74 20 74 68 69 73 20 73 | 74 61 74 65 6d 65 6e 74 |t this s|tatement|
|00003060| 20 69 73 20 62 65 69 6e | 67 20 65 78 65 63 75 74 | is bein|g execut|
|00003070| 65 64 09 09 20 20 20 20 | 20 2a 2f 0a 20 0a 20 20 |ed.. | */. . |
|00003080| 2f 2a 20 54 68 65 20 66 | 6f 6c 6c 6f 77 69 6e 67 |/* The f|ollowing|
|00003090| 20 6c 6f 6f 70 20 65 78 | 65 63 75 74 65 73 20 74 | loop ex|ecutes t|
|000030a0| 68 65 20 73 74 61 74 65 | 6d 65 6e 74 20 70 61 72 |he state|ment par|
|000030b0| 73 65 64 20 61 62 6f 76 | 65 20 20 2a 2f 0a 20 20 |sed abov|e */. |
|000030c0| 2f 2a 20 6f 76 65 72 20 | 61 6e 64 20 6f 76 65 72 |/* over |and over|
|000030d0| 20 77 69 74 68 20 64 69 | 66 66 65 72 65 6e 74 20 | with di|fferent |
|000030e0| 76 61 6c 75 65 73 20 66 | 6f 72 20 74 68 65 20 62 |values f|or the b|
|000030f0| 69 6e 64 20 76 61 72 73 | 2e 20 20 2a 2f 0a 20 20 |ind vars|. */. |
|00003100| 64 6f 0a 20 20 20 20 7b | 0a 20 20 20 20 69 66 20 |do. {|. if |
|00003110| 28 62 64 70 2d 3e 46 20 | 21 3d 20 30 29 20 67 65 |(bdp->F |!= 0) ge|
|00003120| 74 42 56 56 61 6c 73 28 | 26 76 61 72 73 29 3b 0a |tBVVals(|&vars);.|
|00003130| 20 20 20 20 45 58 45 43 | 20 53 51 4c 20 4f 50 45 | EXEC| SQL OPE|
|00003140| 4e 20 43 20 55 53 49 4e | 47 20 44 45 53 43 52 49 |N C USIN|G DESCRI|
|00003150| 50 54 4f 52 20 62 64 70 | 3b 0a 20 20 20 20 69 66 |PTOR bdp|;. if|
|00003160| 20 28 66 69 72 73 74 54 | 69 6d 65 29 0a 20 20 20 | (firstT|ime). |
|00003170| 20 20 20 7b 0a 20 20 20 | 20 20 20 66 69 72 73 74 | {. | first|
|00003180| 54 69 6d 65 20 3d 20 46 | 41 4c 53 45 3b 0a 20 20 |Time = F|ALSE;. |
|00003190| 20 20 20 20 73 64 70 2d | 3e 4e 20 3d 20 73 64 53 | sdp-|>N = sdS|
|000031a0| 69 7a 65 3b 0a 20 20 20 | 20 20 20 64 65 73 63 53 |ize;. | descS|
|000031b0| 65 6c 28 29 3b 20 20 2f | 2a 20 44 65 73 63 72 69 |el(); /|* Descri|
|000031c0| 62 65 20 74 68 65 20 73 | 65 6c 65 63 74 20 6c 69 |be the s|elect li|
|000031d0| 73 74 20 76 61 72 69 61 | 62 6c 65 73 20 20 20 2a |st varia|bles *|
|000031e0| 2f 0a 20 20 20 20 20 20 | 69 66 20 28 73 64 70 2d |/. |if (sdp-|
|000031f0| 3e 46 20 21 3d 20 30 29 | 20 66 69 6c 6c 53 65 6c |>F != 0)| fillSel|
|00003200| 44 65 73 63 28 29 3b 0a | 20 20 20 20 20 20 7d 0a |Desc();.| }.|
|00003210| 20 20 20 20 69 66 20 28 | 73 64 70 2d 3e 4e 20 21 | if (|sdp->N !|
|00003220| 3d 20 30 29 20 64 6f 46 | 65 74 63 68 65 73 28 29 |= 0) doF|etches()|
|00003230| 3b 0a 20 20 20 20 65 6c | 73 65 0a 20 20 20 20 20 |;. el|se. |
|00003240| 20 7b 0a 20 20 20 20 20 | 20 70 72 69 6e 74 66 28 | {. | printf(|
|00003250| 22 25 75 20 72 6f 77 73 | 20 70 72 6f 63 65 73 73 |"%u rows| process|
|00003260| 65 64 2e 5c 6e 22 2c 20 | 73 71 6c 63 61 2e 73 71 |ed.\n", |sqlca.sq|
|00003270| 6c 65 72 72 64 5b 32 5d | 29 3b 0a 20 20 20 20 20 |lerrd[2]|);. |
|00003280| 20 69 66 20 28 61 75 74 | 6f 43 6f 6d 29 20 63 6f | if (aut|oCom) co|
|00003290| 6d 6d 69 74 57 6f 72 6b | 28 29 3b 0a 20 20 20 20 |mmitWork|();. |
|000032a0| 20 20 7d 0a 20 0a 20 20 | 20 20 72 65 45 78 65 63 | }. . | reExec|
|000032b0| 20 3d 20 46 41 4c 53 45 | 3b 0a 20 20 20 20 66 6f | = FALSE|;. fo|
|000032c0| 72 20 28 3b 20 3b 29 0a | 20 20 20 20 20 20 2f 2a |r (; ;).| /*|
|000032d0| 20 55 4e 54 49 4c 20 63 | 6d 64 20 3d 3d 20 53 51 | UNTIL c|md == SQ|
|000032e0| 4c 20 73 74 61 74 65 6d | 65 6e 74 20 7c 7c 20 2f |L statem|ent || /|
|000032f0| 65 78 69 74 20 7c 7c 20 | 2f 72 75 6e 09 20 20 20 |exit || |/run. |
|00003300| 20 20 2a 2f 0a 20 20 20 | 20 20 20 7b 0a 20 20 20 | */. | {. |
|00003310| 20 20 20 77 68 69 6c 65 | 20 28 21 67 65 74 43 6f | while| (!getCo|
|00003320| 6d 28 73 74 6d 74 29 29 | 3b 0a 20 20 20 20 20 20 |m(stmt))|;. |
|00003330| 69 66 20 28 73 74 6d 74 | 5b 30 5d 20 21 3d 20 27 |if (stmt|[0] != '|
|00003340| 2f 27 29 20 62 72 65 61 | 6b 3b 20 20 20 20 20 2f |/') brea|k; /|
|00003350| 2a 20 47 6f 74 20 53 51 | 4c 20 73 74 61 74 65 6d |* Got SQ|L statem|
|00003360| 65 6e 74 20 20 20 20 2a | 2f 0a 20 20 20 20 20 20 |ent *|/. |
|00003370| 70 72 6f 63 43 6d 64 28 | 26 73 74 6d 74 5b 31 5d |procCmd(|&stmt[1]|
|00003380| 29 3b 0a 20 20 20 20 20 | 20 69 66 20 28 64 6f 6e |);. | if (don|
|00003390| 65 20 7c 7c 20 72 65 45 | 78 65 63 29 20 62 72 65 |e || reE|xec) bre|
|000033a0| 61 6b 3b 20 20 20 20 20 | 2f 2a 20 47 6f 74 20 2f |ak; |/* Got /|
|000033b0| 65 78 69 74 20 7c 7c 20 | 2f 72 75 6e 20 20 20 20 |exit || |/run |
|000033c0| 2a 2f 0a 20 20 20 20 20 | 20 7d 0a 20 0a 20 20 20 |*/. | }. . |
|000033d0| 20 7d 20 77 68 69 6c 65 | 28 72 65 45 78 65 63 29 | } while|(reExec)|
|000033e0| 3b 0a 20 0a 20 20 45 58 | 45 43 20 53 51 4c 20 43 |;. . EX|EC SQL C|
|000033f0| 4c 4f 53 45 20 43 3b 0a | 20 20 69 66 20 28 73 64 |LOSE C;.| if (sd|
|00003400| 70 2d 3e 4e 20 21 3d 20 | 30 29 20 66 72 65 65 53 |p->N != |0) freeS|
|00003410| 65 6c 56 61 72 73 28 29 | 3b 0a 20 20 69 66 20 28 |elVars()|;. if (|
|00003420| 76 61 72 73 20 21 3d 20 | 30 29 20 7b 66 72 65 65 |vars != |0) {free|
|00003430| 28 76 61 72 73 29 3b 20 | 76 61 72 73 20 3d 20 30 |(vars); |vars = 0|
|00003440| 3b 7d 0a 20 20 63 6f 6e | 74 69 6e 75 65 3b 0a 20 |;}. con|tinue;. |
|00003450| 0a 20 0a 20 20 43 48 45 | 43 4b 45 52 52 3a 0a 20 |. . CHE|CKERR:. |
|00003460| 20 20 20 72 65 70 74 45 | 72 72 6f 72 28 29 3b 0a | reptE|rror();.|
|00003470| 20 20 20 20 73 71 6c 63 | 61 2e 73 71 6c 63 6f 64 | sqlc|a.sqlcod|
|00003480| 65 20 3d 20 30 3b 0a 20 | 20 20 20 70 72 69 6e 74 |e = 0;. | print|
|00003490| 66 28 22 5c 6e 43 61 72 | 65 20 74 6f 20 63 6f 6e |f("\nCar|e to con|
|000034a0| 74 69 6e 75 65 3f 20 22 | 29 3b 0a 20 20 20 20 66 |tinue? "|);. f|
|000034b0| 66 6c 75 73 68 28 73 74 | 64 6f 75 74 29 3b 0a 20 |flush(st|dout);. |
|000034c0| 20 20 20 67 65 74 73 28 | 61 6e 73 77 65 72 29 3b | gets(|answer);|
|000034d0| 0a 20 20 20 20 69 66 20 | 28 74 6f 75 70 70 65 72 |. if |(toupper|
|000034e0| 28 61 6e 73 77 65 72 5b | 30 5d 29 20 21 3d 20 27 |(answer[|0]) != '|
|000034f0| 59 27 29 0a 20 20 20 20 | 20 20 7b 2f 2a 20 55 73 |Y'). | {/* Us|
|00003500| 65 72 20 64 6f 65 73 20 | 6e 6f 74 20 77 69 73 68 |er does |not wish|
|00003510| 20 74 6f 20 63 6f 6e 74 | 69 6e 75 65 2e 20 52 6f | to cont|inue. Ro|
|00003520| 6c 6c 62 61 63 6b 2c 20 | 61 6e 64 20 65 78 69 74 |llback, |and exit|
|00003530| 2e 20 2a 2f 0a 20 20 20 | 20 20 20 72 6f 6c 6c 42 |. */. | rollB|
|00003540| 6b 50 72 28 29 3b 0a 20 | 20 20 20 20 20 62 72 65 |kPr();. | bre|
|00003550| 61 6b 3b 0a 20 20 20 20 | 20 20 7d 0a 20 0a 20 20 |ak;. | }. . |
|00003560| 20 20 2f 2a 20 48 65 72 | 65 20 69 66 20 75 73 65 | /* Her|e if use|
|00003570| 72 20 77 61 6e 74 73 20 | 74 6f 20 63 6f 6e 74 69 |r wants |to conti|
|00003580| 6e 75 65 20 61 66 74 65 | 72 20 65 72 72 6f 72 2e |nue afte|r error.|
|00003590| 20 2a 2f 0a 20 0a 20 20 | 20 20 77 68 69 6c 65 20 | */. . | while |
|000035a0| 28 21 67 65 74 43 6f 6d | 28 73 74 6d 74 29 29 3b |(!getCom|(stmt));|
|000035b0| 0a 20 20 7d 0a 20 0a 63 | 6c 65 61 6e 55 70 28 29 |. }. .c|leanUp()|
|000035c0| 3b 0a 45 58 45 43 20 53 | 51 4c 20 43 4f 4d 4d 49 |;.EXEC S|QL COMMI|
|000035d0| 54 20 57 4f 52 4b 20 52 | 45 4c 45 41 53 45 3b 0a |T WORK R|ELEASE;.|
|000035e0| 72 65 74 75 72 6e 3b 0a | 20 0a 45 52 52 5f 45 58 |return;.| .ERR_EX|
|000035f0| 49 54 3a 0a 20 20 72 65 | 70 74 45 72 72 6f 72 28 |IT:. re|ptError(|
|00003600| 29 3b 0a 20 20 63 6c 65 | 61 6e 55 70 28 29 3b 0a |);. cle|anUp();.|
|00003610| 20 20 45 58 45 43 20 53 | 51 4c 20 57 48 45 4e 45 | EXEC S|QL WHENE|
|00003620| 56 45 52 20 53 51 4c 45 | 52 52 4f 52 20 43 4f 4e |VER SQLE|RROR CON|
|00003630| 54 49 4e 55 45 3b 0a 20 | 20 45 58 45 43 20 53 51 |TINUE;. | EXEC SQ|
|00003640| 4c 20 52 4f 4c 4c 42 41 | 43 4b 20 57 4f 52 4b 20 |L ROLLBA|CK WORK |
|00003650| 52 45 4c 45 41 53 45 3b | 0a 20 20 72 65 74 75 72 |RELEASE;|. retur|
|00003660| 6e 3b 0a 20 0a 2f 2a 20 | 65 6e 64 20 64 73 71 6c |n;. ./* |end dsql|
|00003670| 20 2a 2f 0a 7d 0a 20 0a | 20 0a 45 58 45 43 20 53 | */.}. .| .EXEC S|
|00003680| 51 4c 20 57 48 45 4e 45 | 56 45 52 20 53 51 4c 45 |QL WHENE|VER SQLE|
|00003690| 52 52 4f 52 20 53 54 4f | 50 3b 0a 45 58 45 43 20 |RROR STO|P;.EXEC |
|000036a0| 53 51 4c 20 57 48 45 4e | 45 56 45 52 20 53 51 4c |SQL WHEN|EVER SQL|
|000036b0| 57 41 52 4e 49 4e 47 20 | 43 4f 4e 54 49 4e 55 45 |WARNING |CONTINUE|
|000036c0| 3b 0a 45 58 45 43 20 53 | 51 4c 20 57 48 45 4e 45 |;.EXEC S|QL WHENE|
|000036d0| 56 45 52 20 4e 4f 54 20 | 46 4f 55 4e 44 20 43 4f |VER NOT |FOUND CO|
|000036e0| 4e 54 49 4e 55 45 3b 0a | 20 0a 20 0a 2f 2a 09 20 |NTINUE;.| . ./*. |
|000036f0| 6d 75 66 77 72 6e 20 3a | 20 49 73 73 75 65 20 53 |mufwrn :| Issue S|
|00003700| 51 4c 57 41 52 4e 49 4e | 47 20 4d 73 67 2e 20 20 |QLWARNIN|G Msg. |
|00003710| 2a 2f 0a 76 6f 69 64 09 | 20 6d 75 66 77 72 6e 28 |*/.void.| mufwrn(|
|00003720| 29 0a 7b 0a 2f 2a 20 62 | 65 67 69 6e 20 6d 75 66 |).{./* b|egin muf|
|00003730| 77 72 6e 20 2a 2f 0a 20 | 0a 69 66 28 20 73 71 6c |wrn */. |.if( sql|
|00003740| 63 61 2e 73 71 6c 77 61 | 72 6e 5b 31 5d 20 3d 3d |ca.sqlwa|rn[1] ==|
|00003750| 20 27 57 27 20 29 0a 20 | 20 70 75 74 73 28 22 53 | 'W' ). | puts("S|
|00003760| 51 4c 57 41 52 4e 49 4e | 47 3a 20 43 6f 6c 75 6d |QLWARNIN|G: Colum|
|00003770| 6e 20 77 61 73 20 74 72 | 75 6e 63 61 74 65 64 2e |n was tr|uncated.|
|00003780| 22 29 3b 0a 65 6c 73 65 | 20 69 66 20 28 20 73 71 |");.else| if ( sq|
|00003790| 6c 63 61 2e 73 71 6c 77 | 61 72 6e 5b 32 5d 20 3d |lca.sqlw|arn[2] =|
|000037a0| 3d 20 27 57 27 20 29 0a | 20 20 70 75 74 73 28 22 |= 'W' ).| puts("|
|000037b0| 53 51 4c 57 41 52 4e 49 | 4e 47 3a 20 4e 75 6c 6c |SQLWARNI|NG: Null|
|000037c0| 20 76 61 6c 75 65 73 20 | 69 6e 20 61 67 67 72 65 | values |in aggre|
|000037d0| 67 61 74 65 20 28 4d 41 | 58 2c 20 53 55 4d 29 20 |gate (MA|X, SUM) |
|000037e0| 66 75 6e 63 74 69 6f 6e | 2e 22 29 3b 0a 65 6c 73 |function|.");.els|
|000037f0| 65 20 69 66 20 28 20 73 | 71 6c 63 61 2e 73 71 6c |e if ( s|qlca.sql|
|00003800| 77 61 72 6e 5b 33 5d 20 | 3d 3d 20 27 57 27 20 29 |warn[3] |== 'W' )|
|00003810| 0a 20 20 70 75 74 73 28 | 22 53 51 4c 57 41 52 4e |. puts(|"SQLWARN|
|00003820| 49 4e 47 3a 20 49 4e 54 | 4f 20 76 61 72 20 63 6f |ING: INT|O var co|
|00003830| 75 6e 74 20 6e 6f 74 20 | 65 71 75 61 6c 20 63 6f |unt not |equal co|
|00003840| 6c 75 6d 6e 20 63 6f 75 | 6e 74 2e 22 29 3b 0a 65 |lumn cou|nt.");.e|
|00003850| 6c 73 65 20 69 66 20 28 | 20 73 71 6c 63 61 2e 73 |lse if (| sqlca.s|
|00003860| 71 6c 77 61 72 6e 5b 34 | 5d 20 3d 3d 20 27 57 27 |qlwarn[4|] == 'W'|
|00003870| 20 29 0a 20 20 70 75 74 | 73 28 22 53 51 4c 57 41 | ). put|s("SQLWA|
|00003880| 52 4e 49 4e 47 3a 20 55 | 70 64 61 74 65 20 6f 72 |RNING: U|pdate or|
|00003890| 20 44 65 6c 65 74 65 20 | 77 69 74 68 6f 75 74 20 | Delete |without |
|000038a0| 57 68 65 72 65 20 63 6c | 61 75 73 65 2e 22 29 3b |Where cl|ause.");|
|000038b0| 0a 65 6c 73 65 20 69 66 | 20 28 20 73 71 6c 63 61 |.else if| ( sqlca|
|000038c0| 2e 73 71 6c 77 61 72 6e | 5b 35 5d 20 3d 3d 20 27 |.sqlwarn|[5] == '|
|000038d0| 57 27 20 29 0a 20 20 70 | 75 74 73 28 22 53 51 4c |W' ). p|uts("SQL|
|000038e0| 57 41 52 4e 49 4e 47 3a | 20 3f 3f 3f 2e 22 29 3b |WARNING:| ???.");|
|000038f0| 0a 65 6c 73 65 20 69 66 | 20 28 20 73 71 6c 63 61 |.else if| ( sqlca|
|00003900| 2e 73 71 6c 77 61 72 6e | 5b 36 5d 20 3d 3d 20 27 |.sqlwarn|[6] == '|
|00003910| 57 27 20 29 0a 20 20 70 | 75 74 73 28 22 53 51 4c |W' ). p|uts("SQL|
|00003920| 57 41 52 4e 49 4e 47 3a | 20 52 6f 6c 6c 62 61 63 |WARNING:| Rollbac|
|00003930| 6b 20 72 65 71 75 69 72 | 65 64 2e 22 29 3b 0a 65 |k requir|ed.");.e|
|00003940| 6c 73 65 20 69 66 20 28 | 20 73 71 6c 63 61 2e 73 |lse if (| sqlca.s|
|00003950| 71 6c 77 61 72 6e 5b 37 | 5d 20 3d 3d 20 27 57 27 |qlwarn[7|] == 'W'|
|00003960| 20 29 0a 20 20 70 75 74 | 73 28 22 53 51 4c 57 41 | ). put|s("SQLWA|
|00003970| 52 4e 49 4e 47 3a 20 43 | 68 61 6e 67 65 20 61 66 |RNING: C|hange af|
|00003980| 74 65 72 20 71 75 65 72 | 79 20 73 74 61 72 74 20 |ter quer|y start |
|00003990| 6f 6e 20 53 65 6c 65 63 | 74 20 46 6f 72 20 55 70 |on Selec|t For Up|
|000039a0| 64 61 74 65 2e 22 29 3b | 0a 20 0a 2f 2a 20 65 6e |date.");|. ./* en|
|000039b0| 64 20 6d 75 66 77 72 6e | 20 2a 2f 0a 7d 0a 20 0a |d mufwrn| */.}. .|
|000039c0| 20 0a 63 6c 65 61 6e 55 | 70 28 29 0a 7b 0a 20 20 | .cleanU|p().{. |
|000039d0| 69 66 20 28 73 64 70 2d | 3e 4e 20 21 3d 20 30 29 |if (sdp-|>N != 0)|
|000039e0| 20 66 72 65 65 53 65 6c | 56 61 72 73 28 29 3b 0a | freeSel|Vars();.|
|000039f0| 20 20 69 66 20 28 76 61 | 72 73 20 21 3d 20 30 29 | if (va|rs != 0)|
|00003a00| 20 7b 66 72 65 65 28 76 | 61 72 73 29 3b 20 76 61 | {free(v|ars); va|
|00003a10| 72 73 20 3d 20 30 3b 7d | 0a 20 20 73 71 6c 63 6c |rs = 0;}|. sqlcl|
|00003a20| 75 28 62 64 70 29 3b 09 | 20 20 20 20 20 20 20 2f |u(bdp);.| /|
|00003a30| 2a 20 46 72 65 65 20 74 | 68 65 20 62 69 6e 64 20 |* Free t|he bind |
|00003a40| 76 61 72 69 61 62 6c 65 | 73 20 64 65 73 63 72 69 |variable|s descri|
|00003a50| 70 74 6f 72 20 20 20 2a | 2f 0a 20 20 73 71 6c 63 |ptor *|/. sqlc|
|00003a60| 6c 75 28 73 64 70 29 3b | 09 20 20 20 20 20 20 20 |lu(sdp);|. |
|00003a70| 2f 2a 20 46 72 65 65 20 | 74 68 65 20 73 65 6c 65 |/* Free |the sele|
|00003a80| 63 74 20 6c 69 73 74 20 | 64 65 73 63 72 69 70 74 |ct list |descript|
|00003a90| 6f 72 20 20 20 20 20 20 | 2a 2f 0a 7d 0a 20 0a 67 |or |*/.}. .g|
|00003aa0| 65 74 43 6f 6d 28 73 29 | 0a 63 68 61 72 20 2a 73 |etCom(s)|.char *s|
|00003ab0| 3b 0a 7b 0a 20 20 69 6e | 74 20 69 2c 20 6c 3b 0a |;.{. in|t i, l;.|
|00003ac0| 20 20 63 68 61 72 20 74 | 65 6d 70 5b 32 35 36 5d | char t|emp[256]|
|00003ad0| 3b 0a 20 0a 20 20 70 72 | 69 6e 74 66 28 22 44 53 |;. . pr|intf("DS|
|00003ae0| 51 4c 3a 20 22 29 3b 0a | 20 20 66 66 6c 75 73 68 |QL: ");.| fflush|
|00003af0| 28 73 74 64 6f 75 74 29 | 3b 0a 20 20 67 65 74 73 |(stdout)|;. gets|
|00003b00| 28 73 29 3b 0a 20 20 69 | 66 20 28 28 6c 3d 73 74 |(s);. i|f ((l=st|
|00003b10| 72 6c 65 6e 28 73 29 29 | 20 3c 20 32 29 20 72 65 |rlen(s))| < 2) re|
|00003b20| 74 75 72 6e 28 46 41 4c | 53 45 29 3b 0a 20 20 69 |turn(FAL|SE);. i|
|00003b30| 66 20 28 73 5b 6c 2d 31 | 5d 20 3d 3d 20 27 3b 27 |f (s[l-1|] == ';'|
|00003b40| 29 20 7b 73 5b 6c 2d 31 | 5d 20 3d 20 27 5c 30 27 |) {s[l-1|] = '\0'|
|00003b50| 3b 20 72 65 74 75 72 6e | 28 54 52 55 45 29 3b 7d |; return|(TRUE);}|
|00003b60| 0a 20 20 66 6f 72 20 28 | 69 20 3d 20 32 3b 20 3b |. for (|i = 2; ;|
|00003b70| 20 69 2b 2b 29 0a 20 20 | 20 20 7b 0a 20 20 20 20 | i++). | {. |
|00003b80| 70 72 69 6e 74 66 28 22 | 25 2a 75 3a 20 22 2c 20 |printf("|%*u: ", |
|00003b90| 32 2c 20 69 29 3b 0a 20 | 20 20 20 66 66 6c 75 73 |2, i);. | fflus|
|00003ba0| 68 28 73 74 64 6f 75 74 | 29 3b 0a 20 20 20 20 67 |h(stdout|);. g|
|00003bb0| 65 74 73 28 74 65 6d 70 | 29 3b 0a 20 20 20 20 73 |ets(temp|);. s|
|00003bc0| 74 72 63 61 74 28 73 2c | 20 22 20 22 29 3b 0a 20 |trcat(s,| " ");. |
|00003bd0| 20 20 20 73 74 72 63 61 | 74 28 73 2c 20 74 65 6d | strca|t(s, tem|
|00003be0| 70 29 3b 0a 20 20 20 20 | 69 66 20 28 73 5b 28 6c |p);. |if (s[(l|
|00003bf0| 3d 73 74 72 6c 65 6e 28 | 73 29 2d 31 29 5d 20 3d |=strlen(|s)-1)] =|
|00003c00| 3d 20 27 3b 27 29 20 7b | 73 5b 6c 5d 20 3d 20 27 |= ';') {|s[l] = '|
|00003c10| 5c 30 27 3b 20 72 65 74 | 75 72 6e 28 54 52 55 45 |\0'; ret|urn(TRUE|
|00003c20| 29 3b 7d 0a 20 20 20 20 | 7d 0a 7d 0a 20 0a 70 72 |);}. |}.}. .pr|
|00003c30| 69 6e 74 28 64 70 29 0a | 53 51 4c 44 41 20 2a 64 |int(dp).|SQLDA *d|
|00003c40| 70 3b 0a 7b 0a 09 20 69 | 6e 74 09 20 20 20 69 3b |p;.{.. i|nt. i;|
|00003c50| 0a 09 20 69 6e 74 09 20 | 20 2a 76 70 3b 0a 09 20 |.. int. | *vp;.. |
|00003c60| 73 68 6f 72 74 09 20 20 | 2a 69 70 3b 0a 20 0a 2f |short. |*ip;. ./|
|00003c70| 2a 20 62 65 67 69 6e 20 | 70 72 69 6e 74 20 2a 2f |* begin |print */|
|00003c80| 0a 20 0a 66 6f 72 20 28 | 69 20 3d 20 30 3b 20 69 |. .for (|i = 0; i|
|00003c90| 20 3c 20 64 70 2d 3e 4e | 3b 20 69 2b 2b 29 0a 20 | < dp->N|; i++). |
|00003ca0| 20 7b 0a 20 20 69 70 20 | 3d 20 64 70 2d 3e 49 5b | {. ip |= dp->I[|
|00003cb0| 69 5d 3b 0a 20 20 69 66 | 20 28 2a 69 70 20 3c 20 |i];. if| (*ip < |
|00003cc0| 30 29 09 20 20 20 20 20 | 20 20 2f 2a 20 72 65 74 |0). | /* ret|
|00003cd0| 75 72 6e 65 64 20 76 61 | 6c 75 65 20 69 73 20 6e |urned va|lue is n|
|00003ce0| 75 6c 6c 09 20 20 20 20 | 20 20 20 2a 2f 0a 20 20 |ull. | */. |
|00003cf0| 20 20 70 72 69 6e 74 66 | 28 22 25 2d 2a 73 20 22 | printf|("%-*s "|
|00003d00| 2c 20 64 70 2d 3e 4c 5b | 69 5d 2c 20 22 20 22 29 |, dp->L[|i], " ")|
|00003d10| 3b 0a 20 20 65 6c 73 65 | 0a 20 20 20 20 70 72 69 |;. else|. pri|
|00003d20| 6e 74 66 28 22 25 2d 2e | 2a 73 20 22 2c 64 70 2d |ntf("%-.|*s ",dp-|
|00003d30| 3e 4c 5b 69 5d 2c 20 64 | 70 2d 3e 56 5b 69 5d 29 |>L[i], d|p->V[i])|
|00003d40| 3b 0a 20 20 7d 0a 20 0a | 70 75 74 63 68 61 72 28 |;. }. .|putchar(|
|00003d50| 27 5c 6e 27 29 3b 0a 20 | 0a 2f 2a 20 65 6e 64 20 |'\n');. |./* end |
|00003d60| 70 72 69 6e 74 20 2a 2f | 0a 7d 0a 20 0a 20 0a 64 |print */|.}. . .d|
|00003d70| 65 73 63 42 69 6e 64 28 | 29 0a 7b 0a 20 20 45 58 |escBind(|).{. EX|
|00003d80| 45 43 20 53 51 4c 20 44 | 45 53 43 52 49 42 45 20 |EC SQL D|ESCRIBE |
|00003d90| 42 49 4e 44 20 56 41 52 | 49 41 42 4c 45 53 20 46 |BIND VAR|IABLES F|
|00003da0| 4f 52 20 53 20 49 4e 54 | 4f 20 62 64 70 3b 0a 20 |OR S INT|O bdp;. |
|00003db0| 20 69 66 20 28 62 64 70 | 2d 3e 46 20 3c 20 30 29 | if (bdp|->F < 0)|
|00003dc0| 20 20 20 20 2f 2a 20 44 | 65 73 63 72 69 70 74 6f | /* D|escripto|
|00003dd0| 72 20 6e 6f 74 20 6c 61 | 72 67 65 20 65 6e 6f 75 |r not la|rge enou|
|00003de0| 67 68 09 20 20 20 20 20 | 2a 2f 0a 20 20 20 20 7b |gh. |*/. {|
|00003df0| 0a 20 20 20 20 62 64 53 | 69 7a 65 20 3d 20 2d 28 |. bdS|ize = -(|
|00003e00| 62 64 70 2d 3e 46 29 3b | 0a 20 20 20 20 73 71 6c |bdp->F);|. sql|
|00003e10| 63 6c 75 28 62 64 70 29 | 3b 20 20 20 20 20 2f 2a |clu(bdp)|; /*|
|00003e20| 20 47 65 74 20 72 69 64 | 20 6f 66 20 63 75 72 72 | Get rid| of curr|
|00003e30| 65 6e 74 20 64 65 73 63 | 72 69 70 74 6f 72 09 20 |ent desc|riptor. |
|00003e40| 20 20 20 20 2a 2f 0a 20 | 20 20 20 62 64 70 20 3d | */. | bdp =|
|00003e50| 20 73 71 6c 61 6c 64 28 | 62 64 53 69 7a 65 2c 20 | sqlald(|bdSize, |
|00003e60| 31 30 2c 20 30 29 3b 20 | 20 20 20 20 2f 2a 20 41 |10, 0); | /* A|
|00003e70| 6c 6c 6f 63 61 74 65 20 | 72 69 67 68 74 20 73 69 |llocate |right si|
|00003e80| 7a 65 20 20 2a 2f 0a 20 | 20 20 20 45 58 45 43 20 |ze */. | EXEC |
|00003e90| 53 51 4c 20 44 45 53 43 | 52 49 42 45 20 42 49 4e |SQL DESC|RIBE BIN|
|00003ea0| 44 20 56 41 52 49 41 42 | 4c 45 53 20 46 4f 52 20 |D VARIAB|LES FOR |
|00003eb0| 53 20 49 4e 54 4f 20 62 | 64 70 3b 0a 20 20 20 20 |S INTO b|dp;. |
|00003ec0| 7d 0a 20 20 62 64 70 2d | 3e 4e 20 3d 20 62 64 70 |}. bdp-|>N = bdp|
|00003ed0| 2d 3e 46 3b 0a 7d 0a 20 | 0a 6c 6f 67 69 6e 28 61 |->F;.}. |.login(a|
|00003ee0| 72 67 63 2c 20 61 72 67 | 76 29 0a 09 20 69 6e 74 |rgc, arg|v).. int|
|00003ef0| 09 20 20 20 61 72 67 63 | 3b 0a 09 20 63 68 61 72 |. argc|;.. char|
|00003f00| 09 20 20 2a 61 72 67 76 | 5b 5d 3b 0a 7b 0a 2f 2a |. *argv|[];.{./*|
|00003f10| 20 62 65 67 69 6e 20 6c | 6f 67 69 6e 20 2a 2f 0a | begin l|ogin */.|
|00003f20| 20 0a 69 66 20 28 20 61 | 72 67 63 20 3d 3d 20 32 | .if ( a|rgc == 2|
|00003f30| 20 29 0a 20 20 7b 2f 2a | 20 43 61 6c 6c 65 72 20 | ). {/*| Caller |
|00003f40| 70 72 6f 76 69 64 65 64 | 20 75 73 72 2f 70 77 64 |provided| usr/pwd|
|00003f50| 2e 20 2a 2f 0a 20 20 73 | 74 72 63 70 79 28 75 69 |. */. s|trcpy(ui|
|00003f60| 64 2e 61 72 72 2c 61 72 | 67 76 5b 31 5d 29 3b 0a |d.arr,ar|gv[1]);.|
|00003f70| 20 20 75 69 64 2e 6c 65 | 6e 20 20 20 3d 20 73 74 | uid.le|n = st|
|00003f80| 72 6c 65 6e 28 61 72 67 | 76 5b 31 5d 29 3b 0a 20 |rlen(arg|v[1]);. |
|00003f90| 20 70 73 73 77 64 2e 6c | 65 6e 20 3d 20 30 3b 0a | psswd.l|en = 0;.|
|00003fa0| 20 20 45 58 45 43 20 53 | 51 4c 20 43 4f 4e 4e 45 | EXEC S|QL CONNE|
|00003fb0| 43 54 20 3a 75 69 64 3b | 0a 20 20 69 66 20 28 20 |CT :uid;|. if ( |
|00003fc0| 73 71 6c 63 61 2e 73 71 | 6c 63 6f 64 65 20 3d 3d |sqlca.sq|lcode ==|
|00003fd0| 20 30 20 29 0a 20 20 20 | 20 72 65 74 75 72 6e 3b | 0 ). | return;|
|00003fe0| 0a 20 0a 20 20 70 75 74 | 73 28 22 50 72 6f 62 6c |. . put|s("Probl|
|00003ff0| 65 6d 20 6c 6f 67 67 69 | 6e 67 20 69 6e 2c 20 70 |em loggi|ng in, p|
|00004000| 6c 65 61 73 65 20 74 72 | 79 20 61 67 61 69 6e 2e |lease tr|y again.|
|00004010| 2e 2e 5c 6e 22 29 3b 0a | 20 20 7d 0a 20 0a 66 6f |..\n");.| }. .fo|
|00004020| 72 20 28 20 3b 20 3b 20 | 29 0a 20 20 7b 0a 20 20 |r ( ; ; |). {. |
|00004030| 70 72 69 6e 74 66 28 22 | 55 73 65 72 6e 61 6d 65 |printf("|Username|
|00004040| 3a 20 22 29 3b 0a 20 20 | 66 66 6c 75 73 68 28 73 |: ");. |fflush(s|
|00004050| 74 64 6f 75 74 29 3b 0a | 20 20 67 65 74 73 28 75 |tdout);.| gets(u|
|00004060| 69 64 2e 61 72 72 29 3b | 0a 20 20 69 66 20 28 75 |id.arr);|. if (u|
|00004070| 69 64 2e 61 72 72 5b 30 | 5d 20 3d 3d 20 27 5c 30 |id.arr[0|] == '\0|
|00004080| 27 29 20 72 65 74 75 72 | 6e 3b 0a 20 20 75 69 64 |') retur|n;. uid|
|00004090| 2e 6c 65 6e 20 3d 20 73 | 74 72 6c 65 6e 28 75 69 |.len = s|trlen(ui|
|000040a0| 64 2e 61 72 72 29 3b 0a | 20 20 70 72 69 6e 74 66 |d.arr);.| printf|
|000040b0| 28 22 50 61 73 73 77 6f | 72 64 3a 20 22 29 3b 0a |("Passwo|rd: ");.|
|000040c0| 20 20 66 66 6c 75 73 68 | 28 73 74 64 6f 75 74 29 | fflush|(stdout)|
|000040d0| 3b 0a 20 20 67 65 74 73 | 28 70 73 73 77 64 2e 61 |;. gets|(psswd.a|
|000040e0| 72 72 29 3b 0a 20 20 70 | 73 73 77 64 2e 6c 65 6e |rr);. p|sswd.len|
|000040f0| 20 3d 20 73 74 72 6c 65 | 6e 28 70 73 73 77 64 2e | = strle|n(psswd.|
|00004100| 61 72 72 29 3b 0a 20 0a | 20 20 45 58 45 43 20 53 |arr);. .| EXEC S|
|00004110| 51 4c 20 43 4f 4e 4e 45 | 43 54 20 3a 75 69 64 20 |QL CONNE|CT :uid |
|00004120| 49 44 45 4e 54 49 46 49 | 45 44 20 42 59 20 3a 70 |IDENTIFI|ED BY :p|
|00004130| 73 73 77 64 3b 0a 20 0a | 20 20 69 66 20 28 20 73 |sswd;. .| if ( s|
|00004140| 71 6c 63 61 2e 73 71 6c | 63 6f 64 65 20 3d 3d 20 |qlca.sql|code == |
|00004150| 30 20 29 0a 20 20 20 20 | 7b 0a 20 20 20 20 70 75 |0 ). |{. pu|
|00004160| 74 73 28 22 53 75 63 63 | 65 73 73 66 75 6c 6c 79 |ts("Succ|essfully|
|00004170| 20 63 6f 6e 6e 65 63 74 | 65 64 2e 5c 6e 22 29 3b | connect|ed.\n");|
|00004180| 0a 20 20 20 20 62 72 65 | 61 6b 3b 0a 20 20 20 20 |. bre|ak;. |
|00004190| 7d 0a 20 0a 20 20 70 75 | 74 73 28 22 50 72 6f 62 |}. . pu|ts("Prob|
|000041a0| 6c 65 6d 20 6c 6f 67 67 | 69 6e 67 20 69 6e 2c 20 |lem logg|ing in, |
|000041b0| 70 6c 65 61 73 65 20 74 | 72 79 20 61 67 61 69 6e |please t|ry again|
|000041c0| 2e 2e 2e 5c 6e 22 29 3b | 0a 20 20 7d 0a 20 0a 45 |...\n");|. }. .E|
|000041d0| 58 45 43 20 53 51 4c 20 | 57 48 45 4e 45 56 45 52 |XEC SQL |WHENEVER|
|000041e0| 20 53 51 4c 45 52 52 4f | 52 20 53 54 4f 50 3b 0a | SQLERRO|R STOP;.|
|000041f0| 20 0a 2f 2a 20 65 6e 64 | 20 6c 6f 67 69 6e 20 2a | ./* end| login *|
|00004200| 2f 0a 7d 0a 20 0a 67 65 | 74 42 56 56 61 6c 73 28 |/.}. .ge|tBVVals(|
|00004210| 76 61 72 73 29 0a 2f 2a | 20 47 65 74 20 74 68 65 |vars)./*| Get the|
|00004220| 20 75 73 65 72 20 74 6f | 20 73 75 70 70 6c 79 20 | user to| supply |
|00004230| 76 61 6c 75 65 73 20 66 | 6f 72 20 65 61 63 68 20 |values f|or each |
|00004240| 6f 66 20 74 68 65 20 62 | 69 6e 64 20 76 61 72 73 |of the b|ind vars|
|00004250| 2e 20 20 20 20 2a 2f 0a | 2f 2a 20 41 6c 6c 6f 63 |. */.|/* Alloc|
|00004260| 61 74 65 20 61 20 31 30 | 20 62 79 74 65 20 73 74 |ate a 10| byte st|
|00004270| 72 69 6e 67 20 66 6f 72 | 20 65 61 63 68 20 62 69 |ring for| each bi|
|00004280| 6e 64 20 76 61 72 69 61 | 62 6c 65 2e 09 20 20 20 |nd varia|ble.. |
|00004290| 20 20 20 20 2a 2f 0a 63 | 68 61 72 20 2a 2a 76 61 | */.c|har **va|
|000042a0| 72 73 3b 20 20 20 2f 2a | 20 41 20 70 74 72 20 74 |rs; /*| A ptr t|
|000042b0| 6f 20 61 20 70 74 72 20 | 74 6f 20 73 74 6f 72 61 |o a ptr |to stora|
|000042c0| 67 65 20 66 6f 72 20 62 | 69 6e 64 20 76 61 72 69 |ge for b|ind vari|
|000042d0| 61 62 6c 65 73 20 2a 2f | 0a 7b 0a 20 20 69 6e 74 |ables */|.{. int|
|000042e0| 20 69 3b 0a 20 0a 20 20 | 69 66 20 28 2a 76 61 72 | i;. . |if (*var|
|000042f0| 73 20 3d 3d 20 30 29 0a | 20 20 20 20 7b 0a 20 20 |s == 0).| {. |
|00004300| 20 20 2a 76 61 72 73 20 | 3d 20 6d 61 6c 6c 6f 63 | *vars |= malloc|
|00004310| 28 28 62 64 70 2d 3e 46 | 29 20 2a 20 31 30 29 3b |((bdp->F|) * 10);|
|00004320| 0a 20 0a 20 20 20 20 69 | 66 20 28 20 2a 76 61 72 |. . i|f ( *var|
|00004330| 73 20 3d 3d 20 4e 55 4c | 4c 20 29 0a 20 20 20 20 |s == NUL|L ). |
|00004340| 20 20 7b 2f 2a 20 50 72 | 6f 62 6c 65 6d 20 61 6c | {/* Pr|oblem al|
|00004350| 6c 6f 63 61 74 69 6e 67 | 20 6d 65 6d 6f 72 79 3f |locating| memory?|
|00004360| 21 3f 20 2a 2f 0a 20 20 | 20 20 20 20 70 75 74 73 |!? */. | puts|
|00004370| 28 22 44 53 51 4c 20 46 | 41 49 4c 3a 20 2a 76 61 |("DSQL F|AIL: *va|
|00004380| 72 73 20 3d 20 6d 61 6c | 6c 6f 63 28 28 62 64 70 |rs = mal|loc((bdp|
|00004390| 2d 3e 46 29 20 2a 20 31 | 30 29 22 29 3b 0a 20 20 |->F) * 1|0)");. |
|000043a0| 20 20 20 20 65 78 69 74 | 28 45 58 5f 46 54 4c 29 | exit|(EX_FTL)|
|000043b0| 3b 0a 20 20 20 20 20 20 | 7d 0a 20 20 20 20 7d 0a |;. |}. }.|
|000043c0| 20 0a 20 20 2f 2a 20 41 | 6c 6c 6f 63 61 74 65 20 | . /* A|llocate |
|000043d0| 61 20 31 30 20 62 79 74 | 65 20 73 74 72 69 6e 67 |a 10 byt|e string|
|000043e0| 20 74 6f 20 68 6f 6c 64 | 20 74 68 65 20 76 61 6c | to hold| the val|
|000043f0| 75 65 20 74 68 61 74 09 | 20 20 20 20 20 20 20 2a |ue that.| *|
|00004400| 2f 0a 20 20 2f 2a 20 74 | 68 65 20 75 73 65 72 20 |/. /* t|he user |
|00004410| 67 69 76 65 73 20 66 6f | 72 20 65 61 63 68 20 62 |gives fo|r each b|
|00004420| 69 6e 64 20 76 61 72 69 | 61 62 6c 65 2e 09 09 20 |ind vari|able... |
|00004430| 20 20 20 20 20 20 2a 2f | 0a 20 20 70 72 69 6e 74 | */|. print|
|00004440| 66 28 22 50 6c 65 61 73 | 65 20 65 6e 74 65 72 20 |f("Pleas|e enter |
|00004450| 76 61 6c 75 65 73 20 66 | 6f 72 20 74 68 65 20 62 |values f|or the b|
|00004460| 69 6e 64 20 76 61 72 69 | 61 62 6c 65 73 3a 5c 6e |ind vari|ables:\n|
|00004470| 22 29 3b 0a 20 20 66 6f | 72 20 28 69 20 3d 20 30 |");. fo|r (i = 0|
|00004480| 3b 20 69 20 3c 20 62 64 | 70 2d 3e 46 3b 20 69 2b |; i < bd|p->F; i+|
|00004490| 2b 29 0a 20 20 20 20 7b | 0a 20 20 20 20 70 72 69 |+). {|. pri|
|000044a0| 6e 74 66 28 22 25 2e 2a | 73 3a 20 22 2c 20 62 64 |ntf("%.*|s: ", bd|
|000044b0| 70 2d 3e 43 5b 69 5d 2c | 20 62 64 70 2d 3e 53 5b |p->C[i],| bdp->S[|
|000044c0| 69 5d 29 3b 0a 20 20 20 | 20 62 64 70 2d 3e 56 5b |i]);. | bdp->V[|
|000044d0| 69 5d 20 3d 20 26 28 28 | 2a 76 61 72 73 29 5b 69 |i] = &((|*vars)[i|
|000044e0| 2a 31 30 5d 29 3b 0a 20 | 20 20 20 66 66 6c 75 73 |*10]);. | fflus|
|000044f0| 68 28 73 74 64 6f 75 74 | 29 3b 0a 20 20 20 20 67 |h(stdout|);. g|
|00004500| 65 74 73 28 62 64 70 2d | 3e 56 5b 69 5d 29 3b 0a |ets(bdp-|>V[i]);.|
|00004510| 20 20 20 20 62 64 70 2d | 3e 54 5b 69 5d 20 3d 20 | bdp-|>T[i] = |
|00004520| 31 3b 0a 20 20 20 20 62 | 64 70 2d 3e 4c 5b 69 5d |1;. b|dp->L[i]|
|00004530| 20 3d 20 73 74 72 6c 65 | 6e 28 62 64 70 2d 3e 56 | = strle|n(bdp->V|
|00004540| 5b 69 5d 29 3b 0a 20 20 | 20 20 62 64 70 2d 3e 49 |[i]);. | bdp->I|
|00004550| 5b 69 5d 20 3d 20 30 3b | 0a 20 20 20 20 7d 0a 7d |[i] = 0;|. }.}|
|00004560| 0a 20 0a 64 65 73 63 53 | 65 6c 28 29 0a 2f 2a 20 |. .descS|el()./* |
|00004570| 44 65 73 63 72 69 62 65 | 20 74 68 65 20 73 65 6c |Describe| the sel|
|00004580| 65 63 74 20 6c 69 73 74 | 20 76 61 72 69 61 62 6c |ect list| variabl|
|00004590| 65 73 20 69 6e 74 6f 20 | 73 64 70 2c 20 65 78 70 |es into |sdp, exp|
|000045a0| 61 6e 64 69 6e 67 20 69 | 66 20 20 20 2a 2f 0a 2f |anding i|f */./|
|000045b0| 2a 20 6e 65 63 65 73 73 | 61 72 79 2e 20 53 65 74 |* necess|ary. Set|
|000045c0| 20 64 65 73 63 2e 20 73 | 69 7a 65 20 74 6f 20 6e | desc. s|ize to n|
|000045d0| 75 6d 62 65 72 20 6f 66 | 20 63 6f 6c 75 6d 6e 73 |umber of| columns|
|000045e0| 20 66 6f 75 6e 64 2e 20 | 20 20 20 20 20 20 2a 2f | found. | */|
|000045f0| 0a 7b 0a 20 20 45 58 45 | 43 20 53 51 4c 20 44 45 |.{. EXE|C SQL DE|
|00004600| 53 43 52 49 42 45 20 53 | 45 4c 45 43 54 20 4c 49 |SCRIBE S|ELECT LI|
|00004610| 53 54 20 46 4f 52 20 53 | 20 49 4e 54 4f 20 73 64 |ST FOR S| INTO sd|
|00004620| 70 3b 0a 20 20 69 66 20 | 28 73 64 70 2d 3e 46 20 |p;. if |(sdp->F |
|00004630| 3c 20 30 29 09 20 20 20 | 20 20 20 20 2f 2a 20 64 |< 0). | /* d|
|00004640| 65 73 63 72 69 70 74 6f | 72 20 77 61 73 6e 27 74 |escripto|r wasn't|
|00004650| 20 62 69 67 20 65 6e 6f | 75 67 68 20 2a 2f 0a 20 | big eno|ugh */. |
|00004660| 20 20 20 7b 0a 20 20 20 | 20 73 64 53 69 7a 65 20 | {. | sdSize |
|00004670| 3d 20 2d 28 73 64 70 2d | 3e 46 29 3b 20 20 20 20 |= -(sdp-|>F); |
|00004680| 20 20 20 20 2f 2a 20 73 | 61 76 65 20 63 6f 72 72 | /* s|ave corr|
|00004690| 65 63 74 20 73 69 7a 65 | 09 20 20 20 20 20 20 20 |ect size|. |
|000046a0| 2a 2f 0a 20 20 20 20 73 | 71 6c 63 6c 75 28 73 64 |*/. s|qlclu(sd|
|000046b0| 70 29 3b 09 20 20 20 20 | 20 20 20 2f 2a 20 46 72 |p);. | /* Fr|
|000046c0| 65 65 20 73 6d 61 6c 6c | 20 64 65 73 63 72 69 70 |ee small| descrip|
|000046d0| 74 6f 72 20 20 20 20 20 | 20 20 20 2a 2f 0a 20 20 |tor | */. |
|000046e0| 20 20 73 64 70 20 3d 20 | 73 71 6c 61 6c 64 28 73 | sdp = |sqlald(s|
|000046f0| 64 53 69 7a 65 2c 20 31 | 30 2c 20 30 29 3b 20 20 |dSize, 1|0, 0); |
|00004700| 20 20 20 20 20 2f 2a 20 | 41 6c 6c 6f 63 2e 20 63 | /* |Alloc. c|
|00004710| 6f 72 72 65 63 74 20 73 | 69 7a 65 20 20 2a 2f 0a |orrect s|ize */.|
|00004720| 20 20 20 20 45 58 45 43 | 20 53 51 4c 20 44 45 53 | EXEC| SQL DES|
|00004730| 43 52 49 42 45 20 53 45 | 4c 45 43 54 20 4c 49 53 |CRIBE SE|LECT LIS|
|00004740| 54 20 46 4f 52 20 53 20 | 49 4e 54 4f 20 73 64 70 |T FOR S |INTO sdp|
|00004750| 3b 0a 20 20 20 20 7d 0a | 20 20 73 64 70 2d 3e 4e |;. }.| sdp->N|
|00004760| 20 3d 20 73 64 70 2d 3e | 46 3b 0a 7d 0a 20 0a 2f | = sdp->|F;.}. ./|
|00004770| 2a 2a 09 20 64 6f 46 65 | 74 63 68 65 73 28 29 0a |**. doFe|tches().|
|00004780| 20 0a 09 20 50 72 69 6e | 74 20 74 68 65 20 63 6f | .. Prin|t the co|
|00004790| 6c 75 6d 6e 20 68 65 61 | 64 65 72 73 2c 20 64 6f |lumn hea|ders, do|
|000047a0| 20 74 68 65 20 66 65 74 | 63 68 65 73 2c 20 61 6e | the fet|ches, an|
|000047b0| 64 20 63 61 6c 6c 20 70 | 72 69 6e 74 0a 09 20 66 |d call p|rint.. f|
|000047c0| 6f 72 20 65 61 63 68 20 | 72 6f 77 20 66 6f 75 6e |or each |row foun|
|000047d0| 64 2e 20 50 72 69 6e 74 | 20 63 6f 75 6e 74 20 66 |d. Print| count f|
|000047e0| 6f 75 6e 64 2e 0a 2a 2f | 0a 64 6f 46 65 74 63 68 |ound..*/|.doFetch|
|000047f0| 65 73 28 29 0a 7b 0a 09 | 20 69 6e 74 09 20 20 20 |es().{..| int. |
|00004800| 63 6e 74 3b 0a 09 20 63 | 68 61 72 09 20 20 20 63 |cnt;.. c|har. c|
|00004810| 6f 6c 6e 61 6d 65 5b 31 | 30 30 5d 3b 0a 09 20 69 |olname[1|00];.. i|
|00004820| 6e 74 09 20 20 20 63 6f | 6c 6e 61 6d 65 6c 3b 0a |nt. co|lnamel;.|
|00004830| 20 0a 2f 2a 20 62 65 67 | 69 6e 20 64 6f 46 65 74 | ./* beg|in doFet|
|00004840| 63 68 65 73 20 2a 2f 0a | 20 0a 45 58 45 43 20 53 |ches */.| .EXEC S|
|00004850| 51 4c 20 57 48 45 4e 45 | 56 45 52 20 4e 4f 54 20 |QL WHENE|VER NOT |
|00004860| 46 4f 55 4e 44 20 47 4f | 54 4f 20 4e 4f 54 5f 46 |FOUND GO|TO NOT_F|
|00004870| 4e 44 3b 0a 20 0a 2f 2a | 20 50 72 69 6e 74 20 63 |ND;. ./*| Print c|
|00004880| 6f 6c 75 6d 6e 20 6e 61 | 6d 65 73 09 09 09 09 09 |olumn na|mes.....|
|00004890| 20 20 20 20 20 2a 2f 0a | 20 0a 70 75 74 63 68 61 | */.| .putcha|
|000048a0| 72 28 27 5c 6e 27 29 3b | 0a 20 0a 66 6f 72 20 28 |r('\n');|. .for (|
|000048b0| 63 6e 74 20 3d 20 30 3b | 20 63 6e 74 20 3c 20 73 |cnt = 0;| cnt < s|
|000048c0| 64 70 2d 3e 4e 3b 20 63 | 6e 74 2b 2b 29 0a 20 20 |dp->N; c|nt++). |
|000048d0| 7b 2f 2a 20 50 72 69 6e | 74 20 61 20 63 6f 6c 75 |{/* Prin|t a colu|
|000048e0| 6d 6e 20 6e 61 6d 65 3a | 20 6c 65 66 74 2d 6a 75 |mn name:| left-ju|
|000048f0| 73 74 20 66 6f 72 20 63 | 68 61 72 3b 20 72 74 2d |st for c|har; rt-|
|00004900| 6a 75 73 74 20 66 6f 72 | 20 6e 75 6d 62 65 72 2e |just for| number.|
|00004910| 20 2a 2f 0a 20 20 63 6f | 6c 6e 61 6d 65 6c 20 3d | */. co|lnamel =|
|00004920| 20 6d 69 6e 28 73 64 70 | 2d 3e 4c 5b 63 6e 74 5d | min(sdp|->L[cnt]|
|00004930| 2c 73 64 70 2d 3e 43 5b | 63 6e 74 5d 29 3b 0a 20 |,sdp->C[|cnt]);. |
|00004940| 20 63 6f 6c 6e 61 6d 65 | 6c 20 3d 20 6d 69 6e 28 | colname|l = min(|
|00004950| 63 6f 6c 6e 61 6d 65 6c | 2c 73 69 7a 65 6f 66 28 |colnamel|,sizeof(|
|00004960| 63 6f 6c 6e 61 6d 65 29 | 2d 31 29 3b 0a 20 20 6d |colname)|-1);. m|
|00004970| 65 6d 63 70 79 28 63 6f | 6c 6e 61 6d 65 2c 73 64 |emcpy(co|lname,sd|
|00004980| 70 2d 3e 53 5b 63 6e 74 | 5d 2c 63 6f 6c 6e 61 6d |p->S[cnt|],colnam|
|00004990| 65 6c 29 3b 0a 20 20 63 | 6f 6c 6e 61 6d 65 5b 63 |el);. c|olname[c|
|000049a0| 6f 6c 6e 61 6d 65 6c 5d | 20 3d 20 27 5c 30 27 3b |olnamel]| = '\0';|
|000049b0| 0a 20 0a 20 20 69 66 20 | 28 20 73 64 74 5b 63 6e |. . if |( sdt[cn|
|000049c0| 74 5d 20 3d 3d 20 32 20 | 29 0a 20 20 20 20 7b 2f |t] == 2 |). {/|
|000049d0| 2a 20 4e 55 4d 42 45 52 | 3a 20 72 74 2d 6a 75 73 |* NUMBER|: rt-jus|
|000049e0| 74 69 66 79 2e 20 2a 2f | 0a 20 20 20 20 70 72 69 |tify. */|. pri|
|000049f0| 6e 74 66 28 22 25 2a 73 | 20 22 2c 20 73 64 70 2d |ntf("%*s| ", sdp-|
|00004a00| 3e 4c 5b 63 6e 74 5d 2c | 63 6f 6c 6e 61 6d 65 29 |>L[cnt],|colname)|
|00004a10| 3b 0a 20 20 20 20 7d 0a | 20 20 65 6c 73 65 0a 20 |;. }.| else. |
|00004a20| 20 20 20 7b 2f 2a 20 4e | 6f 74 20 4e 55 4d 42 45 | {/* N|ot NUMBE|
|00004a30| 52 3a 20 6c 65 66 74 2d | 6a 75 73 74 69 66 79 2e |R: left-|justify.|
|00004a40| 20 2a 2f 0a 20 20 20 20 | 70 72 69 6e 74 66 28 22 | */. |printf("|
|00004a50| 25 2d 2a 73 20 22 2c 20 | 73 64 70 2d 3e 4c 5b 63 |%-*s ", |sdp->L[c|
|00004a60| 6e 74 5d 2c 63 6f 6c 6e | 61 6d 65 29 3b 0a 20 20 |nt],coln|ame);. |
|00004a70| 20 20 7d 0a 20 20 7d 0a | 20 0a 2f 2a 20 55 6e 64 | }. }.| ./* Und|
|00004a80| 65 72 6c 69 6e 65 20 74 | 68 65 20 63 6f 6c 75 6d |erline t|he colum|
|00004a90| 6e 20 6e 61 6d 65 73 09 | 09 09 09 20 20 20 20 20 |n names.|... |
|00004aa0| 2a 2f 0a 20 0a 70 75 74 | 63 68 61 72 28 27 5c 6e |*/. .put|char('\n|
|00004ab0| 27 29 3b 0a 20 0a 66 6f | 72 20 28 63 6e 74 20 3d |');. .fo|r (cnt =|
|00004ac0| 20 30 3b 20 63 6e 74 20 | 3c 20 73 64 70 2d 3e 4e | 0; cnt |< sdp->N|
|00004ad0| 3b 20 63 6e 74 2b 2b 29 | 0a 20 20 7b 0a 20 20 69 |; cnt++)|. {. i|
|00004ae0| 6e 74 20 69 3b 0a 20 0a | 20 20 66 6f 72 20 28 69 |nt i;. .| for (i|
|00004af0| 20 3d 20 30 3b 20 69 20 | 3c 20 73 64 70 2d 3e 4c | = 0; i |< sdp->L|
|00004b00| 5b 63 6e 74 5d 3b 20 69 | 2b 2b 29 0a 20 20 20 20 |[cnt]; i|++). |
|00004b10| 70 75 74 63 68 61 72 28 | 27 2d 27 29 3b 0a 20 0a |putchar(|'-');. .|
|00004b20| 20 20 70 75 74 63 68 61 | 72 28 27 20 27 29 3b 0a | putcha|r(' ');.|
|00004b30| 20 20 7d 0a 20 0a 70 75 | 74 63 68 61 72 28 27 5c | }. .pu|tchar('\|
|00004b40| 6e 27 29 3b 0a 20 0a 2f | 2a 20 41 63 74 75 61 6c |n');. ./|* Actual|
|00004b50| 6c 79 20 64 6f 20 74 68 | 65 20 66 65 74 63 68 65 |ly do th|e fetche|
|00004b60| 73 20 61 6e 64 20 70 72 | 69 6e 74 20 74 68 65 20 |s and pr|int the |
|00004b70| 72 65 73 75 6c 74 73 09 | 20 20 20 20 20 2a 2f 0a |results.| */.|
|00004b80| 20 0a 66 6f 72 20 28 63 | 6e 74 20 3d 20 30 3b 20 | .for (c|nt = 0; |
|00004b90| 3b 20 63 6e 74 2b 2b 29 | 0a 20 20 7b 0a 20 20 45 |; cnt++)|. {. E|
|00004ba0| 58 45 43 20 53 51 4c 20 | 46 45 54 43 48 20 43 20 |XEC SQL |FETCH C |
|00004bb0| 55 53 49 4e 47 20 44 45 | 53 43 52 49 50 54 4f 52 |USING DE|SCRIPTOR|
|00004bc0| 20 73 64 70 3b 0a 20 20 | 70 72 69 6e 74 28 73 64 | sdp;. |print(sd|
|00004bd0| 70 29 3b 09 2f 2a 20 50 | 72 69 6e 74 20 74 68 65 |p);./* P|rint the|
|00004be0| 20 72 65 73 75 6c 74 73 | 20 6f 66 20 74 68 65 20 | results| of the |
|00004bf0| 66 65 74 63 68 09 2a 2f | 0a 20 20 7d 0a 20 0a 4e |fetch.*/|. }. .N|
|00004c00| 4f 54 5f 46 4e 44 3a 20 | 70 72 69 6e 74 66 28 22 |OT_FND: |printf("|
|00004c10| 5c 6e 25 75 20 72 6f 77 | 28 73 29 20 73 65 6c 65 |\n%u row|(s) sele|
|00004c20| 63 74 65 64 5c 6e 22 2c | 20 63 6e 74 29 3b 0a 20 |cted\n",| cnt);. |
|00004c30| 0a 45 58 45 43 20 53 51 | 4c 20 57 48 45 4e 45 56 |.EXEC SQ|L WHENEV|
|00004c40| 45 52 20 4e 4f 54 20 46 | 4f 55 4e 44 20 43 4f 4e |ER NOT F|OUND CON|
|00004c50| 54 49 4e 55 45 3b 0a 20 | 0a 2f 2a 20 65 6e 64 20 |TINUE;. |./* end |
|00004c60| 64 6f 46 65 74 63 68 65 | 73 20 2a 2f 0a 7d 0a 20 |doFetche|s */.}. |
|00004c70| 0a 20 0a 2f 2a 2a 09 20 | 66 69 6c 6c 53 65 6c 44 |. ./**. |fillSelD|
|00004c80| 65 73 63 20 3a 20 46 69 | 6c 6c 20 53 45 4c 45 43 |esc : Fi|ll SELEC|
|00004c90| 54 20 44 65 73 63 72 69 | 70 74 6f 72 2e 0a 20 0a |T Descri|ptor.. .|
|00004ca0| 09 20 41 6c 6c 6f 63 61 | 74 65 20 73 74 6f 72 61 |. Alloca|te stora|
|00004cb0| 67 65 20 66 6f 72 20 65 | 61 63 68 20 6f 66 20 74 |ge for e|ach of t|
|00004cc0| 68 65 20 73 65 6c 65 63 | 74 20 6c 69 73 74 20 76 |he selec|t list v|
|00004cd0| 61 72 73 2c 20 61 6e 64 | 0a 09 20 61 6c 6c 6f 63 |ars, and|.. alloc|
|00004ce0| 61 74 65 20 73 74 6f 72 | 61 67 65 20 66 6f 72 20 |ate stor|age for |
|00004cf0| 61 6e 20 69 6e 64 69 63 | 61 74 6f 72 20 76 61 72 |an indic|ator var|
|00004d00| 69 61 62 6c 65 20 66 6f | 72 20 65 61 63 68 20 63 |iable fo|r each c|
|00004d10| 6f 6c 75 6d 6e 0a 2a 2f | 0a 66 69 6c 6c 53 65 6c |olumn.*/|.fillSel|
|00004d20| 44 65 73 63 28 29 0a 7b | 0a 09 20 69 6e 74 09 20 |Desc().{|.. int. |
|00004d30| 20 20 69 3b 0a 09 20 75 | 6e 73 69 67 6e 65 64 20 | i;.. u|nsigned |
|00004d40| 63 68 61 72 20 70 72 65 | 63 3b 0a 09 20 63 68 61 |char pre|c;.. cha|
|00004d50| 72 09 20 20 20 73 63 61 | 6c 65 3b 0a 20 0a 2f 2a |r. sca|le;. ./*|
|00004d60| 20 62 65 67 69 6e 20 66 | 69 6c 6c 53 65 6c 44 65 | begin f|illSelDe|
|00004d70| 73 63 20 2a 2f 0a 20 0a | 69 66 20 28 20 21 73 64 |sc */. .|if ( !sd|
|00004d80| 74 20 29 0a 20 20 7b 2f | 2a 20 48 61 76 65 6e 27 |t ). {/|* Haven'|
|00004d90| 74 20 61 6c 6c 6f 63 61 | 74 65 64 20 73 64 74 5b |t alloca|ted sdt[|
|00004da0| 5d 20 79 65 74 2e 20 2a | 2f 0a 20 20 73 64 74 20 |] yet. *|/. sdt |
|00004db0| 3d 20 28 73 68 6f 72 74 | 20 2a 29 6d 61 6c 6c 6f |= (short| *)mallo|
|00004dc0| 63 28 73 69 7a 65 6f 66 | 28 73 68 6f 72 74 29 20 |c(sizeof|(short) |
|00004dd0| 2a 20 73 64 70 2d 3e 4e | 29 3b 0a 20 20 7d 0a 65 |* sdp->N|);. }.e|
|00004de0| 6c 73 65 20 69 66 20 28 | 20 73 64 74 6c 20 3c 20 |lse if (| sdtl < |
|00004df0| 73 64 70 2d 3e 4e 20 29 | 0a 20 20 7b 2f 2a 20 4e |sdp->N )|. {/* N|
|00004e00| 65 65 64 20 74 6f 20 72 | 65 61 6c 6c 6f 63 61 74 |eed to r|eallocat|
|00004e10| 65 20 73 61 76 65 64 20 | 74 79 70 65 20 61 72 72 |e saved |type arr|
|00004e20| 61 79 2e 20 2a 2f 0a 20 | 20 73 64 74 20 3d 20 28 |ay. */. | sdt = (|
|00004e30| 73 68 6f 72 74 20 2a 29 | 72 65 61 6c 6c 6f 63 28 |short *)|realloc(|
|00004e40| 73 64 74 2c 73 69 7a 65 | 6f 66 28 73 68 6f 72 74 |sdt,size|of(short|
|00004e50| 29 20 2a 20 73 64 70 2d | 3e 4e 29 3b 0a 20 20 7d |) * sdp-|>N);. }|
|00004e60| 0a 20 0a 73 64 74 6c 20 | 3d 20 73 64 70 2d 3e 4e |. .sdtl |= sdp->N|
|00004e70| 3b 0a 20 0a 66 6f 72 20 | 28 69 20 3d 20 30 3b 20 |;. .for |(i = 0; |
|00004e80| 69 20 3c 20 73 64 70 2d | 3e 4e 3b 20 69 2b 2b 29 |i < sdp-|>N; i++)|
|00004e90| 0a 20 20 7b 0a 20 20 2f | 2a 20 53 61 76 65 20 6f |. {. /|* Save o|
|00004ea0| 72 69 67 69 6e 61 6c 20 | 74 79 70 65 3b 20 61 6e |riginal |type; an|
|00004eb0| 64 20 63 6c 65 61 72 20 | 70 6f 73 73 69 62 6c 65 |d clear |possible|
|00004ec0| 20 4e 55 4c 4c 0a 20 20 | 20 20 20 68 69 67 68 2d | NULL. | high-|
|00004ed0| 6f 72 64 65 72 20 62 69 | 74 2e 0a 20 20 2a 2f 0a |order bi|t.. */.|
|00004ee0| 20 20 73 64 70 2d 3e 54 | 5b 69 5d 20 3d 20 28 73 | sdp->T|[i] = (s|
|00004ef0| 64 70 2d 3e 54 5b 69 5d | 20 26 20 7e 30 78 38 30 |dp->T[i]| & ~0x80|
|00004f00| 30 30 29 3b 0a 20 20 73 | 64 74 5b 69 5d 20 20 20 |00);. s|dt[i] |
|00004f10| 20 3d 20 73 64 70 2d 3e | 54 5b 69 5d 3b 0a 20 0a | = sdp->|T[i];. .|
|00004f20| 20 20 69 66 20 28 20 73 | 64 70 2d 3e 54 5b 69 5d | if ( s|dp->T[i]|
|00004f30| 20 3d 3d 20 32 20 29 0a | 20 20 20 20 7b 2f 2a 20 | == 2 ).| {/* |
|00004f40| 48 61 76 65 20 4e 55 4d | 42 45 52 2e 20 4e 65 65 |Have NUM|BER. Nee|
|00004f50| 64 20 74 6f 20 67 65 74 | 20 70 72 65 63 69 73 69 |d to get| precisi|
|00004f60| 6f 6e 20 61 6e 64 20 73 | 63 61 6c 65 2e 20 2a 2f |on and s|cale. */|
|00004f70| 0a 20 20 20 20 70 72 65 | 63 20 20 3d 20 28 75 6e |. pre|c = (un|
|00004f80| 73 69 67 6e 65 64 20 63 | 68 61 72 29 28 73 64 70 |signed c|har)(sdp|
|00004f90| 2d 3e 4c 5b 69 5d 20 3e | 3e 20 38 29 3b 0a 20 20 |->L[i] >|> 8);. |
|00004fa0| 20 20 73 63 61 6c 65 20 | 3d 20 28 63 68 61 72 29 | scale |= (char)|
|00004fb0| 73 64 70 2d 3e 4c 5b 69 | 5d 3b 0a 20 0a 20 20 20 |sdp->L[i|];. . |
|00004fc0| 20 69 66 20 28 20 70 72 | 65 63 20 3d 3d 20 30 20 | if ( pr|ec == 0 |
|00004fd0| 29 0a 20 20 20 20 20 20 | 7b 2f 2a 20 4e 6f 20 70 |). |{/* No p|
|00004fe0| 72 65 63 69 73 69 6f 6e | 2e 20 55 73 65 72 20 64 |recision|. User d|
|00004ff0| 65 66 61 75 6c 74 2e 20 | 2a 2f 0a 20 20 20 20 20 |efault. |*/. |
|00005000| 20 70 72 65 63 20 3d 20 | 32 36 3b 0a 20 20 20 20 | prec = |26;. |
|00005010| 20 20 7d 0a 20 0a 20 20 | 20 20 73 64 70 2d 3e 4c | }. . | sdp->L|
|00005020| 5b 69 5d 20 3d 20 70 72 | 65 63 3b 0a 20 0a 20 20 |[i] = pr|ec;. . |
|00005030| 20 20 69 66 20 28 20 73 | 63 61 6c 65 20 3c 20 30 | if ( s|cale < 0|
|00005040| 20 29 0a 20 20 20 20 20 | 20 7b 2f 2a 20 48 61 76 | ). | {/* Hav|
|00005050| 65 20 2d 73 63 61 6c 65 | 2e 20 4e 65 65 64 20 74 |e -scale|. Need t|
|00005060| 6f 20 61 64 64 20 74 72 | 61 69 6c 69 6e 67 20 7a |o add tr|ailing z|
|00005070| 65 72 6f 73 2e 20 2a 2f | 0a 20 20 20 20 20 20 73 |eros. */|. s|
|00005080| 64 70 2d 3e 4c 5b 69 5d | 20 2b 3d 20 2d 73 63 61 |dp->L[i]| += -sca|
|00005090| 6c 65 3b 0a 20 20 20 20 | 20 20 7d 0a 20 0a 20 20 |le;. | }. . |
|000050a0| 20 20 73 64 70 2d 3e 4c | 5b 69 5d 20 2b 3d 20 32 | sdp->L|[i] += 2|
|000050b0| 3b 09 09 20 20 20 20 20 | 20 20 2f 2a 20 2b 32 20 |;.. | /* +2 |
|000050c0| 66 6f 72 20 70 6f 73 73 | 69 62 6c 65 20 73 69 67 |for poss|ible sig|
|000050d0| 6e 20 61 6e 64 20 64 65 | 63 69 6d 61 6c 20 70 74 |n and de|cimal pt|
|000050e0| 20 2a 2f 0a 20 20 20 20 | 7d 0a 20 0a 20 20 65 6c | */. |}. . el|
|000050f0| 73 65 20 69 66 20 28 20 | 73 64 70 2d 3e 54 5b 69 |se if ( |sdp->T[i|
|00005100| 5d 20 3d 3d 20 31 32 20 | 29 0a 20 20 20 20 7b 2f |] == 12 |). {/|
|00005110| 2a 20 48 61 76 65 20 44 | 41 54 45 2e 20 4e 65 65 |* Have D|ATE. Nee|
|00005120| 64 20 74 6f 20 73 65 74 | 20 64 65 66 61 75 6c 74 |d to set| default|
|00005130| 20 6c 65 6e 20 66 6f 72 | 20 44 44 2d 4d 4f 4e 2d | len for| DD-MON-|
|00005140| 59 59 2e 20 2a 2f 0a 20 | 20 20 20 73 64 70 2d 3e |YY. */. | sdp->|
|00005150| 4c 5b 69 5d 20 3d 20 39 | 3b 0a 20 20 20 20 7d 0a |L[i] = 9|;. }.|
|00005160| 20 0a 20 20 2f 2a 20 43 | 6f 65 72 63 65 20 74 6f | . /* C|oerce to|
|00005170| 20 43 48 41 52 2c 20 77 | 69 74 68 20 6d 61 78 20 | CHAR, w|ith max |
|00005180| 6c 65 6e 20 3d 20 32 34 | 30 2e 20 2a 2f 0a 20 0a |len = 24|0. */. .|
|00005190| 20 20 73 64 70 2d 3e 54 | 5b 69 5d 20 3d 20 31 3b | sdp->T|[i] = 1;|
|000051a0| 0a 20 20 73 64 70 2d 3e | 4c 5b 69 5d 20 3d 20 6d |. sdp->|L[i] = m|
|000051b0| 69 6e 28 73 64 70 2d 3e | 4c 5b 69 5d 2c 32 34 30 |in(sdp->|L[i],240|
|000051c0| 29 3b 0a 20 20 73 64 70 | 2d 3e 56 5b 69 5d 20 3d |);. sdp|->V[i] =|
|000051d0| 20 6d 61 6c 6c 6f 63 28 | 73 64 70 2d 3e 4c 5b 69 | malloc(|sdp->L[i|
|000051e0| 5d 29 3b 0a 20 20 73 64 | 70 2d 3e 49 5b 69 5d 20 |]);. sd|p->I[i] |
|000051f0| 3d 20 28 73 68 6f 72 74 | 20 2a 29 6d 61 6c 6c 6f |= (short| *)mallo|
|00005200| 63 28 73 69 7a 65 6f 66 | 28 73 68 6f 72 74 29 29 |c(sizeof|(short))|
|00005210| 3b 0a 20 20 7d 0a 20 0a | 2f 2a 20 65 6e 64 20 66 |;. }. .|/* end f|
|00005220| 69 6c 6c 53 65 6c 44 65 | 73 63 20 2a 2f 0a 7d 0a |illSelDe|sc */.}.|
|00005230| 20 0a 66 72 65 65 53 65 | 6c 56 61 72 73 28 29 0a | .freeSe|lVars().|
|00005240| 2f 2a 20 46 72 65 65 20 | 74 68 65 20 73 74 6f 72 |/* Free |the stor|
|00005250| 61 67 65 20 61 6c 6c 6f | 63 61 74 65 64 20 74 6f |age allo|cated to|
|00005260| 20 68 6f 6c 64 20 66 65 | 74 63 68 65 64 20 76 61 | hold fe|tched va|
|00005270| 6c 75 65 73 09 20 20 20 | 20 20 20 20 2a 2f 0a 7b |lues. | */.{|
|00005280| 0a 20 20 69 6e 74 20 69 | 3b 0a 20 20 66 6f 72 20 |. int i|;. for |
|00005290| 28 69 20 3d 20 30 3b 20 | 69 20 3c 20 73 64 70 2d |(i = 0; |i < sdp-|
|000052a0| 3e 4e 3b 20 69 2b 2b 29 | 0a 20 20 20 20 7b 0a 20 |>N; i++)|. {. |
|000052b0| 20 20 20 66 72 65 65 28 | 73 64 70 2d 3e 56 5b 69 | free(|sdp->V[i|
|000052c0| 5d 29 3b 0a 20 20 20 20 | 66 72 65 65 28 73 64 70 |]);. |free(sdp|
|000052d0| 2d 3e 49 5b 69 5d 29 3b | 0a 20 20 20 20 7d 0a 20 |->I[i]);|. }. |
|000052e0| 0a 20 20 73 64 70 2d 3e | 4e 20 3d 20 30 3b 20 20 |. sdp->|N = 0; |
|000052f0| 2f 2a 20 73 65 74 20 74 | 6f 20 22 68 61 76 65 20 |/* set t|o "have |
|00005300| 66 72 65 65 28 29 27 64 | 20 66 65 74 63 68 65 64 |free()'d| fetched|
|00005310| 2d 76 61 6c 20 73 74 6f | 72 61 67 65 22 20 2a 2f |-val sto|rage" */|
|00005320| 0a 7d 0a 20 0a 20 0a 2f | 2a 20 50 73 65 75 64 6f |.}. . ./|* Pseudo|
|00005330| 20 43 6f 6d 6d 61 6e 64 | 20 50 72 6f 63 65 64 75 | Command| Procedu|
|00005340| 72 65 73 2c 20 50 73 65 | 75 64 6f 20 43 6f 6d 6d |res, Pse|udo Comm|
|00005350| 61 6e 64 20 50 72 6f 63 | 65 73 73 6f 72 2c 20 61 |and Proc|essor, a|
|00005360| 6e 64 20 20 20 20 2a 2f | 0a 2f 2a 20 73 75 70 70 |nd */|./* supp|
|00005370| 6f 72 74 20 72 6f 75 74 | 69 6e 65 73 20 66 6f 72 |ort rout|ines for|
|00005380| 20 74 68 65 73 65 2e 09 | 09 09 09 20 20 20 20 20 | these..|... |
|00005390| 20 20 2a 2f 0a 20 0a 2f | 2a 20 50 73 65 75 64 6f | */. ./|* Pseudo|
|000053a0| 20 43 6f 6d 6d 61 6e 64 | 20 50 72 6f 63 65 64 75 | Command| Procedu|
|000053b0| 72 65 73 09 09 09 09 20 | 20 20 20 20 20 20 2a 2f |res.... | */|
|000053c0| 0a 20 0a 73 65 74 52 65 | 45 78 65 63 50 72 28 29 |. .setRe|ExecPr()|
|000053d0| 20 7b 72 65 45 78 65 63 | 20 3d 20 54 52 55 45 3b | {reExec| = TRUE;|
|000053e0| 7d 0a 72 65 73 65 74 41 | 75 74 6f 50 72 28 29 20 |}.resetA|utoPr() |
|000053f0| 7b 61 75 74 6f 43 6f 6d | 20 3d 20 46 41 4c 53 45 |{autoCom| = FALSE|
|00005400| 3b 20 70 72 69 6e 74 66 | 28 22 4e 6f 20 6c 6f 6e |; printf|("No lon|
|00005410| 67 65 72 20 69 6e 20 41 | 75 74 6f 43 6f 6d 6d 69 |ger in A|utoCommi|
|00005420| 74 20 6d 6f 64 65 5c 6e | 22 29 3b 7d 0a 73 65 74 |t mode\n|");}.set|
|00005430| 41 75 74 6f 50 72 28 29 | 20 20 20 7b 61 75 74 6f |AutoPr()| {auto|
|00005440| 43 6f 6d 20 3d 20 54 52 | 55 45 3b 20 70 72 69 6e |Com = TR|UE; prin|
|00005450| 74 66 28 22 4e 6f 77 20 | 69 6e 20 41 75 74 6f 43 |tf("Now |in AutoC|
|00005460| 6f 6d 6d 69 74 20 6d 6f | 64 65 5c 6e 22 29 3b 7d |ommit mo|de\n");}|
|00005470| 0a 73 65 74 44 6f 6e 65 | 50 72 28 29 20 20 20 7b |.setDone|Pr() {|
|00005480| 64 6f 6e 65 20 3d 20 54 | 52 55 45 3b 7d 0a 72 6f |done = T|RUE;}.ro|
|00005490| 6c 6c 42 6b 50 72 28 29 | 20 20 20 20 7b 72 6f 6c |llBkPr()| {rol|
|000054a0| 6c 42 61 63 6b 57 6f 72 | 6b 28 29 3b 20 70 72 69 |lBackWor|k(); pri|
|000054b0| 6e 74 66 28 22 57 6f 72 | 6b 20 52 6f 6c 6c 65 64 |ntf("Wor|k Rolled|
|000054c0| 20 42 61 63 6b 5c 6e 22 | 29 3b 7d 0a 63 6f 6d 6d | Back\n"|);}.comm|
|000054d0| 69 74 50 72 28 29 20 20 | 20 20 7b 63 6f 6d 6d 69 |itPr() | {commi|
|000054e0| 74 57 6f 72 6b 28 29 3b | 20 70 72 69 6e 74 66 28 |tWork();| printf(|
|000054f0| 22 57 6f 72 6b 20 43 6f | 6d 6d 69 74 74 65 64 5c |"Work Co|mmitted\|
|00005500| 6e 22 29 3b 7d 0a 68 65 | 6c 70 50 72 28 29 0a 7b |n");}.he|lpPr().{|
|00005510| 0a 20 20 70 72 69 6e 74 | 66 28 22 5c 6e 44 53 51 |. print|f("\nDSQ|
|00005520| 4c 20 56 31 2e 31 20 48 | 65 6c 70 5c 6e 22 29 3b |L V1.1 H|elp\n");|
|00005530| 0a 20 20 70 72 69 6e 74 | 66 28 22 54 6f 20 65 78 |. print|f("To ex|
|00005540| 65 63 75 74 65 20 61 20 | 53 51 4c 20 73 74 61 74 |ecute a |SQL stat|
|00005550| 65 6d 65 6e 74 2c 20 73 | 69 6d 70 6c 79 20 74 79 |ement, s|imply ty|
|00005560| 70 65 20 74 68 65 20 73 | 74 61 74 65 6d 65 6e 74 |pe the s|tatement|
|00005570| 5c 6e 22 29 3b 0a 20 20 | 70 72 69 6e 74 66 28 22 |\n");. |printf("|
|00005580| 77 68 65 6e 20 67 69 76 | 65 6e 20 74 68 65 20 70 |when giv|en the p|
|00005590| 72 6f 6d 70 74 2e 20 20 | 54 68 65 20 73 74 61 74 |rompt. |The stat|
|000055a0| 65 6d 65 6e 74 20 6d 61 | 79 20 20 62 65 20 65 6e |ement ma|y be en|
|000055b0| 74 65 72 65 64 5c 6e 22 | 29 3b 0a 20 20 70 72 69 |tered\n"|);. pri|
|000055c0| 6e 74 66 28 22 6f 6e 20 | 73 65 76 65 72 61 6c 20 |ntf("on |several |
|000055d0| 6c 69 6e 65 73 20 61 6e | 64 20 6d 75 73 74 20 62 |lines an|d must b|
|000055e0| 65 20 74 65 72 6d 69 6e | 61 74 65 64 20 62 79 20 |e termin|ated by |
|000055f0| 61 20 27 3b 27 2e 20 20 | 49 6e 5c 6e 22 29 3b 0a |a ';'. |In\n");.|
|00005600| 20 20 70 72 69 6e 74 66 | 28 22 66 61 63 74 2c 20 | printf|("fact, |
|00005610| 61 6c 6c 20 63 6f 6d 6d | 61 6e 64 73 20 6d 75 73 |all comm|ands mus|
|00005620| 74 20 62 65 20 74 65 72 | 6d 69 6e 61 74 65 64 20 |t be ter|minated |
|00005630| 62 79 20 61 20 27 3b 27 | 2e 20 54 68 65 72 65 5c |by a ';'|. There\|
|00005640| 6e 22 29 3b 0a 20 20 70 | 72 69 6e 74 66 28 22 61 |n");. p|rintf("a|
|00005650| 72 65 20 73 65 76 65 72 | 61 6c 20 70 73 65 75 64 |re sever|al pseud|
|00005660| 6f 20 63 6f 6d 6d 61 6e | 64 73 20 77 68 69 63 68 |o comman|ds which|
|00005670| 20 62 65 67 69 6e 20 77 | 69 74 68 20 61 20 27 2f | begin w|ith a '/|
|00005680| 27 2e 5c 6e 22 29 3b 0a | 20 20 70 72 69 6e 74 66 |'.\n");.| printf|
|00005690| 28 22 5c 6e 54 68 65 20 | 70 73 65 75 64 6f 20 63 |("\nThe |pseudo c|
|000056a0| 6f 6d 6d 61 6e 64 73 20 | 61 72 65 3a 5c 6e 22 29 |ommands |are:\n")|
|000056b0| 3b 0a 20 20 70 72 69 6e | 74 66 28 22 20 20 2f 63 |;. prin|tf(" /c|
|000056c0| 5b 6f 6d 6d 69 74 5d 20 | 20 20 20 20 20 20 20 20 |[ommit] | |
|000056d0| 43 6f 6d 6d 69 74 20 57 | 6f 72 6b 5c 6e 22 29 3b |Commit W|ork\n");|
|000056e0| 0a 20 20 70 72 69 6e 74 | 66 28 22 20 20 2f 72 6f |. print|f(" /ro|
|000056f0| 5b 6c 6c 62 61 63 6b 5d | 20 20 20 20 20 20 20 52 |[llback]| R|
|00005700| 6f 6c 6c 42 61 63 6b 20 | 57 6f 72 6b 5c 6e 22 29 |ollBack |Work\n")|
|00005710| 3b 0a 20 20 70 72 69 6e | 74 66 28 22 20 20 2f 72 |;. prin|tf(" /r|
|00005720| 75 5b 6e 5d 20 20 20 20 | 20 20 20 20 20 20 20 20 |u[n] | |
|00005730| 52 65 65 78 65 63 75 74 | 65 20 74 68 65 20 6c 61 |Reexecut|e the la|
|00005740| 73 74 20 53 51 4c 20 73 | 74 61 74 65 6d 65 6e 74 |st SQL s|tatement|
|00005750| 5c 6e 22 29 3b 0a 20 20 | 70 72 69 6e 74 66 28 22 |\n");. |printf("|
|00005760| 20 20 2f 65 5b 78 69 74 | 5d 20 20 20 20 20 20 20 | /e[xit|] |
|00005770| 20 20 20 20 45 78 69 74 | 20 74 68 69 73 20 70 72 | Exit| this pr|
|00005780| 6f 67 72 61 6d 5c 6e 22 | 29 3b 0a 20 20 70 72 69 |ogram\n"|);. pri|
|00005790| 6e 74 66 28 22 20 20 2f | 61 5b 75 74 6f 5d 20 20 |ntf(" /|a[uto] |
|000057a0| 20 20 20 20 20 20 20 20 | 20 45 6e 74 65 72 20 41 | | Enter A|
|000057b0| 75 74 6f 43 6f 6d 6d 69 | 74 20 4d 6f 64 65 5c 6e |utoCommi|t Mode\n|
|000057c0| 22 29 3b 0a 20 20 70 72 | 69 6e 74 66 28 22 20 20 |");. pr|intf(" |
|000057d0| 2f 6d 5b 61 6e 75 61 6c | 5d 20 20 20 20 20 20 20 |/m[anual|] |
|000057e0| 20 20 45 78 69 74 20 41 | 75 74 6f 43 6f 6d 6d 69 | Exit A|utoCommi|
|000057f0| 74 20 4d 6f 64 65 5c 6e | 22 29 3b 0a 20 20 70 72 |t Mode\n|");. pr|
|00005800| 69 6e 74 66 28 22 20 20 | 2f 68 5b 65 6c 70 5d 20 |intf(" |/h[elp] |
|00005810| 20 20 20 20 20 20 20 20 | 20 20 47 65 74 20 74 68 | | Get th|
|00005820| 69 73 20 69 6e 66 6f 72 | 6d 61 74 69 6f 6e 5c 6e |is infor|mation\n|
|00005830| 22 29 3b 0a 20 20 70 72 | 69 6e 74 66 28 22 46 6f |");. pr|intf("Fo|
|00005840| 72 20 6d 6f 72 65 20 64 | 65 74 61 69 6c 65 64 20 |r more d|etailed |
|00005850| 69 6e 66 6f 72 6d 61 74 | 69 6f 6e 2c 20 72 65 61 |informat|ion, rea|
|00005860| 64 20 74 68 65 20 63 6f | 64 65 2e 5c 6e 22 29 3b |d the co|de.\n");|
|00005870| 0a 7d 0a 20 0a 2f 2a 20 | 50 73 65 75 64 6f 20 43 |.}. ./* |Pseudo C|
|00005880| 6f 6d 6d 61 6e 64 20 54 | 61 62 6c 65 20 61 6e 64 |ommand T|able and|
|00005890| 20 43 6f 6d 6d 61 6e 64 | 20 50 72 6f 63 65 73 73 | Command| Process|
|000058a0| 6f 72 09 09 20 20 20 20 | 20 20 20 2a 2f 0a 20 0a |or.. | */. .|
|000058b0| 73 74 72 75 63 74 20 63 | 6f 6d 54 61 62 45 6e 74 |struct c|omTabEnt|
|000058c0| 72 79 20 7b 0a 20 20 63 | 68 61 72 20 2a 63 6d 64 |ry {. c|har *cmd|
|000058d0| 3b 09 20 20 20 20 20 20 | 20 2f 2a 20 55 6e 69 71 |;. | /* Uniq|
|000058e0| 75 65 20 70 72 65 66 69 | 78 20 6f 66 20 70 73 65 |ue prefi|x of pse|
|000058f0| 75 64 6f 20 63 6f 6d 6d | 61 6e 64 20 20 20 20 20 |udo comm|and |
|00005900| 20 2a 2f 0a 20 20 69 6e | 74 20 20 28 2a 70 72 6f | */. in|t (*pro|
|00005910| 63 29 28 29 3b 20 20 20 | 20 20 20 2f 2a 20 70 72 |c)(); | /* pr|
|00005920| 6f 63 65 64 75 72 65 20 | 74 6f 20 63 61 6c 6c 09 |ocedure |to call.|
|00005930| 09 20 20 20 20 20 20 20 | 2a 2f 0a 20 20 7d 20 63 |. |*/. } c|
|00005940| 6f 6d 54 61 62 5b 5d 20 | 3d 0a 20 20 20 20 7b 22 |omTab[] |=. {"|
|00005950| 63 22 2c 20 20 20 63 6f | 6d 6d 69 74 50 72 2c 0a |c", co|mmitPr,.|
|00005960| 20 20 20 20 20 22 72 6f | 22 2c 20 20 72 6f 6c 6c | "ro|", roll|
|00005970| 42 6b 50 72 2c 0a 20 20 | 20 20 20 22 72 75 22 2c |BkPr,. | "ru",|
|00005980| 20 20 73 65 74 52 65 45 | 78 65 63 50 72 2c 0a 20 | setReE|xecPr,. |
|00005990| 20 20 20 20 22 65 22 2c | 20 20 20 73 65 74 44 6f | "e",| setDo|
|000059a0| 6e 65 50 72 2c 0a 20 20 | 20 20 20 22 61 22 2c 20 |nePr,. | "a", |
|000059b0| 20 20 73 65 74 41 75 74 | 6f 50 72 2c 0a 20 20 20 | setAut|oPr,. |
|000059c0| 20 20 22 6d 22 2c 20 20 | 20 72 65 73 65 74 41 75 | "m", | resetAu|
|000059d0| 74 6f 50 72 2c 0a 20 20 | 20 20 20 22 68 22 2c 20 |toPr,. | "h", |
|000059e0| 20 20 68 65 6c 70 50 72 | 2c 0a 20 20 20 20 20 22 | helpPr|,. "|
|000059f0| 22 2c 20 20 20 30 7d 3b | 0a 20 0a 20 0a 70 72 6f |", 0};|. . .pro|
|00005a00| 63 43 6d 64 28 73 29 0a | 63 68 61 72 20 2a 73 3b |cCmd(s).|char *s;|
|00005a10| 0a 7b 0a 20 20 69 6e 74 | 20 69 3b 0a 20 20 69 6e |.{. int| i;. in|
|00005a20| 74 20 28 2a 70 72 6f 63 | 29 28 29 3b 0a 20 0a 20 |t (*proc|)();. . |
|00005a30| 20 69 66 20 28 73 74 72 | 6c 65 6e 28 73 29 20 3d | if (str|len(s) =|
|00005a40| 3d 20 30 29 20 72 65 74 | 75 72 6e 3b 0a 20 20 66 |= 0) ret|urn;. f|
|00005a50| 6f 72 20 28 69 20 3d 20 | 30 3b 20 63 6f 6d 54 61 |or (i = |0; comTa|
|00005a60| 62 5b 69 5d 2e 70 72 6f | 63 3b 20 69 2b 2b 29 0a |b[i].pro|c; i++).|
|00005a70| 20 20 20 20 69 66 20 28 | 69 73 50 72 66 78 28 63 | if (|isPrfx(c|
|00005a80| 6f 6d 54 61 62 5b 69 5d | 2e 63 6d 64 2c 73 29 29 |omTab[i]|.cmd,s))|
|00005a90| 0a 20 20 20 20 20 20 7b | 70 72 6f 63 20 3d 20 63 |. {|proc = c|
|00005aa0| 6f 6d 54 61 62 5b 69 5d | 2e 70 72 6f 63 3b 20 28 |omTab[i]|.proc; (|
|00005ab0| 2a 70 72 6f 63 29 28 29 | 3b 20 72 65 74 75 72 6e |*proc)()|; return|
|00005ac0| 3b 7d 0a 20 20 70 72 69 | 6e 74 66 28 22 5c 6e 55 |;}. pri|ntf("\nU|
|00005ad0| 6e 72 65 63 6f 67 6e 69 | 7a 65 64 20 43 6f 6d 6d |nrecogni|zed Comm|
|00005ae0| 61 6e 64 3a 20 25 73 5c | 6e 22 2c 20 73 29 3b 0a |and: %s\|n", s);.|
|00005af0| 7d 0a 20 0a 2f 2a 20 53 | 75 70 70 6f 72 74 20 50 |}. ./* S|upport P|
|00005b00| 72 6f 63 65 64 75 72 65 | 73 20 66 6f 72 20 74 68 |rocedure|s for th|
|00005b10| 65 20 70 73 65 75 64 6f | 20 63 6f 6d 6d 61 6e 64 |e pseudo| command|
|00005b20| 73 20 61 6e 64 20 70 63 | 20 70 72 6f 63 65 73 73 |s and pc| process|
|00005b30| 6f 72 20 2a 2f 0a 20 0a | 69 73 50 72 66 78 28 70 |or */. .|isPrfx(p|
|00005b40| 72 66 78 2c 20 73 29 0a | 63 68 61 72 20 2a 70 72 |rfx, s).|char *pr|
|00005b50| 66 78 2c 20 2a 73 3b 0a | 7b 0a 20 20 69 6e 74 20 |fx, *s;.|{. int |
|00005b60| 69 2c 20 6c 3b 0a 20 20 | 69 66 20 28 28 6c 3d 73 |i, l;. |if ((l=s|
|00005b70| 74 72 6c 65 6e 28 70 72 | 66 78 29 29 20 3d 3d 20 |trlen(pr|fx)) == |
|00005b80| 30 29 20 72 65 74 75 72 | 6e 28 46 41 4c 53 45 29 |0) retur|n(FALSE)|
|00005b90| 3b 0a 20 20 66 6f 72 20 | 28 69 20 3d 20 30 3b 20 |;. for |(i = 0; |
|00005ba0| 69 20 3c 20 6c 3b 20 69 | 2b 2b 29 0a 20 20 20 20 |i < l; i|++). |
|00005bb0| 7b 0a 20 20 20 20 69 66 | 20 28 20 74 6f 75 70 70 |{. if| ( toupp|
|00005bc0| 65 72 28 2a 70 72 66 78 | 29 20 21 3d 20 74 6f 75 |er(*prfx|) != tou|
|00005bd0| 70 70 65 72 28 2a 73 29 | 20 29 0a 20 20 20 20 20 |pper(*s)| ). |
|00005be0| 20 72 65 74 75 72 6e 28 | 46 41 4c 53 45 29 3b 0a | return(|FALSE);.|
|00005bf0| 20 20 20 20 70 72 66 78 | 2b 2b 3b 0a 20 20 20 20 | prfx|++;. |
|00005c00| 73 2b 2b 3b 0a 20 20 20 | 20 7d 0a 20 20 72 65 74 |s++;. | }. ret|
|00005c10| 75 72 6e 28 54 52 55 45 | 29 3b 0a 7d 0a 20 0a 72 |urn(TRUE|);.}. .r|
|00005c20| 6f 6c 6c 42 61 63 6b 57 | 6f 72 6b 28 29 0a 7b 0a |ollBackW|ork().{.|
|00005c30| 20 20 45 58 45 43 20 53 | 51 4c 20 52 4f 4c 4c 42 | EXEC S|QL ROLLB|
|00005c40| 41 43 4b 20 57 4f 52 4b | 3b 0a 7d 0a 20 0a 63 6f |ACK WORK|;.}. .co|
|00005c50| 6d 6d 69 74 57 6f 72 6b | 28 29 0a 7b 0a 20 20 45 |mmitWork|().{. E|
|00005c60| 58 45 43 20 53 51 4c 20 | 43 4f 4d 4d 49 54 20 57 |XEC SQL |COMMIT W|
|00005c70| 4f 52 4b 3b 0a 7d 0a 20 | 0a 20 0a 2f 2a 20 4d 69 |ORK;.}. |. ./* Mi|
|00005c80| 73 63 2e 20 53 75 70 70 | 6f 72 74 20 72 6f 75 74 |sc. Supp|ort rout|
|00005c90| 69 6e 65 73 09 09 09 09 | 20 20 20 20 20 20 20 2a |ines....| *|
|00005ca0| 2f 0a 20 0a 72 65 70 74 | 45 72 72 6f 72 28 29 0a |/. .rept|Error().|
|00005cb0| 7b 0a 20 20 70 72 69 6e | 74 66 28 22 25 2e 37 30 |{. prin|tf("%.70|
|00005cc0| 73 5c 6e 22 2c 20 73 71 | 6c 63 61 2e 73 71 6c 65 |s\n", sq|lca.sqle|
|00005cd0| 72 72 6d 2e 73 71 6c 65 | 72 72 6d 63 29 3b 0a 7d |rrm.sqle|rrmc);.}|
|00005ce0| 0a 0a 69 6e 74 20 6d 69 | 6e 28 61 2c 62 29 0a 69 |..int mi|n(a,b).i|
|00005cf0| 6e 74 20 61 3b 0a 69 6e | 74 20 62 3b 0a 7b 0a 20 |nt a;.in|t b;.{. |
|00005d00| 20 20 69 66 20 28 61 20 | 3c 3d 20 62 29 0a 20 20 | if (a |<= b). |
|00005d10| 20 20 20 20 20 72 65 74 | 75 72 6e 28 61 29 3b 0a | ret|urn(a);.|
|00005d20| 20 20 20 65 6c 73 65 20 | 72 65 74 75 72 6e 28 62 | else |return(b|
|00005d30| 29 20 3b 0a 7d 0a 30 37 | 30 37 30 37 30 30 30 34 |) ;.}.07|07070004|
|00005d40| 35 30 30 31 31 33 30 30 | 31 30 30 36 34 34 30 30 |50011300|10064400|
|00005d50| 30 33 31 31 30 30 30 30 | 36 32 30 30 30 30 30 31 |03110000|62000001|
|00005d60| 30 30 30 30 30 30 30 34 | 37 36 34 35 37 35 36 33 |00000004|76457563|
|00005d70| 34 30 30 30 30 31 36 30 | 30 30 30 30 30 32 33 34 |40000160|00000234|
|00005d80| 35 34 64 65 6d 6f 2f 73 | 61 6d 70 6c 65 2e 63 00 |54demo/s|ample.c.|
|00005d90| 23 69 66 64 65 66 20 52 | 43 53 49 44 0a 73 74 61 |#ifdef R|CSID.sta|
|00005da0| 74 69 63 20 63 68 61 72 | 20 2a 52 43 53 69 64 20 |tic char| *RCSid |
|00005db0| 3d 20 0a 20 20 20 22 24 | 48 65 61 64 65 72 3a 20 |= . "$|Header: |
|00005dc0| 73 61 6d 70 6c 65 2e 63 | 2c 76 20 36 2e 32 20 38 |sample.c|,v 6.2 8|
|00005dd0| 39 2f 30 35 2f 32 35 20 | 31 33 3a 30 33 3a 34 30 |9/05/25 |13:03:40|
|00005de0| 20 6b 73 72 69 6e 69 76 | 61 20 45 78 70 20 24 20 | ksriniv|a Exp $ |
|00005df0| 73 61 6d 70 6c 65 2e 63 | 20 43 6f 70 79 72 20 28 |sample.c| Copyr (|
|00005e00| 63 29 20 31 39 38 36 20 | 4f 72 61 63 6c 65 22 3b |c) 1986 |Oracle";|
|00005e10| 0a 23 65 6e 64 69 66 20 | 2f 2a 20 52 43 53 49 44 |.#endif |/* RCSID|
|00005e20| 20 2a 2f 0a 0a 2f 2a 0a | 2a 2a 0a 2a 2a 20 73 61 | */../*.|**.** sa|
|00005e30| 6d 70 6c 65 20 20 69 73 | 20 61 20 73 69 6d 70 6c |mple is| a simpl|
|00005e40| 65 20 65 78 61 6d 70 6c | 65 20 70 72 6f 67 72 61 |e exampl|e progra|
|00005e50| 6d 20 77 68 69 63 68 20 | 61 64 64 73 20 6e 65 77 |m which |adds new|
|00005e60| 20 65 6d 70 6c 6f 79 65 | 65 0a 2a 2a 09 20 20 20 | employe|e.**. |
|00005e70| 72 65 63 6f 72 64 73 20 | 20 74 6f 20 74 68 65 20 |records | to the |
|00005e80| 20 70 65 72 73 6f 6e 6e | 65 6c 20 20 64 61 74 61 | personn|el data|
|00005e90| 20 62 61 73 65 2e 20 20 | 43 68 65 63 6b 69 6e 67 | base. |Checking|
|00005ea0| 20 69 73 0a 2a 2a 09 20 | 20 20 64 6f 6e 65 20 74 | is.**. | done t|
|00005eb0| 6f 20 69 6e 73 75 72 65 | 20 74 68 65 20 69 6e 74 |o insure| the int|
|00005ec0| 65 67 72 69 74 79 20 6f | 66 20 74 68 65 20 64 61 |egrity o|f the da|
|00005ed0| 74 61 20 62 61 73 65 2e | 20 20 54 68 65 0a 2a 2a |ta base.| The.**|
|00005ee0| 09 20 20 20 65 6d 70 6c | 6f 79 65 65 20 6e 75 6d |. empl|oyee num|
|00005ef0| 62 65 72 73 20 20 61 72 | 65 20 61 75 74 6f 6d 61 |bers ar|e automa|
|00005f00| 74 69 63 61 6c 6c 79 09 | 73 65 6c 65 63 74 65 64 |tically.|selected|
|00005f10| 20 75 73 69 6e 67 0a 2a | 2a 09 20 20 20 74 68 65 | using.*|*. the|
|00005f20| 09 63 75 72 72 65 6e 74 | 20 6d 61 78 69 6d 75 6d |.current| maximum|
|00005f30| 20 20 65 6d 70 6c 6f 79 | 65 65 20 6e 75 6d 62 65 | employ|ee numbe|
|00005f40| 72 20 61 73 20 74 68 65 | 20 73 74 61 72 74 2e 0a |r as the| start..|
|00005f50| 2a 2a 09 20 20 20 49 66 | 20 20 61 6e 79 20 20 65 |**. If| any e|
|00005f60| 6d 70 6c 6f 79 65 65 20 | 20 6e 75 6d 62 65 72 20 |mployee | number |
|00005f70| 20 69 73 20 20 61 20 20 | 64 75 70 6c 69 63 61 74 | is a |duplicat|
|00005f80| 65 2c 20 20 69 74 20 69 | 73 0a 2a 2a 09 20 20 20 |e, it i|s.**. |
|00005f90| 73 6b 69 70 70 65 64 2e | 20 20 54 68 65 20 20 70 |skipped.| The p|
|00005fa0| 72 6f 67 72 61 6d 20 71 | 75 65 72 69 65 73 20 74 |rogram q|ueries t|
|00005fb0| 68 65 20 75 73 65 72 20 | 66 6f 72 20 64 61 74 61 |he user |for data|
|00005fc0| 20 61 73 0a 2a 2a 09 20 | 20 20 66 6f 6c 6c 6f 77 | as.**. | follow|
|00005fd0| 73 3a 0a 2a 2a 09 20 20 | 20 20 20 20 20 45 6e 74 |s:.**. | Ent|
|00005fe0| 65 72 20 65 6d 70 6c 6f | 79 65 65 20 6e 61 6d 65 |er emplo|yee name|
|00005ff0| 3a 0a 2a 2a 09 20 20 20 | 20 20 20 20 45 6e 74 65 |:.**. | Ente|
|00006000| 72 20 65 6d 70 6c 6f 79 | 65 65 20 6a 6f 62 3a 0a |r employ|ee job:.|
|00006010| 2a 2a 09 20 20 20 20 20 | 20 20 45 6e 74 65 72 20 |**. | Enter |
|00006020| 65 6d 70 6c 6f 79 65 65 | 20 73 61 6c 61 72 79 3a |employee| salary:|
|00006030| 0a 2a 2a 09 20 20 20 20 | 20 20 20 45 6e 74 65 72 |.**. | Enter|
|00006040| 20 65 6d 70 6c 6f 79 65 | 65 20 64 65 70 74 3a 0a | employe|e dept:.|
|00006050| 2a 2a 0a 2a 2a 09 20 20 | 20 54 68 65 20 70 72 6f |**.**. | The pro|
|00006060| 67 72 61 6d 20 74 65 72 | 6d 69 6e 61 74 65 73 20 |gram ter|minates |
|00006070| 69 66 20 45 4f 46 20 28 | 65 6e 64 20 6f 66 20 66 |if EOF (|end of f|
|00006080| 69 6c 65 29 20 6f 72 20 | 61 20 6e 75 6c 6c 0a 2a |ile) or |a null.*|
|00006090| 2a 09 20 20 20 73 74 72 | 69 6e 67 20 28 3c 72 65 |*. str|ing (<re|
|000060a0| 74 75 72 6e 3e 20 6b 65 | 79 29 20 69 73 20 65 6e |turn> ke|y) is en|
|000060b0| 74 65 72 65 64 20 77 68 | 65 6e 20 74 68 65 20 65 |tered wh|en the e|
|000060c0| 6d 70 6c 6f 79 65 65 20 | 6e 61 6d 65 0a 2a 2a 09 |mployee |name.**.|
|000060d0| 20 20 20 69 73 20 72 65 | 71 75 65 73 74 65 64 2e | is re|quested.|
|000060e0| 0a 2a 2a 0a 2a 2a 09 20 | 20 20 49 66 20 61 20 72 |.**.**. | If a r|
|000060f0| 65 63 6f 72 64 20 69 73 | 20 73 75 63 63 65 73 73 |ecord is| success|
|00006100| 66 75 6c 6c 79 20 69 6e | 73 65 72 74 65 64 2c 20 |fully in|serted, |
|00006110| 74 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 0a 2a 2a |the foll|owing.**|
|00006120| 09 20 20 20 69 73 20 70 | 72 69 6e 74 65 64 3a 0a |. is p|rinted:.|
|00006130| 2a 2a 0a 2a 2a 09 20 20 | 20 65 6e 61 6d 65 20 61 |**.**. | ename a|
|00006140| 64 64 65 64 20 74 6f 20 | 64 65 70 61 72 74 6d 65 |dded to |departme|
|00006150| 6e 74 20 64 6e 61 6d 65 | 20 61 73 20 65 6d 70 6c |nt dname| as empl|
|00006160| 6f 79 65 65 20 23 20 6e | 6e 6e 6e 6e 6e 0a 2a 2a |oyee # n|nnnnn.**|
|00006170| 0a 2a 2a 09 20 20 20 54 | 68 65 20 6e 65 77 20 65 |.**. T|he new e|
|00006180| 6d 70 6c 6f 79 65 65 20 | 6e 75 6d 62 65 72 20 69 |mployee |number i|
|00006190| 73 20 31 30 20 6d 6f 72 | 65 20 74 68 61 6e 20 74 |s 10 mor|e than t|
|000061a0| 68 65 20 68 69 67 68 65 | 73 74 0a 2a 2a 09 20 20 |he highe|st.**. |
|000061b0| 20 70 72 65 76 69 6f 75 | 73 20 65 6d 70 6c 6f 79 | previou|s employ|
|000061c0| 65 65 20 6e 75 6d 62 65 | 72 2e 0a 2a 2a 0a 2a 2a |ee numbe|r..**.**|
|000061d0| 20 55 4e 49 58 20 43 4f | 4d 50 49 4c 49 4e 47 2f | UNIX CO|MPILING/|
|000061e0| 4c 49 4e 4b 49 4e 47 20 | 49 4e 53 54 52 55 43 54 |LINKING |INSTRUCT|
|000061f0| 49 4f 4e 53 3a 0a 2a 2a | 20 20 20 20 20 20 20 20 |IONS:.**| |
|00006200| 20 24 20 6d 61 6b 65 20 | 2d 66 20 70 72 6f 63 2e | $ make |-f proc.|
|00006210| 6d 6b 20 73 61 6d 70 6c | 65 0a 2a 2f 0a 0a 23 69 |mk sampl|e.*/..#i|
|00006220| 6e 63 6c 75 64 65 20 3c | 73 74 64 69 6f 2e 68 3e |nclude <|stdio.h>|
|00006230| 0a 23 69 6e 63 6c 75 64 | 65 20 3c 63 74 79 70 65 |.#includ|e <ctype|
|00006240| 2e 68 3e 0a 2f 2a 0a 2a | 2a 20 44 45 46 49 4e 45 |.h>./*.*|* DEFINE|
|00006250| 20 54 48 45 20 63 20 56 | 45 52 53 49 4f 4e 20 4f | THE c V|ERSION O|
|00006260| 46 20 54 48 45 20 43 55 | 52 53 4f 52 20 28 46 4f |F THE CU|RSOR (FO|
|00006270| 52 20 33 32 20 42 49 54 | 20 4d 41 43 48 49 4e 45 |R 32 BIT| MACHINE|
|00006280| 53 29 0a 2a 2f 0a 73 74 | 72 75 63 74 20 63 73 72 |S).*/.st|ruct csr|
|00006290| 64 65 66 0a 7b 0a 20 20 | 20 73 68 6f 72 74 09 20 |def.{. | short. |
|000062a0| 20 63 73 72 72 63 3b 09 | 09 09 09 20 20 2f 2a 20 | csrrc;.|... /* |
|000062b0| 72 65 74 75 72 6e 20 63 | 6f 64 65 20 2a 2f 0a 20 |return c|ode */. |
|000062c0| 20 20 73 68 6f 72 74 09 | 20 20 63 73 72 66 74 3b | short.| csrft;|
|000062d0| 09 09 09 09 2f 2a 20 66 | 75 6e 63 74 69 6f 6e 20 |..../* f|unction |
|000062e0| 74 79 70 65 20 2a 2f 0a | 20 20 20 75 6e 73 69 67 |type */.| unsig|
|000062f0| 6e 65 64 20 6c 6f 6e 67 | 20 20 63 73 72 72 70 63 |ned long| csrrpc|
|00006300| 3b 09 09 09 20 2f 2a 20 | 72 6f 77 73 20 70 72 6f |;... /* |rows pro|
|00006310| 63 65 73 73 65 64 20 63 | 6f 75 6e 74 20 2a 2f 0a |cessed c|ount */.|
|00006320| 20 20 20 73 68 6f 72 74 | 09 20 20 63 73 72 70 65 | short|. csrpe|
|00006330| 6f 3b 09 09 09 20 20 20 | 2f 2a 20 70 61 72 73 65 |o;... |/* parse|
|00006340| 20 65 72 72 6f 72 20 6f | 66 66 73 65 74 20 2a 2f | error o|ffset */|
|00006350| 0a 20 20 20 75 6e 73 69 | 67 6e 65 64 20 63 68 61 |. unsi|gned cha|
|00006360| 72 20 20 63 73 72 66 63 | 3b 09 09 09 09 2f 2a 20 |r csrfc|;..../* |
|00006370| 66 75 6e 63 74 69 6f 6e | 20 63 6f 64 65 20 2a 2f |function| code */|
|00006380| 0a 20 20 20 75 6e 73 69 | 67 6e 65 64 20 63 68 61 |. unsi|gned cha|
|00006390| 72 20 20 63 73 72 66 69 | 6c 3b 09 09 09 09 20 20 |r csrfi|l;.... |
|000063a0| 20 20 20 20 2f 2a 20 66 | 69 6c 6c 65 72 20 20 2a | /* f|iller *|
|000063b0| 2f 0a 20 20 20 75 6e 73 | 69 67 6e 65 64 20 73 68 |/. uns|igned sh|
|000063c0| 6f 72 74 20 63 73 72 61 | 72 63 3b 09 09 09 20 20 |ort csra|rc;... |
|000063d0| 20 20 2f 2a 20 72 65 73 | 65 72 76 65 64 2c 20 70 | /* res|erved, p|
|000063e0| 72 69 76 61 74 65 20 2a | 2f 0a 20 20 20 75 6e 73 |rivate *|/. uns|
|000063f0| 69 67 6e 65 64 20 63 68 | 61 72 20 20 63 73 72 77 |igned ch|ar csrw|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.