home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume30 / oraperl-v2 / part03 < prev    next >
SHell self-extracting ARchive  |  1992-07-06  |  63.8 KB

view JSON data     |     view as text     |     open on a Mac     |     open on a PC

This file was processed as: SHell self-extracting ARchive (archive/shar).

You can browse this item here: part03

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert SHell self-extracting ARchive (archive/shar) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file ASCII text default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/329 Shell Archive Format default
100% detectItEasy Format: plain text[LF] default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 4e 65 77 73 67 72 6f 75 | 70 73 3a 20 63 6f 6d 70 |Newsgrou|ps: comp|
|00000010| 2e 73 6f 75 72 63 65 73 | 2e 6d 69 73 63 0a 46 72 |.sources|.misc.Fr|
|00000020| 6f 6d 3a 20 4b 65 76 69 | 6e 20 53 74 6f 63 6b 20 |om: Kevi|n Stock |
|00000030| 3c 6b 73 74 6f 63 6b 40 | 65 6e 63 6f 72 65 2e 63 |<kstock@|encore.c|
|00000040| 6f 6d 3e 0a 53 75 62 6a | 65 63 74 3a 20 20 76 33 |om>.Subj|ect: v3|
|00000050| 30 69 30 38 39 3a 20 20 | 6f 72 61 70 65 72 6c 2d |0i089: |oraperl-|
|00000060| 76 32 20 2d 20 45 78 74 | 65 6e 73 69 6f 6e 73 20 |v2 - Ext|ensions |
|00000070| 74 6f 20 50 65 72 6c 20 | 74 6f 20 61 63 63 65 73 |to Perl |to acces|
|00000080| 73 20 4f 72 61 63 6c 65 | 20 64 61 74 61 62 61 73 |s Oracle| databas|
|00000090| 65 2c 20 50 61 72 74 30 | 33 2f 30 35 0a 4d 65 73 |e, Part0|3/05.Mes|
|000000a0| 73 61 67 65 2d 49 44 3a | 20 3c 31 39 39 32 4a 75 |sage-ID:| <1992Ju|
|000000b0| 6e 32 39 2e 31 38 34 30 | 34 34 2e 31 31 31 37 39 |n29.1840|44.11179|
|000000c0| 40 73 70 61 72 6b 79 2e | 69 6d 64 2e 73 74 65 72 |@sparky.|imd.ster|
|000000d0| 6c 69 6e 67 2e 63 6f 6d | 3e 0a 58 2d 4d 64 34 2d |ling.com|>.X-Md4-|
|000000e0| 53 69 67 6e 61 74 75 72 | 65 3a 20 63 64 63 33 64 |Signatur|e: cdc3d|
|000000f0| 62 36 30 36 32 37 33 38 | 65 38 33 66 35 65 63 64 |b6062738|e83f5ecd|
|00000100| 61 66 32 31 64 64 31 35 | 65 34 64 0a 44 61 74 65 |af21dd15|e4d.Date|
|00000110| 3a 20 4d 6f 6e 2c 20 32 | 39 20 4a 75 6e 20 31 39 |: Mon, 2|9 Jun 19|
|00000120| 39 32 20 31 38 3a 34 30 | 3a 34 34 20 47 4d 54 0a |92 18:40|:44 GMT.|
|00000130| 41 70 70 72 6f 76 65 64 | 3a 20 6b 65 6e 74 40 73 |Approved|: kent@s|
|00000140| 70 61 72 6b 79 2e 69 6d | 64 2e 73 74 65 72 6c 69 |parky.im|d.sterli|
|00000150| 6e 67 2e 63 6f 6d 0a 0a | 53 75 62 6d 69 74 74 65 |ng.com..|Submitte|
|00000160| 64 2d 62 79 3a 20 4b 65 | 76 69 6e 20 53 74 6f 63 |d-by: Ke|vin Stoc|
|00000170| 6b 20 3c 6b 73 74 6f 63 | 6b 40 65 6e 63 6f 72 65 |k <kstoc|k@encore|
|00000180| 2e 63 6f 6d 3e 0a 50 6f | 73 74 69 6e 67 2d 6e 75 |.com>.Po|sting-nu|
|00000190| 6d 62 65 72 3a 20 56 6f | 6c 75 6d 65 20 33 30 2c |mber: Vo|lume 30,|
|000001a0| 20 49 73 73 75 65 20 38 | 39 0a 41 72 63 68 69 76 | Issue 8|9.Archiv|
|000001b0| 65 2d 6e 61 6d 65 3a 20 | 6f 72 61 70 65 72 6c 2d |e-name: |oraperl-|
|000001c0| 76 32 2f 70 61 72 74 30 | 33 0a 45 6e 76 69 72 6f |v2/part0|3.Enviro|
|000001d0| 6e 6d 65 6e 74 3a 20 50 | 65 72 6c 2c 20 4f 72 61 |nment: P|erl, Ora|
|000001e0| 63 6c 65 20 77 69 74 68 | 20 4f 43 49 2c 20 6f 70 |cle with| OCI, op|
|000001f0| 74 69 6f 6e 61 6c 6c 79 | 20 43 75 72 73 65 73 0a |tionally| Curses.|
|00000200| 53 75 70 65 72 73 65 64 | 65 73 3a 20 6f 72 61 70 |Supersed|es: orap|
|00000210| 65 72 6c 3a 20 56 6f 6c | 75 6d 65 20 31 38 2c 20 |erl: Vol|ume 18, |
|00000220| 49 73 73 75 65 20 31 30 | 0a 0a 23 21 20 2f 62 69 |Issue 10|..#! /bi|
|00000230| 6e 2f 73 68 0a 23 20 54 | 68 69 73 20 69 73 20 61 |n/sh.# T|his is a|
|00000240| 20 73 68 65 6c 6c 20 61 | 72 63 68 69 76 65 2e 20 | shell a|rchive. |
|00000250| 20 52 65 6d 6f 76 65 20 | 61 6e 79 74 68 69 6e 67 | Remove |anything|
|00000260| 20 62 65 66 6f 72 65 20 | 74 68 69 73 20 6c 69 6e | before |this lin|
|00000270| 65 2c 20 74 68 65 6e 20 | 66 65 65 64 20 69 74 0a |e, then |feed it.|
|00000280| 23 20 69 6e 74 6f 20 61 | 20 73 68 65 6c 6c 20 76 |# into a| shell v|
|00000290| 69 61 20 22 73 68 20 66 | 69 6c 65 22 20 6f 72 20 |ia "sh f|ile" or |
|000002a0| 73 69 6d 69 6c 61 72 2e | 20 20 54 6f 20 6f 76 65 |similar.| To ove|
|000002b0| 72 77 72 69 74 65 20 65 | 78 69 73 74 69 6e 67 20 |rwrite e|xisting |
|000002c0| 66 69 6c 65 73 2c 0a 23 | 20 74 79 70 65 20 22 73 |files,.#| type "s|
|000002d0| 68 20 66 69 6c 65 20 2d | 63 22 2e 0a 23 20 54 68 |h file -|c"..# Th|
|000002e0| 65 20 74 6f 6f 6c 20 74 | 68 61 74 20 67 65 6e 65 |e tool t|hat gene|
|000002f0| 72 61 74 65 64 20 74 68 | 69 73 20 61 70 70 65 61 |rated th|is appea|
|00000300| 72 65 64 20 69 6e 20 74 | 68 65 20 63 6f 6d 70 2e |red in t|he comp.|
|00000310| 73 6f 75 72 63 65 73 2e | 75 6e 69 78 20 6e 65 77 |sources.|unix new|
|00000320| 73 67 72 6f 75 70 3b 0a | 23 20 73 65 6e 64 20 6d |sgroup;.|# send m|
|00000330| 61 69 6c 20 74 6f 20 63 | 6f 6d 70 2d 73 6f 75 72 |ail to c|omp-sour|
|00000340| 63 65 73 2d 75 6e 69 78 | 40 75 75 6e 65 74 2e 75 |ces-unix|@uunet.u|
|00000350| 75 2e 6e 65 74 20 69 66 | 20 79 6f 75 20 77 61 6e |u.net if| you wan|
|00000360| 74 20 74 68 61 74 20 74 | 6f 6f 6c 2e 0a 23 20 43 |t that t|ool..# C|
|00000370| 6f 6e 74 65 6e 74 73 3a | 20 20 64 62 75 67 2f 64 |ontents:| dbug/d|
|00000380| 62 75 67 2e 68 20 64 6f | 63 2f 6f 72 61 70 65 72 |bug.h do|c/oraper|
|00000390| 6c 2e 31 20 65 78 61 6d | 70 6c 65 73 2f 74 61 62 |l.1 exam|ples/tab|
|000003a0| 69 6e 66 6f 2e 70 6c 20 | 67 65 74 63 75 72 73 6f |info.pl |getcurso|
|000003b0| 72 2e 63 0a 23 20 20 20 | 6f 72 61 66 6e 73 2e 63 |r.c.# |orafns.c|
|000003c0| 0a 23 20 57 72 61 70 70 | 65 64 20 62 79 20 6b 65 |.# Wrapp|ed by ke|
|000003d0| 6e 74 40 73 70 61 72 6b | 79 20 6f 6e 20 4d 6f 6e |nt@spark|y on Mon|
|000003e0| 20 4a 75 6e 20 32 39 20 | 31 33 3a 32 33 3a 33 37 | Jun 29 |13:23:37|
|000003f0| 20 31 39 39 32 0a 50 41 | 54 48 3d 2f 62 69 6e 3a | 1992.PA|TH=/bin:|
|00000400| 2f 75 73 72 2f 62 69 6e | 3a 2f 75 73 72 2f 75 63 |/usr/bin|:/usr/uc|
|00000410| 62 20 3b 20 65 78 70 6f | 72 74 20 50 41 54 48 0a |b ; expo|rt PATH.|
|00000420| 65 63 68 6f 20 49 66 20 | 74 68 69 73 20 61 72 63 |echo If |this arc|
|00000430| 68 69 76 65 20 69 73 20 | 63 6f 6d 70 6c 65 74 65 |hive is |complete|
|00000440| 2c 20 79 6f 75 20 77 69 | 6c 6c 20 73 65 65 20 74 |, you wi|ll see t|
|00000450| 68 65 20 66 6f 6c 6c 6f | 77 69 6e 67 20 6d 65 73 |he follo|wing mes|
|00000460| 73 61 67 65 3a 0a 65 63 | 68 6f 20 27 20 20 20 20 |sage:.ec|ho ' |
|00000470| 20 20 20 20 20 20 22 73 | 68 61 72 3a 20 45 6e 64 | "s|har: End|
|00000480| 20 6f 66 20 61 72 63 68 | 69 76 65 20 33 20 28 6f | of arch|ive 3 (o|
|00000490| 66 20 35 29 2e 22 27 0a | 69 66 20 74 65 73 74 20 |f 5)."'.|if test |
|000004a0| 2d 66 20 27 64 62 75 67 | 2f 64 62 75 67 2e 68 27 |-f 'dbug|/dbug.h'|
|000004b0| 20 2d 61 20 22 24 7b 31 | 7d 22 20 21 3d 20 22 2d | -a "${1|}" != "-|
|000004c0| 63 22 20 3b 20 74 68 65 | 6e 20 0a 20 20 65 63 68 |c" ; the|n . ech|
|000004d0| 6f 20 73 68 61 72 3a 20 | 57 69 6c 6c 20 6e 6f 74 |o shar: |Will not|
|000004e0| 20 63 6c 6f 62 62 65 72 | 20 65 78 69 73 74 69 6e | clobber| existin|
|000004f0| 67 20 66 69 6c 65 20 5c | 22 27 64 62 75 67 2f 64 |g file \|"'dbug/d|
|00000500| 62 75 67 2e 68 27 5c 22 | 0a 65 6c 73 65 0a 20 20 |bug.h'\"|.else. |
|00000510| 65 63 68 6f 20 73 68 61 | 72 3a 20 45 78 74 72 61 |echo sha|r: Extra|
|00000520| 63 74 69 6e 67 20 5c 22 | 27 64 62 75 67 2f 64 62 |cting \"|'dbug/db|
|00000530| 75 67 2e 68 27 5c 22 20 | 5c 28 36 32 35 39 20 63 |ug.h'\" |\(6259 c|
|00000540| 68 61 72 61 63 74 65 72 | 73 5c 29 0a 20 20 73 65 |haracter|s\). se|
|00000550| 64 20 22 73 2f 5e 58 2f | 2f 22 20 3e 27 64 62 75 |d "s/^X/|/" >'dbu|
|00000560| 67 2f 64 62 75 67 2e 68 | 27 20 3c 3c 27 45 4e 44 |g/dbug.h|' <<'END|
|00000570| 5f 4f 46 5f 46 49 4c 45 | 27 0a 58 2f 2a 2a 2a 2a |_OF_FILE|'.X/****|
|00000580| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000590| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000005a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000005b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000005c0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 0a 58 20 2a 09 09 |********|**.X *..|
|000005d0| 09 09 09 09 09 09 09 20 | 20 20 20 20 20 2a 0a 58 |....... | *.X|
|000005e0| 20 2a 09 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | *. | |
|000005f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 4e 20 | | N |
|00000600| 4f 20 54 20 49 20 43 20 | 45 09 09 09 09 20 20 20 |O T I C |E.... |
|00000610| 20 20 20 2a 0a 58 20 2a | 09 09 09 09 09 09 09 09 | *.X *|........|
|00000620| 09 20 20 20 20 20 20 2a | 0a 58 20 2a 09 20 20 20 |. *|.X *. |
|00000630| 20 20 20 20 20 20 20 20 | 20 20 20 43 6f 70 79 72 | | Copyr|
|00000640| 69 67 68 74 20 41 62 61 | 6e 64 6f 6e 65 64 2c 20 |ight Aba|ndoned, |
|00000650| 31 39 38 37 2c 20 46 72 | 65 64 20 46 69 73 68 09 |1987, Fr|ed Fish.|
|00000660| 09 20 20 20 20 20 20 2a | 0a 58 20 2a 09 09 09 09 |. *|.X *....|
|00000670| 09 09 09 09 09 20 20 20 | 20 20 20 2a 0a 58 20 2a |..... | *.X *|
|00000680| 09 09 09 09 09 09 09 09 | 09 20 20 20 20 20 20 2a |........|. *|
|00000690| 0a 58 20 2a 09 54 68 69 | 73 20 70 72 65 76 69 6f |.X *.Thi|s previo|
|000006a0| 75 73 6c 79 20 63 6f 70 | 79 72 69 67 68 74 65 64 |usly cop|yrighted|
|000006b0| 20 77 6f 72 6b 20 68 61 | 73 20 62 65 65 6e 20 70 | work ha|s been p|
|000006c0| 6c 61 63 65 64 20 69 6e | 74 6f 20 74 68 65 20 20 |laced in|to the |
|000006d0| 70 75 62 6c 69 63 20 20 | 20 20 20 2a 0a 58 20 2a |public | *.X *|
|000006e0| 09 64 6f 6d 61 69 6e 20 | 20 62 79 20 20 74 68 65 |.domain | by the|
|000006f0| 20 20 61 75 74 68 6f 72 | 20 20 61 6e 64 20 20 6d | author| and m|
|00000700| 61 79 20 62 65 20 66 72 | 65 65 6c 79 20 75 73 65 |ay be fr|eely use|
|00000710| 64 20 66 6f 72 20 61 6e | 79 20 70 75 72 70 6f 73 |d for an|y purpos|
|00000720| 65 2c 20 20 20 20 20 2a | 0a 58 20 2a 09 70 72 69 |e, *|.X *.pri|
|00000730| 76 61 74 65 20 6f 72 20 | 63 6f 6d 6d 65 72 63 69 |vate or |commerci|
|00000740| 61 6c 2e 09 09 09 09 09 | 09 20 20 20 20 20 20 2a |al......|. *|
|00000750| 0a 58 20 2a 09 09 09 09 | 09 09 09 09 09 20 20 20 |.X *....|..... |
|00000760| 20 20 20 2a 0a 58 20 2a | 09 42 65 63 61 75 73 65 | *.X *|.Because|
|00000770| 20 6f 66 20 74 68 65 20 | 6e 75 6d 62 65 72 20 6f | of the |number o|
|00000780| 66 20 69 6e 71 75 69 72 | 69 65 73 20 49 20 77 61 |f inquir|ies I wa|
|00000790| 73 20 72 65 63 65 69 76 | 69 6e 67 20 61 62 6f 75 |s receiv|ing abou|
|000007a0| 74 20 74 68 65 20 20 75 | 73 65 20 20 20 20 20 2a |t the u|se *|
|000007b0| 0a 58 20 2a 09 6f 66 20 | 74 68 69 73 20 70 72 6f |.X *.of |this pro|
|000007c0| 64 75 63 74 20 69 6e 20 | 63 6f 6d 6d 65 72 63 69 |duct in |commerci|
|000007d0| 61 6c 6c 79 20 64 65 76 | 65 6c 6f 70 65 64 20 77 |ally dev|eloped w|
|000007e0| 6f 72 6b 73 20 49 20 68 | 61 76 65 20 64 65 63 69 |orks I h|ave deci|
|000007f0| 64 65 64 20 74 6f 20 20 | 20 20 20 2a 0a 58 20 2a |ded to | *.X *|
|00000800| 09 73 69 6d 70 6c 79 20 | 6d 61 6b 65 20 69 74 20 |.simply |make it |
|00000810| 70 75 62 6c 69 63 20 64 | 6f 6d 61 69 6e 20 74 6f |public d|omain to|
|00000820| 20 66 75 72 74 68 65 72 | 20 69 74 73 20 75 6e 72 | further| its unr|
|00000830| 65 73 74 72 69 63 74 65 | 64 20 75 73 65 2e 20 20 |estricte|d use. |
|00000840| 20 49 20 20 20 20 20 2a | 0a 58 20 2a 09 73 70 65 | I *|.X *.spe|
|00000850| 63 69 66 69 63 61 6c 6c | 79 20 20 77 6f 75 6c 64 |cificall|y would|
|00000860| 20 20 62 65 20 20 6d 6f | 73 74 20 68 61 70 70 79 | be mo|st happy|
|00000870| 20 74 6f 20 73 65 65 20 | 74 68 69 73 20 6d 61 74 | to see |this mat|
|00000880| 65 72 69 61 6c 20 62 65 | 63 6f 6d 65 20 61 20 20 |erial be|come a |
|00000890| 20 20 20 2a 0a 58 20 2a | 09 70 61 72 74 20 6f 66 | *.X *|.part of|
|000008a0| 20 74 68 65 20 73 74 61 | 6e 64 61 72 64 20 55 6e | the sta|ndard Un|
|000008b0| 69 78 20 64 69 73 74 72 | 69 62 75 74 69 6f 6e 73 |ix distr|ibutions|
|000008c0| 20 62 79 20 41 54 26 54 | 20 61 6e 64 20 74 68 65 | by AT&T| and the|
|000008d0| 20 20 42 65 72 6b 65 6c | 65 79 20 20 20 20 20 2a | Berkel|ey *|
|000008e0| 0a 58 20 2a 09 43 6f 6d | 70 75 74 65 72 20 20 53 |.X *.Com|puter S|
|000008f0| 63 69 65 6e 63 65 20 20 | 52 65 73 65 61 72 63 68 |cience |Research|
|00000900| 20 47 72 6f 75 70 2c 20 | 61 6e 64 20 61 20 73 74 | Group, |and a st|
|00000910| 61 6e 64 61 72 64 20 70 | 61 72 74 20 6f 66 20 74 |andard p|art of t|
|00000920| 68 65 20 47 4e 55 20 20 | 20 20 20 2a 0a 58 20 2a |he GNU | *.X *|
|00000930| 09 73 79 73 74 65 6d 20 | 66 72 6f 6d 20 74 68 65 |.system |from the|
|00000940| 20 46 72 65 65 20 53 6f | 66 74 77 61 72 65 20 46 | Free So|ftware F|
|00000950| 6f 75 6e 64 61 74 69 6f | 6e 2e 09 09 09 20 20 20 |oundatio|n.... |
|00000960| 20 20 20 2a 0a 58 20 2a | 09 09 09 09 09 09 09 09 | *.X *|........|
|00000970| 09 20 20 20 20 20 20 2a | 0a 58 20 2a 09 49 20 77 |. *|.X *.I w|
|00000980| 6f 75 6c 64 20 61 70 70 | 72 65 63 69 61 74 65 20 |ould app|reciate |
|00000990| 69 74 2c 20 61 73 20 61 | 20 63 6f 75 72 74 65 73 |it, as a| courtes|
|000009a0| 79 2c 20 69 66 20 74 68 | 69 73 20 6e 6f 74 69 63 |y, if th|is notic|
|000009b0| 65 20 69 73 20 20 6c 65 | 66 74 20 20 69 6e 20 20 |e is le|ft in |
|000009c0| 20 20 20 2a 0a 58 20 2a | 09 61 6c 6c 20 63 6f 70 | *.X *|.all cop|
|000009d0| 69 65 73 20 61 6e 64 20 | 64 65 72 69 76 61 74 69 |ies and |derivati|
|000009e0| 76 65 20 77 6f 72 6b 73 | 2e 20 20 54 68 61 6e 6b |ve works|. Thank|
|000009f0| 20 79 6f 75 2e 09 09 09 | 20 20 20 20 20 20 2a 0a | you....| *.|
|00000a00| 58 20 2a 09 09 09 09 09 | 09 09 09 09 20 20 20 20 |X *.....|.... |
|00000a10| 20 20 2a 0a 58 20 2a 09 | 54 68 65 20 61 75 74 68 | *.X *.|The auth|
|00000a20| 6f 72 20 6d 61 6b 65 73 | 20 6e 6f 20 77 61 72 72 |or makes| no warr|
|00000a30| 61 6e 74 79 20 6f 66 20 | 61 6e 79 20 6b 69 6e 64 |anty of |any kind|
|00000a40| 20 20 77 69 74 68 20 20 | 72 65 73 70 65 63 74 20 | with |respect |
|00000a50| 20 74 6f 20 20 74 68 69 | 73 20 20 20 20 20 2a 0a | to thi|s *.|
|00000a60| 58 20 2a 09 70 72 6f 64 | 75 63 74 20 20 61 6e 64 |X *.prod|uct and|
|00000a70| 20 20 65 78 70 6c 69 63 | 69 74 6c 79 20 64 69 73 | explic|itly dis|
|00000a80| 63 6c 61 69 6d 73 20 61 | 6e 79 20 69 6d 70 6c 69 |claims a|ny impli|
|00000a90| 65 64 20 77 61 72 72 61 | 6e 74 69 65 73 20 6f 66 |ed warra|nties of|
|00000aa0| 20 6d 65 72 2d 20 20 20 | 20 20 2a 0a 58 20 2a 09 | mer- | *.X *.|
|00000ab0| 63 68 61 6e 74 61 62 69 | 6c 69 74 79 20 6f 72 20 |chantabi|lity or |
|00000ac0| 66 69 74 6e 65 73 73 20 | 66 6f 72 20 61 6e 79 20 |fitness |for any |
|00000ad0| 70 61 72 74 69 63 75 6c | 61 72 20 70 75 72 70 6f |particul|ar purpo|
|00000ae0| 73 65 2e 09 09 20 20 20 | 20 20 20 2a 0a 58 20 2a |se... | *.X *|
|00000af0| 09 09 09 09 09 09 09 09 | 09 20 20 20 20 20 20 2a |........|. *|
|00000b00| 0a 58 20 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |.X *****|********|
|00000b10| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000b20| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000b30| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000b40| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000b50| 2a 0a 58 20 2a 2f 0a 58 | 0a 58 0c 0a 58 2f 2a 0a |*.X */.X|.X..X/*.|
|00000b60| 58 20 2a 20 20 46 49 4c | 45 0a 58 20 2a 0a 58 20 |X * FIL|E.X *.X |
|00000b70| 2a 09 64 62 75 67 2e 68 | 20 20 20 20 75 73 65 72 |*.dbug.h| user|
|00000b80| 20 69 6e 63 6c 75 64 65 | 20 66 69 6c 65 20 66 6f | include| file fo|
|00000b90| 72 20 70 72 6f 67 72 61 | 6d 73 20 75 73 69 6e 67 |r progra|ms using|
|00000ba0| 20 74 68 65 20 64 62 75 | 67 20 70 61 63 6b 61 67 | the dbu|g packag|
|00000bb0| 65 0a 58 20 2a 0a 58 20 | 2a 20 20 53 59 4e 4f 50 |e.X *.X |* SYNOP|
|00000bc0| 53 49 53 0a 58 20 2a 0a | 58 20 2a 09 23 69 6e 63 |SIS.X *.|X *.#inc|
|00000bd0| 6c 75 64 65 20 3c 6c 6f | 63 61 6c 2f 64 62 75 67 |lude <lo|cal/dbug|
|00000be0| 2e 68 3e 0a 58 20 2a 0a | 58 20 2a 20 20 53 43 43 |.h>.X *.|X * SCC|
|00000bf0| 53 20 49 44 0a 58 20 2a | 0a 58 20 2a 09 40 28 23 |S ID.X *|.X *.@(#|
|00000c00| 29 64 62 75 67 2e 68 09 | 31 2e 31 31 20 39 2f 35 |)dbug.h.|1.11 9/5|
|00000c10| 2f 38 37 0a 58 20 2a 0a | 58 20 2a 20 20 44 45 53 |/87.X *.|X * DES|
|00000c20| 43 52 49 50 54 49 4f 4e | 0a 58 20 2a 0a 58 20 2a |CRIPTION|.X *.X *|
|00000c30| 09 50 72 6f 67 72 61 6d | 73 20 77 68 69 63 68 20 |.Program|s which |
|00000c40| 75 73 65 20 74 68 65 20 | 64 62 75 67 20 70 61 63 |use the |dbug pac|
|00000c50| 6b 61 67 65 20 6d 75 73 | 74 20 69 6e 63 6c 75 64 |kage mus|t includ|
|00000c60| 65 20 74 68 69 73 20 66 | 69 6c 65 2e 0a 58 20 2a |e this f|ile..X *|
|00000c70| 09 49 74 20 63 6f 6e 74 | 61 69 6e 73 20 74 68 65 |.It cont|ains the|
|00000c80| 20 61 70 70 72 6f 70 72 | 69 61 74 65 20 6d 61 63 | appropr|iate mac|
|00000c90| 72 6f 73 20 74 6f 20 63 | 61 6c 6c 20 73 75 70 70 |ros to c|all supp|
|00000ca0| 6f 72 74 20 72 6f 75 74 | 69 6e 65 73 0a 58 20 2a |ort rout|ines.X *|
|00000cb0| 09 69 6e 20 74 68 65 20 | 64 62 75 67 20 72 75 6e |.in the |dbug run|
|00000cc0| 74 69 6d 65 20 6c 69 62 | 72 61 72 79 2e 0a 58 20 |time lib|rary..X |
|00000cd0| 2a 0a 58 20 2a 09 54 6f | 20 64 69 73 61 62 6c 65 |*.X *.To| disable|
|00000ce0| 20 63 6f 6d 70 69 6c 61 | 74 69 6f 6e 20 6f 66 20 | compila|tion of |
|00000cf0| 74 68 65 20 6d 61 63 72 | 6f 20 65 78 70 61 6e 73 |the macr|o expans|
|00000d00| 69 6f 6e 73 20 64 65 66 | 69 6e 65 20 74 68 65 0a |ions def|ine the.|
|00000d10| 58 20 2a 09 70 72 65 70 | 72 6f 63 65 73 73 6f 72 |X *.prep|rocessor|
|00000d20| 20 73 79 6d 62 6f 6c 20 | 22 44 42 55 47 5f 4f 46 | symbol |"DBUG_OF|
|00000d30| 46 22 2e 20 20 54 68 69 | 73 20 77 69 6c 6c 20 72 |F". Thi|s will r|
|00000d40| 65 73 75 6c 74 20 69 6e | 20 6e 75 6c 6c 0a 58 20 |esult in| null.X |
|00000d50| 2a 09 6d 61 63 72 6f 73 | 20 65 78 70 61 6e 73 69 |*.macros| expansi|
|00000d60| 6f 6e 73 20 73 6f 20 74 | 68 61 74 20 74 68 65 20 |ons so t|hat the |
|00000d70| 72 65 73 75 6c 74 69 6e | 67 20 63 6f 64 65 20 77 |resultin|g code w|
|00000d80| 69 6c 6c 20 62 65 20 73 | 6d 61 6c 6c 65 72 0a 58 |ill be s|maller.X|
|00000d90| 20 2a 09 61 6e 64 20 66 | 61 73 74 65 72 2e 20 20 | *.and f|aster. |
|00000da0| 28 54 68 65 20 64 69 66 | 66 65 72 65 6e 63 65 20 |(The dif|ference |
|00000db0| 6d 61 79 20 62 65 20 73 | 6d 61 6c 6c 65 72 20 74 |may be s|maller t|
|00000dc0| 68 61 6e 20 79 6f 75 20 | 74 68 69 6e 6b 0a 58 20 |han you |think.X |
|00000dd0| 2a 09 73 6f 20 74 68 69 | 73 20 73 74 65 70 20 69 |*.so thi|s step i|
|00000de0| 73 20 72 65 63 6f 6d 6d | 65 6e 64 65 64 20 6f 6e |s recomm|ended on|
|00000df0| 6c 79 20 77 68 65 6e 20 | 61 62 73 6f 6c 75 74 65 |ly when |absolute|
|00000e00| 6c 79 20 6e 65 63 65 73 | 73 61 72 79 29 2e 0a 58 |ly neces|sary)..X|
|00000e10| 20 2a 09 49 6e 20 67 65 | 6e 65 72 61 6c 2c 20 74 | *.In ge|neral, t|
|00000e20| 72 61 64 65 6f 66 66 73 | 20 62 65 74 77 65 65 6e |radeoffs| between|
|00000e30| 20 73 70 61 63 65 20 61 | 6e 64 20 65 66 66 69 63 | space a|nd effic|
|00000e40| 69 65 6e 63 79 20 61 72 | 65 0a 58 20 2a 09 64 65 |iency ar|e.X *.de|
|00000e50| 63 69 64 65 64 20 69 6e | 20 66 61 76 6f 72 20 6f |cided in| favor o|
|00000e60| 66 20 65 66 66 69 63 69 | 65 6e 63 79 20 73 69 6e |f effici|ency sin|
|00000e70| 63 65 20 73 70 61 63 65 | 20 69 73 20 73 65 6c 64 |ce space| is seld|
|00000e80| 6f 6d 20 61 0a 58 20 2a | 09 70 72 6f 62 6c 65 6d |om a.X *|.problem|
|00000e90| 20 6f 6e 20 74 68 65 20 | 6e 65 77 20 6d 61 63 68 | on the |new mach|
|00000ea0| 69 6e 65 73 29 2e 0a 58 | 20 2a 0a 58 20 2a 09 41 |ines)..X| *.X *.A|
|00000eb0| 6c 6c 20 65 78 74 65 72 | 6e 61 6c 6c 79 20 76 69 |ll exter|nally vi|
|00000ec0| 73 69 62 6c 65 20 73 79 | 6d 62 6f 6c 20 6e 61 6d |sible sy|mbol nam|
|00000ed0| 65 73 20 66 6f 6c 6c 6f | 77 20 74 68 65 20 70 61 |es follo|w the pa|
|00000ee0| 74 74 65 72 6e 0a 58 20 | 2a 09 22 5f 64 62 5f 78 |ttern.X |*."_db_x|
|00000ef0| 78 78 2e 2e 78 78 5f 22 | 20 74 6f 20 6d 69 6e 69 |xx..xx_"| to mini|
|00000f00| 6d 69 7a 65 20 74 68 65 | 20 70 6f 73 73 69 62 69 |mize the| possibi|
|00000f10| 6c 69 74 79 20 6f 66 20 | 61 20 64 62 75 67 20 70 |lity of |a dbug p|
|00000f20| 61 63 6b 61 67 65 0a 58 | 20 2a 09 73 79 6d 62 6f |ackage.X| *.symbo|
|00000f30| 6c 20 63 6f 6c 6c 69 64 | 69 6e 67 20 77 69 74 68 |l collid|ing with|
|00000f40| 20 61 20 75 73 65 72 20 | 64 65 66 69 6e 65 64 20 | a user |defined |
|00000f50| 73 79 6d 62 6f 6c 2e 0a | 58 20 2a 09 0a 58 20 2a |symbol..|X *..X *|
|00000f60| 09 54 68 65 20 44 42 55 | 47 5f 3c 4e 3e 20 73 74 |.The DBU|G_<N> st|
|00000f70| 79 6c 65 20 6d 61 63 72 | 6f 73 20 61 72 65 20 6f |yle macr|os are o|
|00000f80| 62 73 6f 6c 65 74 65 20 | 61 6e 64 20 73 68 6f 75 |bsolete |and shou|
|00000f90| 6c 64 20 6e 6f 74 20 62 | 65 20 75 73 65 64 0a 58 |ld not b|e used.X|
|00000fa0| 20 2a 09 69 6e 20 6e 65 | 77 20 63 6f 64 65 2e 20 | *.in ne|w code. |
|00000fb0| 20 4d 61 63 72 6f 73 20 | 74 6f 20 6d 61 70 20 74 | Macros |to map t|
|00000fc0| 68 65 6d 20 74 6f 20 69 | 6e 73 74 61 6e 63 65 73 |hem to i|nstances|
|00000fd0| 20 6f 66 20 44 42 55 47 | 5f 50 52 49 4e 54 0a 58 | of DBUG|_PRINT.X|
|00000fe0| 20 2a 09 61 72 65 20 70 | 72 6f 76 69 64 65 64 20 | *.are p|rovided |
|00000ff0| 66 6f 72 20 63 6f 6d 70 | 61 74 69 62 69 6c 69 74 |for comp|atibilit|
|00001000| 79 20 77 69 74 68 20 6f | 6c 64 65 72 20 63 6f 64 |y with o|lder cod|
|00001010| 65 2e 20 20 54 68 65 79 | 20 6d 61 79 20 67 6f 0a |e. They| may go.|
|00001020| 58 20 2a 09 61 77 61 79 | 20 63 6f 6d 70 6c 65 74 |X *.away| complet|
|00001030| 65 6c 79 20 69 6e 20 73 | 75 62 73 65 71 75 65 6e |ely in s|ubsequen|
|00001040| 74 20 72 65 6c 65 61 73 | 65 73 2e 0a 58 20 2a 0a |t releas|es..X *.|
|00001050| 58 20 2a 20 20 41 55 54 | 48 4f 52 0a 58 20 2a 0a |X * AUT|HOR.X *.|
|00001060| 58 20 2a 09 46 72 65 64 | 20 46 69 73 68 0a 58 20 |X *.Fred| Fish.X |
|00001070| 2a 09 28 43 75 72 72 65 | 6e 74 6c 79 20 65 6d 70 |*.(Curre|ntly emp|
|00001080| 6c 6f 79 65 64 20 62 79 | 20 4d 6f 74 6f 72 6f 6c |loyed by| Motorol|
|00001090| 61 20 43 6f 6d 70 75 74 | 65 72 20 44 69 76 69 73 |a Comput|er Divis|
|000010a0| 69 6f 6e 2c 20 54 65 6d | 70 65 2c 20 41 7a 2e 29 |ion, Tem|pe, Az.)|
|000010b0| 0a 58 20 2a 09 68 61 6f | 21 6e 6f 61 6f 21 6d 63 |.X *.hao|!noao!mc|
|000010c0| 64 73 75 6e 21 66 6e 66 | 0a 58 20 2a 09 28 36 30 |dsun!fnf|.X *.(60|
|000010d0| 32 29 20 34 33 38 2d 33 | 36 31 34 0a 58 20 2a 0a |2) 438-3|614.X *.|
|000010e0| 58 20 2a 2f 0a 58 0a 58 | 0c 0a 58 2f 2a 0a 58 20 |X */.X.X|..X/*.X |
|000010f0| 2a 09 49 6e 74 65 72 6e | 61 6c 6c 79 20 75 73 65 |*.Intern|ally use|
|00001100| 64 20 64 62 75 67 20 76 | 61 72 69 61 62 6c 65 73 |d dbug v|ariables|
|00001110| 20 77 68 69 63 68 20 6d | 75 73 74 20 62 65 20 67 | which m|ust be g|
|00001120| 6c 6f 62 61 6c 2e 0a 58 | 20 2a 2f 0a 58 0a 58 23 |lobal..X| */.X.X#|
|00001130| 69 66 6e 64 65 66 20 44 | 42 55 47 5f 4f 46 46 0a |ifndef D|BUG_OFF.|
|00001140| 58 20 20 20 20 65 78 74 | 65 72 6e 20 69 6e 74 20 |X ext|ern int |
|00001150| 5f 64 62 5f 6f 6e 5f 3b | 09 09 09 2f 2a 20 54 52 |_db_on_;|.../* TR|
|00001160| 55 45 20 69 66 20 64 65 | 62 75 67 20 63 75 72 72 |UE if de|bug curr|
|00001170| 65 6e 74 6c 79 20 65 6e | 61 62 6c 65 64 20 2a 2f |ently en|abled */|
|00001180| 0a 58 20 20 20 20 65 78 | 74 65 72 6e 20 46 49 4c |.X ex|tern FIL|
|00001190| 45 20 2a 5f 64 62 5f 66 | 70 5f 3b 09 09 2f 2a 20 |E *_db_f|p_;../* |
|000011a0| 43 75 72 72 65 6e 74 20 | 64 65 62 75 67 20 6f 75 |Current |debug ou|
|000011b0| 74 70 75 74 20 73 74 72 | 65 61 6d 20 2a 2f 0a 58 |tput str|eam */.X|
|000011c0| 20 20 20 20 65 78 74 65 | 72 6e 20 63 68 61 72 20 | exte|rn char |
|000011d0| 2a 5f 64 62 5f 70 72 6f | 63 65 73 73 5f 3b 09 09 |*_db_pro|cess_;..|
|000011e0| 2f 2a 20 4e 61 6d 65 20 | 6f 66 20 63 75 72 72 65 |/* Name |of curre|
|000011f0| 6e 74 20 70 72 6f 63 65 | 73 73 20 2a 2f 0a 58 20 |nt proce|ss */.X |
|00001200| 20 20 20 65 78 74 65 72 | 6e 20 69 6e 74 20 5f 64 | exter|n int _d|
|00001210| 62 5f 6b 65 79 77 6f 72 | 64 5f 20 28 29 3b 09 09 |b_keywor|d_ ();..|
|00001220| 2f 2a 20 41 63 63 65 70 | 74 2f 72 65 6a 65 63 74 |/* Accep|t/reject|
|00001230| 20 6b 65 79 77 6f 72 64 | 20 2a 2f 0a 58 20 20 20 | keyword| */.X |
|00001240| 20 65 78 74 65 72 6e 20 | 76 6f 69 64 20 5f 64 62 | extern |void _db|
|00001250| 5f 70 75 73 68 5f 20 28 | 29 3b 09 09 2f 2a 20 50 |_push_ (|);../* P|
|00001260| 75 73 68 20 73 74 61 74 | 65 2c 20 73 65 74 20 75 |ush stat|e, set u|
|00001270| 70 20 6e 65 77 20 73 74 | 61 74 65 20 2a 2f 0a 58 |p new st|ate */.X|
|00001280| 20 20 20 20 65 78 74 65 | 72 6e 20 76 6f 69 64 20 | exte|rn void |
|00001290| 5f 64 62 5f 70 6f 70 5f | 20 28 29 3b 09 09 2f 2a |_db_pop_| ();../*|
|000012a0| 20 50 6f 70 20 70 72 65 | 76 69 6f 75 73 20 64 65 | Pop pre|vious de|
|000012b0| 62 75 67 20 73 74 61 74 | 65 20 2a 2f 0a 58 20 20 |bug stat|e */.X |
|000012c0| 20 20 65 78 74 65 72 6e | 20 76 6f 69 64 20 5f 64 | extern| void _d|
|000012d0| 62 5f 65 6e 74 65 72 5f | 20 28 29 3b 09 09 2f 2a |b_enter_| ();../*|
|000012e0| 20 4e 65 77 20 75 73 65 | 72 20 66 75 6e 63 74 69 | New use|r functi|
|000012f0| 6f 6e 20 65 6e 74 65 72 | 65 64 20 2a 2f 0a 58 20 |on enter|ed */.X |
|00001300| 20 20 20 65 78 74 65 72 | 6e 20 76 6f 69 64 20 5f | exter|n void _|
|00001310| 64 62 5f 72 65 74 75 72 | 6e 5f 20 28 29 3b 09 09 |db_retur|n_ ();..|
|00001320| 2f 2a 20 55 73 65 72 20 | 66 75 6e 63 74 69 6f 6e |/* User |function|
|00001330| 20 72 65 74 75 72 6e 20 | 2a 2f 0a 58 20 20 20 20 | return |*/.X |
|00001340| 65 78 74 65 72 6e 20 76 | 6f 69 64 20 5f 64 62 5f |extern v|oid _db_|
|00001350| 70 61 72 67 73 5f 20 28 | 29 3b 09 09 2f 2a 20 52 |pargs_ (|);../* R|
|00001360| 65 6d 65 6d 62 65 72 20 | 61 72 67 73 20 66 6f 72 |emember |args for|
|00001370| 20 6c 69 6e 65 20 2a 2f | 0a 58 20 20 20 20 65 78 | line */|.X ex|
|00001380| 74 65 72 6e 20 76 6f 69 | 64 20 5f 64 62 5f 64 6f |tern voi|d _db_do|
|00001390| 70 72 6e 74 5f 20 28 29 | 3b 09 09 2f 2a 20 50 72 |prnt_ ()|;../* Pr|
|000013a0| 69 6e 74 20 64 65 62 75 | 67 20 6f 75 74 70 75 74 |int debu|g output|
|000013b0| 20 2a 2f 0a 58 20 20 20 | 20 65 78 74 65 72 6e 20 | */.X | extern |
|000013c0| 76 6f 69 64 20 5f 64 62 | 5f 73 65 74 6a 6d 70 5f |void _db|_setjmp_|
|000013d0| 20 28 29 3b 09 09 2f 2a | 20 53 61 76 65 20 64 65 | ();../*| Save de|
|000013e0| 62 75 67 67 65 72 20 65 | 6e 76 69 72 6f 6e 6d 65 |bugger e|nvironme|
|000013f0| 6e 74 20 2a 2f 0a 58 20 | 20 20 20 65 78 74 65 72 |nt */.X | exter|
|00001400| 6e 20 76 6f 69 64 20 5f | 64 62 5f 6c 6f 6e 67 6a |n void _|db_longj|
|00001410| 6d 70 5f 20 28 29 3b 09 | 2f 2a 20 52 65 73 74 6f |mp_ ();.|/* Resto|
|00001420| 72 65 20 64 65 62 75 67 | 67 65 72 20 65 6e 76 69 |re debug|ger envi|
|00001430| 72 6f 6e 6d 65 6e 74 20 | 2a 2f 0a 58 23 20 65 6e |ronment |*/.X# en|
|00001440| 64 69 66 0a 58 0a 58 0c | 0a 58 2f 2a 0a 58 20 2a |dif.X.X.|.X/*.X *|
|00001450| 09 54 68 65 73 65 20 6d | 61 63 72 6f 73 20 70 72 |.These m|acros pr|
|00001460| 6f 76 69 64 65 20 61 20 | 75 73 65 72 20 69 6e 74 |ovide a |user int|
|00001470| 65 72 66 61 63 65 20 69 | 6e 74 6f 20 66 75 6e 63 |erface i|nto func|
|00001480| 74 69 6f 6e 73 20 69 6e | 20 74 68 65 0a 58 20 2a |tions in| the.X *|
|00001490| 09 64 62 75 67 20 72 75 | 6e 74 69 6d 65 20 73 75 |.dbug ru|ntime su|
|000014a0| 70 70 6f 72 74 20 6c 69 | 62 72 61 72 79 2e 20 20 |pport li|brary. |
|000014b0| 54 68 65 79 20 69 73 6f | 6c 61 74 65 20 75 73 65 |They iso|late use|
|000014c0| 72 73 20 66 72 6f 6d 20 | 63 68 61 6e 67 65 73 0a |rs from |changes.|
|000014d0| 58 20 2a 09 69 6e 20 74 | 68 65 20 4d 41 43 52 4f |X *.in t|he MACRO|
|000014e0| 53 20 61 6e 64 2f 6f 72 | 20 72 75 6e 74 69 6d 65 |S and/or| runtime|
|000014f0| 20 73 75 70 70 6f 72 74 | 2e 0a 58 20 2a 0a 58 20 | support|..X *.X |
|00001500| 2a 09 54 68 65 20 73 79 | 6d 62 6f 6c 73 20 22 5f |*.The sy|mbols "_|
|00001510| 5f 4c 49 4e 45 5f 5f 22 | 20 61 6e 64 20 22 5f 5f |_LINE__"| and "__|
|00001520| 46 49 4c 45 5f 5f 22 20 | 61 72 65 20 65 78 70 61 |FILE__" |are expa|
|00001530| 6e 64 65 64 20 62 79 20 | 74 68 65 0a 58 20 2a 09 |nded by |the.X *.|
|00001540| 70 72 65 70 72 6f 63 65 | 73 73 6f 72 20 74 6f 20 |preproce|ssor to |
|00001550| 74 68 65 20 63 75 72 72 | 65 6e 74 20 73 6f 75 72 |the curr|ent sour|
|00001560| 63 65 20 66 69 6c 65 20 | 6c 69 6e 65 20 6e 75 6d |ce file |line num|
|00001570| 62 65 72 20 61 6e 64 20 | 66 69 6c 65 0a 58 20 2a |ber and |file.X *|
|00001580| 09 6e 61 6d 65 20 72 65 | 73 70 65 63 74 69 76 65 |.name re|spective|
|00001590| 6c 79 2e 0a 58 20 2a 0a | 58 20 2a 09 57 41 52 4e |ly..X *.|X *.WARN|
|000015a0| 49 4e 47 20 2d 2d 2d 20 | 20 42 65 63 61 75 73 65 |ING --- | Because|
|000015b0| 20 74 68 65 20 44 42 55 | 47 5f 45 4e 54 45 52 20 | the DBU|G_ENTER |
|000015c0| 6d 61 63 72 6f 20 61 6c | 6c 6f 63 61 74 65 73 20 |macro al|locates |
|000015d0| 73 70 61 63 65 20 6f 6e | 0a 58 20 2a 09 74 68 65 |space on|.X *.the|
|000015e0| 20 75 73 65 72 20 66 75 | 6e 63 74 69 6f 6e 27 73 | user fu|nction's|
|000015f0| 20 73 74 61 63 6b 2c 20 | 69 74 20 6d 75 73 74 20 | stack, |it must |
|00001600| 70 72 65 63 65 64 65 20 | 61 6e 79 20 65 78 65 63 |precede |any exec|
|00001610| 75 74 61 62 6c 65 0a 58 | 20 2a 09 73 74 61 74 65 |utable.X| *.state|
|00001620| 6d 65 6e 74 73 20 69 6e | 20 74 68 65 20 75 73 65 |ments in| the use|
|00001630| 72 20 66 75 6e 63 74 69 | 6f 6e 2e 0a 58 20 2a 0a |r functi|on..X *.|
|00001640| 58 20 2a 2f 0a 58 0a 58 | 23 20 69 66 64 65 66 20 |X */.X.X|# ifdef |
|00001650| 44 42 55 47 5f 4f 46 46 | 0a 58 23 20 20 20 20 64 |DBUG_OFF|.X# d|
|00001660| 65 66 69 6e 65 20 44 42 | 55 47 5f 45 4e 54 45 52 |efine DB|UG_ENTER|
|00001670| 28 61 31 29 0a 58 23 20 | 20 20 20 64 65 66 69 6e |(a1).X# | defin|
|00001680| 65 20 44 42 55 47 5f 4d | 41 4c 4c 4f 43 28 61 31 |e DBUG_M|ALLOC(a1|
|00001690| 29 0a 58 23 20 20 20 20 | 64 65 66 69 6e 65 20 44 |).X# |define D|
|000016a0| 42 55 47 5f 52 45 54 55 | 52 4e 28 61 31 29 20 72 |BUG_RETU|RN(a1) r|
|000016b0| 65 74 75 72 6e 28 61 31 | 29 0a 58 23 20 20 20 20 |eturn(a1|).X# |
|000016c0| 64 65 66 69 6e 65 20 44 | 42 55 47 5f 56 4f 49 44 |define D|BUG_VOID|
|000016d0| 5f 52 45 54 55 52 4e 20 | 72 65 74 75 72 6e 0a 58 |_RETURN |return.X|
|000016e0| 23 20 20 20 20 64 65 66 | 69 6e 65 20 44 42 55 47 |# def|ine DBUG|
|000016f0| 5f 45 58 45 43 55 54 45 | 28 6b 65 79 77 6f 72 64 |_EXECUTE|(keyword|
|00001700| 2c 61 31 29 0a 58 23 20 | 20 20 20 64 65 66 69 6e |,a1).X# | defin|
|00001710| 65 20 44 42 55 47 5f 50 | 52 49 4e 54 28 6b 65 79 |e DBUG_P|RINT(key|
|00001720| 77 6f 72 64 2c 61 72 67 | 6c 69 73 74 29 0a 58 23 |word,arg|list).X#|
|00001730| 20 20 20 20 64 65 66 69 | 6e 65 20 44 42 55 47 5f | defi|ne DBUG_|
|00001740| 32 28 6b 65 79 77 6f 72 | 64 2c 66 6f 72 6d 61 74 |2(keywor|d,format|
|00001750| 29 09 09 2f 2a 20 4f 62 | 73 6f 6c 65 74 65 20 2a |)../* Ob|solete *|
|00001760| 2f 0a 58 23 20 20 20 20 | 64 65 66 69 6e 65 20 44 |/.X# |define D|
|00001770| 42 55 47 5f 33 28 6b 65 | 79 77 6f 72 64 2c 66 6f |BUG_3(ke|yword,fo|
|00001780| 72 6d 61 74 2c 61 31 29 | 09 09 2f 2a 20 4f 62 73 |rmat,a1)|../* Obs|
|00001790| 6f 6c 65 74 65 20 2a 2f | 0a 58 23 20 20 20 20 64 |olete */|.X# d|
|000017a0| 65 66 69 6e 65 20 44 42 | 55 47 5f 34 28 6b 65 79 |efine DB|UG_4(key|
|000017b0| 77 6f 72 64 2c 66 6f 72 | 6d 61 74 2c 61 31 2c 61 |word,for|mat,a1,a|
|000017c0| 32 29 09 2f 2a 20 4f 62 | 73 6f 6c 65 74 65 20 2a |2)./* Ob|solete *|
|000017d0| 2f 0a 58 23 20 20 20 20 | 64 65 66 69 6e 65 20 44 |/.X# |define D|
|000017e0| 42 55 47 5f 35 28 6b 65 | 79 77 6f 72 64 2c 66 6f |BUG_5(ke|yword,fo|
|000017f0| 72 6d 61 74 2c 61 31 2c | 61 32 2c 61 33 29 09 2f |rmat,a1,|a2,a3)./|
|00001800| 2a 20 4f 62 73 6f 6c 65 | 74 65 20 2a 2f 0a 58 23 |* Obsole|te */.X#|
|00001810| 20 20 20 20 64 65 66 69 | 6e 65 20 44 42 55 47 5f | defi|ne DBUG_|
|00001820| 50 55 53 48 28 61 31 29 | 0a 58 23 20 20 20 20 64 |PUSH(a1)|.X# d|
|00001830| 65 66 69 6e 65 20 44 42 | 55 47 5f 50 4f 50 28 29 |efine DB|UG_POP()|
|00001840| 0a 58 23 20 20 20 20 64 | 65 66 69 6e 65 20 44 42 |.X# d|efine DB|
|00001850| 55 47 5f 50 52 4f 43 45 | 53 53 28 61 31 29 0a 58 |UG_PROCE|SS(a1).X|
|00001860| 23 20 20 20 20 64 65 66 | 69 6e 65 20 44 42 55 47 |# def|ine DBUG|
|00001870| 5f 46 49 4c 45 20 28 73 | 74 64 65 72 72 29 0a 58 |_FILE (s|tderr).X|
|00001880| 23 20 20 20 20 64 65 66 | 69 6e 65 20 44 42 55 47 |# def|ine DBUG|
|00001890| 5f 53 45 54 4a 4d 50 20 | 73 65 74 6a 6d 70 0a 58 |_SETJMP |setjmp.X|
|000018a0| 23 20 20 20 20 64 65 66 | 69 6e 65 20 44 42 55 47 |# def|ine DBUG|
|000018b0| 5f 4c 4f 4e 47 4a 4d 50 | 20 6c 6f 6e 67 6a 6d 70 |_LONGJMP| longjmp|
|000018c0| 0a 58 23 20 65 6c 73 65 | 0a 58 23 20 20 20 20 64 |.X# else|.X# d|
|000018d0| 65 66 69 6e 65 20 44 42 | 55 47 5f 45 4e 54 45 52 |efine DB|UG_ENTER|
|000018e0| 28 61 29 20 5c 0a 58 09 | 61 75 74 6f 20 63 68 61 |(a) \.X.|auto cha|
|000018f0| 72 20 2a 5f 64 62 5f 66 | 75 6e 63 5f 2c 20 2a 5f |r *_db_f|unc_, *_|
|00001900| 64 62 5f 66 69 6c 65 5f | 3b 20 5c 0a 58 09 69 6e |db_file_|; \.X.in|
|00001910| 74 20 5f 64 62 5f 6c 65 | 76 65 6c 5f 3b 20 5c 0a |t _db_le|vel_; \.|
|00001920| 58 09 5f 64 62 5f 65 6e | 74 65 72 5f 20 28 61 2c |X._db_en|ter_ (a,|
|00001930| 5f 5f 46 49 4c 45 5f 5f | 2c 5f 5f 4c 49 4e 45 5f |__FILE__|,__LINE_|
|00001940| 5f 2c 26 5f 64 62 5f 66 | 75 6e 63 5f 2c 26 5f 64 |_,&_db_f|unc_,&_d|
|00001950| 62 5f 66 69 6c 65 5f 2c | 26 5f 64 62 5f 6c 65 76 |b_file_,|&_db_lev|
|00001960| 65 6c 5f 29 0a 58 23 20 | 20 20 20 64 65 66 69 6e |el_).X# | defin|
|00001970| 65 20 44 42 55 47 5f 4d | 41 4c 4c 4f 43 28 61 29 |e DBUG_M|ALLOC(a)|
|00001980| 20 5c 0a 58 09 61 75 74 | 6f 20 63 68 61 72 20 2a | \.X.aut|o char *|
|00001990| 5f 64 62 5f 66 75 6e 63 | 5f 2c 20 2a 5f 64 62 5f |_db_func|_, *_db_|
|000019a0| 66 69 6c 65 5f 3b 20 5c | 0a 58 09 69 6e 74 20 5f |file_; \|.X.int _|
|000019b0| 64 62 5f 6c 65 76 65 6c | 5f 3b 20 5c 0a 58 09 6d |db_level|_; \.X.m|
|000019c0| 61 6c 6c 6f 63 5f 69 6e | 69 74 28 29 3b 5c 0a 58 |alloc_in|it();\.X|
|000019d0| 09 5f 64 62 5f 65 6e 74 | 65 72 5f 20 28 61 2c 5f |._db_ent|er_ (a,_|
|000019e0| 5f 46 49 4c 45 5f 5f 2c | 5f 5f 4c 49 4e 45 5f 5f |_FILE__,|__LINE__|
|000019f0| 2c 26 5f 64 62 5f 66 75 | 6e 63 5f 2c 26 5f 64 62 |,&_db_fu|nc_,&_db|
|00001a00| 5f 66 69 6c 65 5f 2c 26 | 5f 64 62 5f 6c 65 76 65 |_file_,&|_db_leve|
|00001a10| 6c 5f 29 0a 58 23 20 20 | 20 20 64 65 66 69 6e 65 |l_).X# | define|
|00001a20| 20 44 42 55 47 5f 4c 45 | 41 56 45 20 5c 0a 58 09 | DBUG_LE|AVE \.X.|
|00001a30| 28 5f 64 62 5f 72 65 74 | 75 72 6e 5f 20 28 5f 5f |(_db_ret|urn_ (__|
|00001a40| 4c 49 4e 45 5f 5f 2c 20 | 26 5f 64 62 5f 66 75 6e |LINE__, |&_db_fun|
|00001a50| 63 5f 2c 20 26 5f 64 62 | 5f 66 69 6c 65 5f 2c 20 |c_, &_db|_file_, |
|00001a60| 26 5f 64 62 5f 6c 65 76 | 65 6c 5f 29 29 0a 58 2f |&_db_lev|el_)).X/|
|00001a70| 2a 20 20 20 64 65 66 69 | 6e 65 20 44 42 55 47 5f |* defi|ne DBUG_|
|00001a80| 52 45 54 55 52 4e 28 61 | 31 29 20 72 65 74 75 72 |RETURN(a|1) retur|
|00001a90| 6e 20 28 44 42 55 47 5f | 4c 45 41 56 45 2c 20 28 |n (DBUG_|LEAVE, (|
|00001aa0| 61 31 29 29 20 20 41 6c | 74 65 72 6e 61 74 65 20 |a1)) Al|ternate |
|00001ab0| 66 6f 72 6d 20 2a 2f 0a | 58 23 20 20 20 20 64 65 |form */.|X# de|
|00001ac0| 66 69 6e 65 20 44 42 55 | 47 5f 52 45 54 55 52 4e |fine DBU|G_RETURN|
|00001ad0| 28 61 31 29 20 7b 44 42 | 55 47 5f 4c 45 41 56 45 |(a1) {DB|UG_LEAVE|
|00001ae0| 3b 20 72 65 74 75 72 6e | 28 61 31 29 3b 7d 0a 58 |; return|(a1);}.X|
|00001af0| 23 20 20 20 20 64 65 66 | 69 6e 65 20 44 42 55 47 |# def|ine DBUG|
|00001b00| 5f 56 4f 49 44 5f 52 45 | 54 55 52 4e 20 44 42 55 |_VOID_RE|TURN DBU|
|00001b10| 47 5f 4c 45 41 56 45 3b | 20 72 65 74 75 72 6e 0a |G_LEAVE;| return.|
|00001b20| 58 23 20 20 20 20 64 65 | 66 69 6e 65 20 44 42 55 |X# de|fine DBU|
|00001b30| 47 5f 45 58 45 43 55 54 | 45 28 6b 65 79 77 6f 72 |G_EXECUT|E(keywor|
|00001b40| 64 2c 61 31 29 20 5c 0a | 58 09 7b 69 66 20 28 5f |d,a1) \.|X.{if (_|
|00001b50| 64 62 5f 6f 6e 5f 29 20 | 7b 69 66 20 28 5f 64 62 |db_on_) |{if (_db|
|00001b60| 5f 6b 65 79 77 6f 72 64 | 5f 20 28 6b 65 79 77 6f |_keyword|_ (keywo|
|00001b70| 72 64 29 29 20 7b 20 61 | 31 20 7d 7d 7d 0a 58 23 |rd)) { a|1 }}}.X#|
|00001b80| 20 20 20 20 64 65 66 69 | 6e 65 20 44 42 55 47 5f | defi|ne DBUG_|
|00001b90| 50 52 49 4e 54 28 6b 65 | 79 77 6f 72 64 2c 61 72 |PRINT(ke|yword,ar|
|00001ba0| 67 6c 69 73 74 29 20 5c | 0a 58 09 7b 69 66 20 28 |glist) \|.X.{if (|
|00001bb0| 5f 64 62 5f 6f 6e 5f 29 | 20 7b 5f 64 62 5f 70 61 |_db_on_)| {_db_pa|
|00001bc0| 72 67 73 5f 28 5f 5f 4c | 49 4e 45 5f 5f 2c 6b 65 |rgs_(__L|INE__,ke|
|00001bd0| 79 77 6f 72 64 29 3b 20 | 5f 64 62 5f 64 6f 70 72 |yword); |_db_dopr|
|00001be0| 6e 74 5f 20 61 72 67 6c | 69 73 74 3b 7d 7d 0a 58 |nt_ argl|ist;}}.X|
|00001bf0| 23 20 20 20 20 64 65 66 | 69 6e 65 20 44 42 55 47 |# def|ine DBUG|
|00001c00| 5f 32 28 6b 65 79 77 6f | 72 64 2c 66 6f 72 6d 61 |_2(keywo|rd,forma|
|00001c10| 74 29 20 5c 0a 58 09 44 | 42 55 47 5f 50 52 49 4e |t) \.X.D|BUG_PRIN|
|00001c20| 54 28 6b 65 79 77 6f 72 | 64 2c 28 66 6f 72 6d 61 |T(keywor|d,(forma|
|00001c30| 74 29 29 09 09 2f 2a 20 | 4f 62 73 6f 6c 65 74 65 |t))../* |Obsolete|
|00001c40| 20 2a 2f 0a 58 23 20 20 | 20 20 64 65 66 69 6e 65 | */.X# | define|
|00001c50| 20 44 42 55 47 5f 33 28 | 6b 65 79 77 6f 72 64 2c | DBUG_3(|keyword,|
|00001c60| 66 6f 72 6d 61 74 2c 61 | 31 29 20 5c 0a 58 09 44 |format,a|1) \.X.D|
|00001c70| 42 55 47 5f 50 52 49 4e | 54 28 6b 65 79 77 6f 72 |BUG_PRIN|T(keywor|
|00001c80| 64 2c 28 66 6f 72 6d 61 | 74 2c 61 31 29 29 09 09 |d,(forma|t,a1))..|
|00001c90| 2f 2a 20 4f 62 73 6f 6c | 65 74 65 20 2a 2f 0a 58 |/* Obsol|ete */.X|
|00001ca0| 23 20 20 20 20 64 65 66 | 69 6e 65 20 44 42 55 47 |# def|ine DBUG|
|00001cb0| 5f 34 28 6b 65 79 77 6f | 72 64 2c 66 6f 72 6d 61 |_4(keywo|rd,forma|
|00001cc0| 74 2c 61 31 2c 61 32 29 | 20 5c 0a 58 09 44 42 55 |t,a1,a2)| \.X.DBU|
|00001cd0| 47 5f 50 52 49 4e 54 28 | 6b 65 79 77 6f 72 64 2c |G_PRINT(|keyword,|
|00001ce0| 28 66 6f 72 6d 61 74 2c | 61 31 2c 61 32 29 29 09 |(format,|a1,a2)).|
|00001cf0| 2f 2a 20 4f 62 73 6f 6c | 65 74 65 20 2a 2f 0a 58 |/* Obsol|ete */.X|
|00001d00| 23 20 20 20 20 64 65 66 | 69 6e 65 20 44 42 55 47 |# def|ine DBUG|
|00001d10| 5f 35 28 6b 65 79 77 6f | 72 64 2c 66 6f 72 6d 61 |_5(keywo|rd,forma|
|00001d20| 74 2c 61 31 2c 61 32 2c | 61 33 29 20 5c 0a 58 09 |t,a1,a2,|a3) \.X.|
|00001d30| 44 42 55 47 5f 50 52 49 | 4e 54 28 6b 65 79 77 6f |DBUG_PRI|NT(keywo|
|00001d40| 72 64 2c 28 66 6f 72 6d | 61 74 2c 61 31 2c 61 32 |rd,(form|at,a1,a2|
|00001d50| 2c 61 33 29 29 09 2f 2a | 20 4f 62 73 6f 6c 65 74 |,a3))./*| Obsolet|
|00001d60| 65 20 2a 2f 0a 58 23 20 | 20 20 20 64 65 66 69 6e |e */.X# | defin|
|00001d70| 65 20 44 42 55 47 5f 50 | 55 53 48 28 61 31 29 20 |e DBUG_P|USH(a1) |
|00001d80| 5f 64 62 5f 70 75 73 68 | 5f 20 28 61 31 29 0a 58 |_db_push|_ (a1).X|
|00001d90| 23 20 20 20 20 64 65 66 | 69 6e 65 20 44 42 55 47 |# def|ine DBUG|
|00001da0| 5f 50 4f 50 28 29 20 5f | 64 62 5f 70 6f 70 5f 20 |_POP() _|db_pop_ |
|00001db0| 28 29 0a 58 23 20 20 20 | 20 64 65 66 69 6e 65 20 |().X# | define |
|00001dc0| 44 42 55 47 5f 50 52 4f | 43 45 53 53 28 61 31 29 |DBUG_PRO|CESS(a1)|
|00001dd0| 20 28 5f 64 62 5f 70 72 | 6f 63 65 73 73 5f 20 3d | (_db_pr|ocess_ =|
|00001de0| 20 61 31 29 0a 58 23 20 | 20 20 20 64 65 66 69 6e | a1).X# | defin|
|00001df0| 65 20 44 42 55 47 5f 46 | 49 4c 45 20 28 5f 64 62 |e DBUG_F|ILE (_db|
|00001e00| 5f 66 70 5f 29 0a 58 23 | 20 20 20 20 64 65 66 69 |_fp_).X#| defi|
|00001e10| 6e 65 20 44 42 55 47 5f | 53 45 54 4a 4d 50 28 61 |ne DBUG_|SETJMP(a|
|00001e20| 31 29 20 28 5f 64 62 5f | 73 65 74 6a 6d 70 5f 20 |1) (_db_|setjmp_ |
|00001e30| 28 29 2c 20 73 65 74 6a | 6d 70 20 28 61 31 29 29 |(), setj|mp (a1))|
|00001e40| 0a 58 23 20 20 20 20 64 | 65 66 69 6e 65 20 44 42 |.X# d|efine DB|
|00001e50| 55 47 5f 4c 4f 4e 47 4a | 4d 50 28 61 31 2c 61 32 |UG_LONGJ|MP(a1,a2|
|00001e60| 29 20 28 5f 64 62 5f 6c | 6f 6e 67 6a 6d 70 5f 20 |) (_db_l|ongjmp_ |
|00001e70| 28 29 2c 20 6c 6f 6e 67 | 6a 6d 70 20 28 61 31 2c |(), long|jmp (a1,|
|00001e80| 20 61 32 29 29 0a 58 23 | 20 65 6e 64 69 66 0a 58 | a2)).X#| endif.X|
|00001e90| 0a 45 4e 44 5f 4f 46 5f | 46 49 4c 45 0a 20 20 69 |.END_OF_|FILE. i|
|00001ea0| 66 20 74 65 73 74 20 36 | 32 35 39 20 2d 6e 65 20 |f test 6|259 -ne |
|00001eb0| 60 77 63 20 2d 63 20 3c | 27 64 62 75 67 2f 64 62 |`wc -c <|'dbug/db|
|00001ec0| 75 67 2e 68 27 60 3b 20 | 74 68 65 6e 0a 20 20 20 |ug.h'`; |then. |
|00001ed0| 20 65 63 68 6f 20 73 68 | 61 72 3a 20 5c 22 27 64 | echo sh|ar: \"'d|
|00001ee0| 62 75 67 2f 64 62 75 67 | 2e 68 27 5c 22 20 75 6e |bug/dbug|.h'\" un|
|00001ef0| 70 61 63 6b 65 64 20 77 | 69 74 68 20 77 72 6f 6e |packed w|ith wron|
|00001f00| 67 20 73 69 7a 65 21 0a | 20 20 66 69 0a 20 20 23 |g size!.| fi. #|
|00001f10| 20 65 6e 64 20 6f 66 20 | 27 64 62 75 67 2f 64 62 | end of |'dbug/db|
|00001f20| 75 67 2e 68 27 0a 66 69 | 0a 69 66 20 74 65 73 74 |ug.h'.fi|.if test|
|00001f30| 20 2d 66 20 27 64 6f 63 | 2f 6f 72 61 70 65 72 6c | -f 'doc|/oraperl|
|00001f40| 2e 31 27 20 2d 61 20 22 | 24 7b 31 7d 22 20 21 3d |.1' -a "|${1}" !=|
|00001f50| 20 22 2d 63 22 20 3b 20 | 74 68 65 6e 20 0a 20 20 | "-c" ; |then . |
|00001f60| 65 63 68 6f 20 73 68 61 | 72 3a 20 57 69 6c 6c 20 |echo sha|r: Will |
|00001f70| 6e 6f 74 20 63 6c 6f 62 | 62 65 72 20 65 78 69 73 |not clob|ber exis|
|00001f80| 74 69 6e 67 20 66 69 6c | 65 20 5c 22 27 64 6f 63 |ting fil|e \"'doc|
|00001f90| 2f 6f 72 61 70 65 72 6c | 2e 31 27 5c 22 0a 65 6c |/oraperl|.1'\".el|
|00001fa0| 73 65 0a 20 20 65 63 68 | 6f 20 73 68 61 72 3a 20 |se. ech|o shar: |
|00001fb0| 45 78 74 72 61 63 74 69 | 6e 67 20 5c 22 27 64 6f |Extracti|ng \"'do|
|00001fc0| 63 2f 6f 72 61 70 65 72 | 6c 2e 31 27 5c 22 20 5c |c/oraper|l.1'\" \|
|00001fd0| 28 32 31 36 36 34 20 63 | 68 61 72 61 63 74 65 72 |(21664 c|haracter|
|00001fe0| 73 5c 29 0a 20 20 73 65 | 64 20 22 73 2f 5e 58 2f |s\). se|d "s/^X/|
|00001ff0| 2f 22 20 3e 27 64 6f 63 | 2f 6f 72 61 70 65 72 6c |/" >'doc|/oraperl|
|00002000| 2e 31 27 20 3c 3c 27 45 | 4e 44 5f 4f 46 5f 46 49 |.1' <<'E|ND_OF_FI|
|00002010| 4c 45 27 0a 58 2e 70 6f | 20 38 0a 58 2e 54 48 20 |LE'.X.po| 8.X.TH |
|00002020| 4f 52 41 50 45 52 4c 20 | 31 20 4f 72 61 63 6c 65 |ORAPERL |1 Oracle|
|00002030| 2f 50 65 72 6c 0a 58 2e | 61 64 0a 58 2e 6e 68 0a |/Perl.X.|ad.X.nh.|
|00002040| 58 2e 53 48 20 4e 41 4d | 45 0a 58 6f 72 61 70 65 |X.SH NAM|E.Xorape|
|00002050| 72 6c 20 5c 2d 20 50 65 | 72 6c 20 61 63 63 65 73 |rl \- Pe|rl acces|
|00002060| 73 20 74 6f 20 4f 72 61 | 63 6c 65 20 64 61 74 61 |s to Ora|cle data|
|00002070| 62 61 73 65 73 0a 58 2e | 62 72 0a 58 63 6f 72 61 |bases.X.|br.Xcora|
|00002080| 70 65 72 6c 20 5c 2d 20 | 4f 72 61 70 65 72 6c 20 |perl \- |Oraperl |
|00002090| 77 69 74 68 20 43 75 72 | 73 65 73 20 66 75 6e 63 |with Cur|ses func|
|000020a0| 74 69 6f 6e 73 0a 58 2e | 53 48 20 53 59 4e 4f 50 |tions.X.|SH SYNOP|
|000020b0| 53 49 53 0a 58 2e 6e 66 | 0a 58 2e 66 74 20 42 0a |SIS.X.nf|.X.ft B.|
|000020c0| 58 24 6c 64 61 20 3d 20 | 26 6f 72 61 5f 6c 6f 67 |X$lda = |&ora_log|
|000020d0| 69 6e 28 24 73 79 73 74 | 65 6d 5f 69 64 2c 20 24 |in($syst|em_id, $|
|000020e0| 6e 61 6d 65 2c 20 24 70 | 61 73 73 77 6f 72 64 29 |name, $p|assword)|
|000020f0| 0a 58 24 63 73 72 20 3d | 20 26 6f 72 61 5f 6f 70 |.X$csr =| &ora_op|
|00002100| 65 6e 28 24 6c 64 61 2c | 20 24 73 74 6d 74 20 5b |en($lda,| $stmt [|
|00002110| 2c 20 24 63 61 63 68 65 | 5d 29 0a 58 26 6f 72 61 |, $cache|]).X&ora|
|00002120| 5f 62 69 6e 64 28 24 63 | 73 72 2c 20 24 76 61 72 |_bind($c|sr, $var|
|00002130| 2c 20 2e 2e 2e 29 0a 58 | 26 6f 72 61 5f 66 65 74 |, ...).X|&ora_fet|
|00002140| 63 68 28 24 63 73 72 20 | 5b 2c 20 24 74 72 75 6e |ch($csr |[, $trun|
|00002150| 63 5d 29 0a 58 26 6f 72 | 61 5f 63 6c 6f 73 65 28 |c]).X&or|a_close(|
|00002160| 24 63 73 72 29 0a 58 26 | 6f 72 61 5f 6c 6f 67 6f |$csr).X&|ora_logo|
|00002170| 66 66 28 24 6c 64 61 29 | 0a 58 0a 58 26 6f 72 61 |ff($lda)|.X.X&ora|
|00002180| 5f 64 6f 28 24 6c 64 61 | 2c 20 24 73 74 6d 74 29 |_do($lda|, $stmt)|
|00002190| 0a 58 0a 58 26 6f 72 61 | 5f 74 69 74 6c 65 73 28 |.X.X&ora|_titles(|
|000021a0| 24 63 73 72 29 0a 58 26 | 6f 72 61 5f 6c 65 6e 67 |$csr).X&|ora_leng|
|000021b0| 74 68 73 28 24 63 73 72 | 29 0a 58 26 6f 72 61 5f |ths($csr|).X&ora_|
|000021c0| 74 79 70 65 73 28 24 63 | 73 72 29 0a 58 26 6f 72 |types($c|sr).X&or|
|000021d0| 61 5f 63 6f 6d 6d 69 74 | 28 24 6c 64 61 29 0a 58 |a_commit|($lda).X|
|000021e0| 26 6f 72 61 5f 72 6f 6c | 6c 62 61 63 6b 28 24 6c |&ora_rol|lback($l|
|000021f0| 64 61 29 0a 58 26 6f 72 | 61 5f 61 75 74 6f 63 6f |da).X&or|a_autoco|
|00002200| 6d 6d 69 74 28 24 6c 64 | 61 2c 20 24 6f 6e 5f 6f |mmit($ld|a, $on_o|
|00002210| 66 66 29 0a 58 26 6f 72 | 61 5f 76 65 72 73 69 6f |ff).X&or|a_versio|
|00002220| 6e 0a 58 0a 58 24 6f 72 | 61 5f 63 61 63 68 65 0a |n.X.X$or|a_cache.|
|00002230| 58 24 6f 72 61 5f 6c 6f | 6e 67 0a 58 24 6f 72 61 |X$ora_lo|ng.X$ora|
|00002240| 5f 74 72 75 6e 63 0a 58 | 24 6f 72 61 5f 65 72 72 |_trunc.X|$ora_err|
|00002250| 6e 6f 0a 58 24 6f 72 61 | 5f 65 72 72 73 74 72 0a |no.X$ora|_errstr.|
|00002260| 58 24 6f 72 61 5f 76 65 | 72 6e 6f 0a 58 0a 58 24 |X$ora_ve|rno.X.X$|
|00002270| 6f 72 61 5f 64 65 62 75 | 67 0a 58 2e 66 74 20 52 |ora_debu|g.X.ft R|
|00002280| 0a 58 2e 66 69 0a 58 2e | 53 48 20 44 45 53 43 52 |.X.fi.X.|SH DESCR|
|00002290| 49 50 54 49 4f 4e 0a 58 | 5c 66 42 4f 72 61 70 65 |IPTION.X|\fBOrape|
|000022a0| 72 6c 5c 66 50 20 69 73 | 20 61 20 76 65 72 73 69 |rl\fP is| a versi|
|000022b0| 6f 6e 20 6f 66 20 5c 66 | 49 50 65 72 6c 5c 66 50 |on of \f|IPerl\fP|
|000022c0| 0a 58 77 68 69 63 68 20 | 68 61 73 20 62 65 65 6e |.Xwhich |has been|
|000022d0| 20 65 78 74 65 6e 64 65 | 64 20 28 74 68 72 6f 75 | extende|d (throu|
|000022e0| 67 68 20 74 68 65 20 5c | 66 49 75 73 65 72 73 75 |gh the \|fIusersu|
|000022f0| 62 73 5c 66 50 20 66 65 | 61 74 75 72 65 29 0a 58 |bs\fP fe|ature).X|
|00002300| 74 6f 20 61 6c 6c 6f 77 | 20 61 63 63 65 73 73 20 |to allow| access |
|00002310| 74 6f 20 5c 66 49 4f 72 | 61 63 6c 65 5c 66 50 20 |to \fIOr|acle\fP |
|00002320| 64 61 74 61 62 61 73 65 | 73 2e 0a 58 5c 66 42 43 |database|s..X\fBC|
|00002330| 6f 72 61 70 65 72 6c 5c | 66 50 20 61 64 64 69 74 |oraperl\|fP addit|
|00002340| 69 6f 6e 61 6c 6c 79 20 | 69 6e 63 6c 75 64 65 73 |ionally |includes|
|00002350| 20 74 68 65 20 5c 66 49 | 63 75 72 73 65 73 5c 66 | the \fI|curses\f|
|00002360| 50 20 72 6f 75 74 69 6e | 65 73 0a 58 66 72 6f 6d |P routin|es.Xfrom|
|00002370| 20 74 68 65 20 5c 66 49 | 75 73 75 62 5c 66 50 20 | the \fI|usub\fP |
|00002380| 65 78 61 6d 70 6c 65 20 | 69 6e 63 6c 75 64 65 64 |example |included|
|00002390| 20 77 69 74 68 20 74 68 | 65 20 5c 66 49 50 65 72 | with th|e \fIPer|
|000023a0| 6c 5c 66 50 20 73 6f 75 | 72 63 65 2e 0a 58 0a 58 |l\fP sou|rce..X.X|
|000023b0| 54 68 65 20 66 75 6e 63 | 74 69 6f 6e 73 20 77 68 |The func|tions wh|
|000023c0| 69 63 68 20 6d 61 6b 65 | 20 75 70 20 74 68 69 73 |ich make| up this|
|000023d0| 20 65 78 74 65 6e 73 69 | 6f 6e 0a 58 61 72 65 20 | extensi|on.Xare |
|000023e0| 64 65 73 63 72 69 62 65 | 64 20 69 6e 20 74 68 65 |describe|d in the|
|000023f0| 20 66 6f 6c 6c 6f 77 69 | 6e 67 20 73 65 63 74 69 | followi|ng secti|
|00002400| 6f 6e 73 2e 0a 58 41 6c | 6c 20 66 75 6e 63 74 69 |ons..XAl|l functi|
|00002410| 6f 6e 73 20 72 65 74 75 | 72 6e 20 61 20 66 61 6c |ons retu|rn a fal|
|00002420| 73 65 20 6f 72 20 75 6e | 64 65 66 69 6e 65 64 20 |se or un|defined |
|00002430| 28 69 6e 20 74 68 65 20 | 5c 66 49 50 65 72 6c 5c |(in the |\fIPerl\|
|00002440| 66 50 20 73 65 6e 73 65 | 29 20 76 61 6c 75 65 0a |fP sense|) value.|
|00002450| 58 74 6f 20 69 6e 64 69 | 63 61 74 65 20 66 61 69 |Xto indi|cate fai|
|00002460| 6c 75 72 65 2e 0a 58 59 | 6f 75 20 64 6f 20 6e 6f |lure..XY|ou do no|
|00002470| 74 20 6e 65 65 64 20 74 | 6f 20 75 6e 64 65 72 73 |t need t|o unders|
|00002480| 74 61 6e 64 20 74 68 65 | 20 72 65 66 65 72 65 6e |tand the| referen|
|00002490| 63 65 73 20 74 6f 20 5c | 66 42 4f 43 49 5c 66 50 |ces to \|fBOCI\fP|
|000024a0| 0a 58 69 6e 20 74 68 65 | 73 65 20 64 65 73 63 72 |.Xin the|se descr|
|000024b0| 69 70 74 69 6f 6e 73 2e | 0a 58 54 68 65 79 20 61 |iptions.|.XThey a|
|000024c0| 72 65 20 68 65 72 65 20 | 74 6f 20 68 65 6c 70 20 |re here |to help |
|000024d0| 74 68 6f 73 65 20 77 68 | 6f 20 77 69 73 68 20 74 |those wh|o wish t|
|000024e0| 6f 20 65 78 74 65 6e 64 | 20 74 68 65 20 72 6f 75 |o extend| the rou|
|000024f0| 74 69 6e 65 73 0a 58 6f | 72 20 74 6f 20 70 6f 72 |tines.Xo|r to por|
|00002500| 74 20 74 68 65 6d 20 74 | 6f 20 6e 65 77 20 6d 61 |t them t|o new ma|
|00002510| 63 68 69 6e 65 73 2e 0a | 58 2e 5c 22 0a 58 2e 53 |chines..|X.\".X.S|
|00002520| 48 20 50 72 69 6e 63 69 | 70 61 6c 20 46 75 6e 63 |H Princi|pal Func|
|00002530| 74 69 6f 6e 73 0a 58 2e | 5c 22 0a 58 54 68 65 20 |tions.X.|\".XThe |
|00002540| 6d 61 69 6e 20 66 75 6e | 63 74 69 6f 6e 73 20 66 |main fun|ctions f|
|00002550| 6f 72 20 64 61 74 61 62 | 61 73 65 20 61 63 63 65 |or datab|ase acce|
|00002560| 73 73 20 61 72 65 0a 58 | 2e 49 52 20 26 6f 72 61 |ss are.X|.IR &ora|
|00002570| 5f 6c 6f 67 69 6e 28 29 | 20 2c 0a 58 2e 49 52 20 |_login()| ,.X.IR |
|00002580| 26 6f 72 61 5f 6f 70 65 | 6e 28 29 20 2c 0a 58 2e |&ora_ope|n() ,.X.|
|00002590| 49 52 20 26 6f 72 61 5f | 62 69 6e 64 28 29 20 2c |IR &ora_|bind() ,|
|000025a0| 0a 58 2e 49 52 20 26 6f | 72 61 5f 66 65 74 63 68 |.X.IR &o|ra_fetch|
|000025b0| 28 29 20 2c 0a 58 2e 49 | 52 20 26 6f 72 61 5f 63 |() ,.X.I|R &ora_c|
|000025c0| 6c 6f 73 65 28 29 20 2c | 0a 58 2e 49 20 26 6f 72 |lose() ,|.X.I &or|
|000025d0| 61 5f 64 6f 28 29 0a 58 | 61 6e 64 0a 58 2e 49 52 |a_do().X|and.X.IR|
|000025e0| 20 26 6f 72 61 5f 6c 6f | 67 6f 66 66 28 29 20 2e | &ora_lo|goff() .|
|000025f0| 0a 58 2e 5c 22 0a 58 2e | 53 48 20 22 24 6c 64 61 |.X.\".X.|SH "$lda|
|00002600| 20 3d 20 26 6f 72 61 5f | 6c 6f 67 69 6e 28 24 73 | = &ora_|login($s|
|00002610| 79 73 74 65 6d 5f 69 64 | 2c 20 24 75 73 65 72 6e |ystem_id|, $usern|
|00002620| 61 6d 65 2c 20 24 70 61 | 73 73 77 6f 72 64 29 22 |ame, $pa|ssword)"|
|00002630| 0a 58 2e 5c 22 0a 58 49 | 6e 20 6f 72 64 65 72 20 |.X.\".XI|n order |
|00002640| 74 6f 20 61 63 63 65 73 | 73 20 69 6e 66 6f 72 6d |to acces|s inform|
|00002650| 61 74 69 6f 6e 20 68 65 | 6c 64 20 77 69 74 68 69 |ation he|ld withi|
|00002660| 6e 20 61 6e 20 5c 66 49 | 4f 72 61 63 6c 65 5c 66 |n an \fI|Oracle\f|
|00002670| 50 20 64 61 74 61 62 61 | 73 65 2c 0a 58 61 20 70 |P databa|se,.Xa p|
|00002680| 72 6f 67 72 61 6d 20 6d | 75 73 74 20 66 69 72 73 |rogram m|ust firs|
|00002690| 74 20 6c 6f 67 20 69 6e | 20 74 6f 20 69 74 20 62 |t log in| to it b|
|000026a0| 79 20 63 61 6c 6c 69 6e | 67 20 74 68 65 20 5c 66 |y callin|g the \f|
|000026b0| 49 26 6f 72 61 5f 6c 6f | 67 69 6e 28 29 5c 66 50 |I&ora_lo|gin()\fP|
|000026c0| 20 66 75 6e 63 74 69 6f | 6e 2e 0a 58 54 68 69 73 | functio|n..XThis|
|000026d0| 20 66 75 6e 63 74 69 6f | 6e 20 69 73 20 63 61 6c | functio|n is cal|
|000026e0| 6c 65 64 20 77 69 74 68 | 20 74 68 72 65 65 20 70 |led with| three p|
|000026f0| 61 72 61 6d 65 74 65 72 | 73 2c 20 0a 58 74 68 65 |arameter|s, .Xthe|
|00002700| 20 73 79 73 74 65 6d 20 | 49 44 20 28 73 65 65 20 | system |ID (see |
|00002710| 62 65 6c 6f 77 29 20 6f | 66 20 74 68 65 20 5c 66 |below) o|f the \f|
|00002720| 49 4f 72 61 63 6c 65 5c | 66 50 20 64 61 74 61 62 |IOracle\|fP datab|
|00002730| 61 73 65 20 74 6f 20 62 | 65 20 75 73 65 64 2c 0a |ase to b|e used,.|
|00002740| 58 61 6e 64 20 74 68 65 | 20 5c 66 49 4f 72 61 63 |Xand the| \fIOrac|
|00002750| 6c 65 5c 66 50 20 75 73 | 65 72 6e 61 6d 65 20 61 |le\fP us|ername a|
|00002760| 6e 64 20 70 61 73 73 77 | 6f 72 64 2e 0a 58 54 68 |nd passw|ord..XTh|
|00002770| 65 20 76 61 6c 75 65 20 | 72 65 74 75 72 6e 65 64 |e value |returned|
|00002780| 20 69 73 20 61 20 6c 6f | 67 69 6e 20 69 64 65 6e | is a lo|gin iden|
|00002790| 74 69 66 69 65 72 0a 58 | 28 61 63 74 75 61 6c 6c |tifier.X|(actuall|
|000027a0| 79 20 61 6e 20 5c 66 49 | 4f 72 61 63 6c 65 5c 66 |y an \fI|Oracle\f|
|000027b0| 50 20 4c 6f 67 69 6e 20 | 44 61 74 61 20 41 72 65 |P Login |Data Are|
|000027c0| 61 29 20 72 65 66 65 72 | 72 65 64 20 74 6f 20 62 |a) refer|red to b|
|000027d0| 65 6c 6f 77 20 61 73 20 | 5c 66 49 24 6c 64 61 5c |elow as |\fI$lda\|
|000027e0| 66 50 2e 0a 58 0a 58 4d | 75 6c 74 69 70 6c 65 20 |fP..X.XM|ultiple |
|000027f0| 6c 6f 67 69 6e 73 20 6d | 61 79 20 62 65 20 61 63 |logins m|ay be ac|
|00002800| 74 69 76 65 20 73 69 6d | 75 6c 74 61 6e 65 6f 75 |tive sim|ultaneou|
|00002810| 73 6c 79 2e 0a 58 54 68 | 69 73 20 61 6c 6c 6f 77 |sly..XTh|is allow|
|00002820| 73 20 61 20 73 69 6d 70 | 6c 65 20 6d 65 63 68 61 |s a simp|le mecha|
|00002830| 6e 69 73 6d 20 66 6f 72 | 0a 58 63 6f 72 72 65 6c |nism for|.Xcorrel|
|00002840| 61 74 69 6e 67 20 6f 72 | 20 74 72 61 6e 73 66 65 |ating or| transfe|
|00002850| 72 72 69 6e 67 20 64 61 | 74 61 20 62 65 74 77 65 |rring da|ta betwe|
|00002860| 65 6e 20 64 61 74 61 62 | 61 73 65 73 2e 0a 58 0a |en datab|ases..X.|
|00002870| 58 4d 6f 73 74 20 5c 66 | 49 4f 72 61 63 6c 65 5c |XMost \f|IOracle\|
|00002880| 66 50 20 70 72 6f 67 72 | 61 6d 73 20 28 66 6f 72 |fP progr|ams (for|
|00002890| 20 65 78 61 6d 70 6c 65 | 2c 20 5c 66 49 53 51 4c | example|, \fISQL|
|000028a0| 2a 50 6c 75 73 5c 66 50 | 20 6f 72 20 5c 66 49 53 |*Plus\fP| or \fIS|
|000028b0| 51 4c 2a 46 6f 72 6d 73 | 5c 66 50 29 0a 58 65 78 |QL*Forms|\fP).Xex|
|000028c0| 61 6d 69 6e 65 20 74 68 | 65 20 65 6e 76 69 72 6f |amine th|e enviro|
|000028d0| 6e 6d 65 6e 74 20 76 61 | 72 69 61 62 6c 65 20 5c |nment va|riable \|
|000028e0| 66 42 4f 52 41 43 4c 45 | 5f 53 49 44 5c 66 50 0a |fBORACLE|_SID\fP.|
|000028f0| 58 74 6f 20 64 65 74 65 | 72 6d 69 6e 65 20 77 68 |Xto dete|rmine wh|
|00002900| 69 63 68 20 64 61 74 61 | 62 61 73 65 20 74 6f 20 |ich data|base to |
|00002910| 63 6f 6e 6e 65 63 74 20 | 74 6f 2e 0a 58 49 6e 20 |connect |to..XIn |
|00002920| 61 6e 20 65 6e 76 69 72 | 6f 6e 6d 65 6e 74 20 77 |an envir|onment w|
|00002930| 68 69 63 68 20 75 73 65 | 73 20 73 65 76 65 72 61 |hich use|s severa|
|00002940| 6c 20 64 69 66 66 65 72 | 65 6e 74 20 64 61 74 61 |l differ|ent data|
|00002950| 62 61 73 65 73 2c 0a 58 | 69 74 20 69 73 20 65 61 |bases,.X|it is ea|
|00002960| 73 79 20 74 6f 20 6d 61 | 6b 65 20 61 20 6d 69 73 |sy to ma|ke a mis|
|00002970| 74 61 6b 65 2c 20 61 6e | 64 20 61 74 74 65 6d 70 |take, an|d attemp|
|00002980| 74 20 74 6f 20 72 75 6e | 20 61 20 70 72 6f 67 72 |t to run| a progr|
|00002990| 61 6d 20 6f 6e 20 74 68 | 65 20 77 72 6f 6e 67 20 |am on th|e wrong |
|000029a0| 6f 6e 65 2e 0a 58 41 6c | 73 6f 2c 20 69 74 20 69 |one..XAl|so, it i|
|000029b0| 73 20 63 75 6d 62 65 72 | 73 6f 6d 65 20 74 6f 20 |s cumber|some to |
|000029c0| 63 72 65 61 74 65 20 61 | 20 70 72 6f 67 72 61 6d |create a| program|
|000029d0| 0a 58 77 68 69 63 68 20 | 77 6f 72 6b 73 20 77 69 |.Xwhich |works wi|
|000029e0| 74 68 20 6d 6f 72 65 20 | 74 68 61 6e 20 6f 6e 65 |th more |than one|
|000029f0| 20 64 61 74 61 62 61 73 | 65 20 73 69 6d 75 6c 74 | databas|e simult|
|00002a00| 61 6e 65 6f 75 73 6c 79 | 2e 0a 58 54 68 65 72 65 |aneously|..XThere|
|00002a10| 66 6f 72 65 2c 20 5c 66 | 49 4f 72 61 70 65 72 6c |fore, \f|IOraperl|
|00002a20| 5c 66 50 20 72 65 71 75 | 69 72 65 73 20 74 68 65 |\fP requ|ires the|
|00002a30| 20 73 79 73 74 65 6d 20 | 49 44 20 74 6f 20 62 65 | system |ID to be|
|00002a40| 20 70 61 73 73 65 64 20 | 61 73 20 61 20 70 61 72 | passed |as a par|
|00002a50| 61 6d 65 74 65 72 2e 0a | 58 48 6f 77 65 76 65 72 |ameter..|XHowever|
|00002a60| 2c 20 69 66 20 74 68 65 | 20 73 79 73 74 65 6d 20 |, if the| system |
|00002a70| 49 44 20 70 61 72 61 6d | 65 74 65 72 20 69 73 20 |ID param|eter is |
|00002a80| 61 6e 20 65 6d 70 74 79 | 20 73 74 72 69 6e 67 0a |an empty| string.|
|00002a90| 58 74 68 65 6e 20 5c 66 | 49 4f 72 61 70 65 72 6c |Xthen \f|IOraperl|
|00002aa0| 5c 66 50 20 77 69 6c 6c | 20 75 73 65 20 74 68 65 |\fP will| use the|
|00002ab0| 20 65 78 69 73 74 69 6e | 67 20 76 61 6c 75 65 20 | existin|g value |
|00002ac0| 6f 66 20 5c 66 42 4f 52 | 41 43 4c 45 5f 53 49 44 |of \fBOR|ACLE_SID|
|00002ad0| 5c 66 50 2e 0a 58 0a 58 | 2e 6e 65 20 34 0a 58 45 |\fP..X.X|.ne 4.XE|
|00002ae0| 78 61 6d 70 6c 65 3a 0a | 58 0a 58 2e 69 66 20 74 |xample:.|X.X.if t|
|00002af0| 20 2e 66 74 20 43 57 0a | 58 2e 74 69 20 2b 2e 35 | .ft CW.|X.ti +.5|
|00002b00| 69 0a 58 24 6c 64 61 20 | 3d 20 26 6f 72 61 5f 6c |i.X$lda |= &ora_l|
|00002b10| 6f 67 69 6e 28 27 70 65 | 72 73 6f 6e 6e 65 6c 27 |ogin('pe|rsonnel'|
|00002b20| 2c 20 27 73 63 6f 74 74 | 27 2c 20 27 74 69 67 65 |, 'scott|', 'tige|
|00002b30| 72 27 29 0a 58 2e 74 69 | 20 2b 31 69 0a 58 5c 26 |r').X.ti| +1i.X\&|
|00002b40| 7c 7c 20 64 69 65 20 24 | 6f 72 61 5f 65 72 72 73 ||| die $|ora_errs|
|00002b50| 74 72 3b 0a 58 2e 69 66 | 20 74 20 2e 66 74 20 50 |tr;.X.if| t .ft P|
|00002b60| 0a 58 0a 58 54 68 69 73 | 20 66 75 6e 63 74 69 6f |.X.XThis| functio|
|00002b70| 6e 20 69 73 20 65 71 75 | 69 76 61 6c 65 6e 74 20 |n is equ|ivalent |
|00002b80| 74 6f 20 74 68 65 20 5c | 66 49 4f 43 49 20 6f 6c |to the \|fIOCI ol|
|00002b90| 6f 6e 5c 66 50 20 61 6e | 64 20 5c 66 49 6f 72 6c |on\fP an|d \fIorl|
|00002ba0| 6f 6e 5c 66 50 20 66 75 | 6e 63 74 69 6f 6e 73 2e |on\fP fu|nctions.|
|00002bb0| 0a 58 52 65 61 6c 6c 79 | 2c 20 69 74 20 73 68 6f |.XReally|, it sho|
|00002bc0| 75 6c 64 20 68 61 76 65 | 20 62 65 65 6e 20 63 61 |uld have| been ca|
|00002bd0| 6c 6c 65 64 20 5c 66 49 | 26 6f 72 61 5f 6c 6f 67 |lled \fI|&ora_log|
|00002be0| 6f 6e 28 29 5c 66 50 2c | 0a 58 62 75 74 20 49 20 |on()\fP,|.Xbut I |
|00002bf0| 6d 61 64 65 20 74 68 65 | 20 6d 69 73 74 61 6b 65 |made the| mistake|
|00002c00| 20 61 20 6c 6f 6e 67 20 | 74 69 6d 65 20 61 67 6f | a long |time ago|
|00002c10| 0a 58 61 6e 64 20 66 69 | 78 69 6e 67 20 69 74 20 |.Xand fi|xing it |
|00002c20| 77 6f 75 6c 64 20 62 72 | 65 61 6b 20 74 6f 6f 20 |would br|eak too |
|00002c30| 6d 61 6e 79 20 65 78 69 | 73 74 69 6e 67 20 70 72 |many exi|sting pr|
|00002c40| 6f 67 72 61 6d 73 2e 0a | 58 2e 5c 22 0a 58 2e 53 |ograms..|X.\".X.S|
|00002c50| 48 20 22 24 63 73 72 20 | 3d 20 26 6f 72 61 5f 6f |H "$csr |= &ora_o|
|00002c60| 70 65 6e 28 24 6c 64 61 | 2c 20 24 73 74 61 74 65 |pen($lda|, $state|
|00002c70| 6d 65 6e 74 20 5b 2c 20 | 24 63 61 63 68 65 5d 29 |ment [, |$cache])|
|00002c80| 22 0a 58 2e 5c 22 0a 58 | 54 6f 20 73 70 65 63 69 |".X.\".X|To speci|
|00002c90| 66 79 20 61 6e 20 5c 66 | 49 53 51 4c 5c 66 50 20 |fy an \f|ISQL\fP |
|00002ca0| 73 74 61 74 65 6d 65 6e | 74 20 74 6f 20 62 65 20 |statemen|t to be |
|00002cb0| 65 78 65 63 75 74 65 64 | 2c 0a 58 74 68 65 20 70 |executed|,.Xthe p|
|00002cc0| 72 6f 67 72 61 6d 20 6d | 75 73 74 20 63 61 6c 6c |rogram m|ust call|
|00002cd0| 20 74 68 65 20 5c 66 49 | 26 6f 72 61 5f 6f 70 65 | the \fI|&ora_ope|
|00002ce0| 6e 28 29 5c 66 50 20 66 | 75 6e 63 74 69 6f 6e 2e |n()\fP f|unction.|
|00002cf0| 0a 58 54 68 69 73 20 66 | 75 6e 63 74 69 6f 6e 20 |.XThis f|unction |
|00002d00| 74 61 6b 65 73 20 61 74 | 20 6c 65 61 73 74 20 74 |takes at| least t|
|00002d10| 77 6f 20 70 61 72 61 6d | 65 74 65 72 73 3a 0a 58 |wo param|eters:.X|
|00002d20| 61 20 6c 6f 67 69 6e 20 | 69 64 65 6e 74 69 66 69 |a login |identifi|
|00002d30| 65 72 20 28 6f 62 74 61 | 69 6e 65 64 20 66 72 6f |er (obta|ined fro|
|00002d40| 6d 20 5c 66 49 26 6f 72 | 61 5f 6c 6f 67 69 6e 28 |m \fI&or|a_login(|
|00002d50| 29 5c 66 50 29 0a 58 61 | 6e 64 20 74 68 65 20 5c |)\fP).Xa|nd the \|
|00002d60| 66 49 53 51 4c 5c 66 50 | 20 73 74 61 74 65 6d 65 |fISQL\fP| stateme|
|00002d70| 6e 74 20 74 6f 20 62 65 | 20 65 78 65 63 75 74 65 |nt to be| execute|
|00002d80| 64 2e 0a 58 41 6e 20 6f | 70 74 69 6f 6e 61 6c 20 |d..XAn o|ptional |
|00002d90| 74 68 69 72 64 20 70 61 | 72 61 6d 65 74 65 72 0a |third pa|rameter.|
|00002da0| 58 73 70 65 63 69 66 69 | 65 73 20 74 68 65 20 73 |Xspecifi|es the s|
|00002db0| 69 7a 65 20 6f 66 20 74 | 68 65 20 72 6f 77 20 63 |ize of t|he row c|
|00002dc0| 61 63 68 65 20 74 6f 20 | 62 65 20 75 73 65 64 20 |ache to |be used |
|00002dd0| 66 6f 72 20 61 20 5c 66 | 49 53 45 4c 45 43 54 5c |for a \f|ISELECT\|
|00002de0| 66 50 20 73 74 61 74 65 | 6d 65 6e 74 2e 0a 58 54 |fP state|ment..XT|
|00002df0| 68 65 20 76 61 6c 75 65 | 20 72 65 74 75 72 6e 65 |he value| returne|
|00002e00| 64 20 66 72 6f 6d 20 5c | 66 49 26 6f 72 61 5f 6f |d from \|fI&ora_o|
|00002e10| 70 65 6e 28 29 5c 66 50 | 20 69 73 20 61 20 73 74 |pen()\fP| is a st|
|00002e20| 61 74 65 6d 65 6e 74 20 | 69 64 65 6e 74 69 66 69 |atement |identifi|
|00002e30| 65 72 0a 58 28 61 63 74 | 75 61 6c 6c 79 20 61 6e |er.X(act|ually an|
|00002e40| 20 5c 66 49 4f 52 41 43 | 4c 45 5c 66 50 20 43 75 | \fIORAC|LE\fP Cu|
|00002e50| 72 73 6f 72 29 20 72 65 | 66 65 72 72 65 64 20 74 |rsor) re|ferred t|
|00002e60| 6f 20 62 65 6c 6f 77 20 | 61 73 20 5c 66 49 24 63 |o below |as \fI$c|
|00002e70| 73 72 5c 66 50 2e 0a 58 | 0a 58 49 66 20 74 68 65 |sr\fP..X|.XIf the|
|00002e80| 20 72 6f 77 20 63 61 63 | 68 65 20 73 69 7a 65 20 | row cac|he size |
|00002e90| 69 73 20 6e 6f 74 20 73 | 70 65 63 69 66 69 65 64 |is not s|pecified|
|00002ea0| 2c 20 61 20 64 65 66 61 | 75 6c 74 20 73 69 7a 65 |, a defa|ult size|
|00002eb0| 20 69 73 20 75 73 65 64 | 2e 0a 58 41 73 20 64 69 | is used|..XAs di|
|00002ec0| 73 74 72 69 62 75 74 65 | 64 2c 20 74 68 65 20 64 |stribute|d, the d|
|00002ed0| 65 66 61 75 6c 74 20 69 | 73 20 66 69 76 65 20 72 |efault i|s five r|
|00002ee0| 6f 77 73 2c 0a 58 62 75 | 74 20 74 68 69 73 20 6d |ows,.Xbu|t this m|
|00002ef0| 61 79 20 68 61 76 65 20 | 62 65 65 6e 20 63 68 61 |ay have |been cha|
|00002f00| 6e 67 65 64 20 61 74 20 | 79 6f 75 72 20 69 6e 73 |nged at |your ins|
|00002f10| 74 61 6c 6c 61 74 69 6f | 6e 0a 58 28 73 65 65 20 |tallatio|n.X(see |
|00002f20| 74 68 65 20 5c 66 49 26 | 6f 72 61 5f 76 65 72 73 |the \fI&|ora_vers|
|00002f30| 69 6f 6e 28 29 5c 66 50 | 20 66 75 6e 63 74 69 6f |ion()\fP| functio|
|00002f40| 6e 20 61 6e 64 20 5c 66 | 49 24 6f 72 61 5f 63 61 |n and \f|I$ora_ca|
|00002f50| 63 68 65 5c 66 50 20 76 | 61 72 69 61 62 6c 65 20 |che\fP v|ariable |
|00002f60| 62 65 6c 6f 77 29 2e 0a | 58 0a 58 2e 6e 65 20 36 |below)..|X.X.ne 6|
|00002f70| 0a 58 45 78 61 6d 70 6c | 65 73 3a 0a 58 0a 58 2e |.XExampl|es:.X.X.|
|00002f80| 69 66 20 74 20 2e 66 74 | 20 43 57 0a 58 2e 74 69 |if t .ft| CW.X.ti|
|00002f90| 20 2b 2e 35 69 0a 58 24 | 63 73 72 20 3d 20 26 6f | +.5i.X$|csr = &o|
|00002fa0| 72 61 5f 6f 70 65 6e 28 | 24 6c 64 61 2c 0a 58 2e |ra_open(|$lda,.X.|
|00002fb0| 74 69 20 2b 31 69 0a 58 | 5c 26 27 73 65 6c 65 63 |ti +1i.X|\&'selec|
|00002fc0| 74 20 65 6e 61 6d 65 2c | 20 73 61 6c 20 66 72 6f |t ename,| sal fro|
|00002fd0| 6d 20 65 6d 70 20 6f 72 | 64 65 72 20 62 79 20 65 |m emp or|der by e|
|00002fe0| 6e 61 6d 65 27 2c 20 31 | 30 29 3b 0a 58 2e 74 69 |name', 1|0);.X.ti|
|00002ff0| 20 2b 2e 35 69 0a 58 24 | 63 73 72 20 3d 20 26 6f | +.5i.X$|csr = &o|
|00003000| 72 61 5f 6f 70 65 6e 28 | 24 6c 64 61 2c 0a 58 2e |ra_open(|$lda,.X.|
|00003010| 74 69 20 2b 31 69 0a 58 | 5c 26 27 69 6e 73 65 72 |ti +1i.X|\&'inser|
|00003020| 74 20 69 6e 74 6f 20 64 | 65 70 74 20 76 61 6c 75 |t into d|ept valu|
|00003030| 65 73 28 3a 31 2c 20 3a | 32 2c 20 3a 33 29 27 29 |es(:1, :|2, :3)')|
|00003040| 3b 0a 58 2e 69 66 20 74 | 20 2e 66 74 20 50 0a 58 |;.X.if t| .ft P.X|
|00003050| 0a 58 54 68 69 73 20 66 | 75 6e 63 74 69 6f 6e 20 |.XThis f|unction |
|00003060| 69 73 20 65 71 75 69 76 | 61 6c 65 6e 74 20 74 6f |is equiv|alent to|
|00003070| 20 74 68 65 20 5c 66 49 | 4f 43 49 20 6f 6f 70 65 | the \fI|OCI oope|
|00003080| 6e 5c 66 50 20 61 6e 64 | 20 5c 66 49 6f 73 71 6c |n\fP and| \fIosql|
|00003090| 33 5c 66 50 20 66 75 6e | 63 74 69 6f 6e 73 2e 0a |3\fP fun|ctions..|
|000030a0| 58 46 6f 72 20 73 74 61 | 74 65 6d 65 6e 74 73 20 |XFor sta|tements |
|000030b0| 77 68 69 63 68 20 64 6f | 20 6e 6f 74 20 63 6f 6e |which do| not con|
|000030c0| 74 61 69 6e 20 73 75 62 | 73 74 69 74 75 74 69 6f |tain sub|stitutio|
|000030d0| 6e 20 76 61 72 69 61 62 | 6c 65 73 0a 58 28 73 65 |n variab|les.X(se|
|000030e0| 65 20 74 68 65 20 73 65 | 63 74 69 6f 6e 20 5c 66 |e the se|ction \f|
|000030f0| 42 53 75 62 73 74 69 74 | 75 74 69 6f 6e 20 56 61 |BSubstit|ution Va|
|00003100| 72 69 61 62 6c 65 73 5c | 66 50 20 62 65 6c 6f 77 |riables\|fP below|
|00003110| 29 2c 0a 58 69 74 20 61 | 6c 73 6f 20 75 73 65 73 |),.Xit a|lso uses|
|00003120| 20 6f 66 20 74 68 65 20 | 5c 66 49 6f 65 78 65 63 | of the |\fIoexec|
|00003130| 5c 66 50 20 66 75 6e 63 | 74 69 6f 6e 2e 0a 58 46 |\fP func|tion..XF|
|00003140| 6f 72 20 5c 66 42 53 45 | 4c 45 43 54 5c 66 50 20 |or \fBSE|LECT\fP |
|00003150| 73 74 61 74 65 6d 65 6e | 74 73 2c 0a 58 69 74 20 |statemen|ts,.Xit |
|00003160| 61 6c 73 6f 20 6d 61 6b | 65 73 20 75 73 65 20 6f |also mak|es use o|
|00003170| 66 20 74 68 65 20 5c 66 | 49 6f 64 73 63 5c 66 50 |f the \f|Iodsc\fP|
|00003180| 20 61 6e 64 20 5c 66 49 | 6f 64 65 66 69 6e 5c 66 | and \fI|odefin\f|
|00003190| 50 20 66 75 6e 63 74 69 | 6f 6e 73 0a 58 74 6f 20 |P functi|ons.Xto |
|000031a0| 61 6c 6c 6f 63 61 74 65 | 20 6d 65 6d 6f 72 79 20 |allocate| memory |
|000031b0| 66 6f 72 20 74 68 65 20 | 76 61 6c 75 65 73 20 74 |for the |values t|
|000031c0| 6f 20 62 65 20 72 65 74 | 75 72 6e 65 64 20 66 72 |o be ret|urned fr|
|000031d0| 6f 6d 20 74 68 65 20 64 | 61 74 61 62 61 73 65 2e |om the d|atabase.|
|000031e0| 0a 58 2e 5c 22 0a 58 2e | 53 48 20 22 26 6f 72 61 |.X.\".X.|SH "&ora|
|000031f0| 5f 62 69 6e 64 28 24 63 | 73 72 2c 20 24 76 61 72 |_bind($c|sr, $var|
|00003200| 2c 20 2e 2e 2e 29 22 0a | 58 2e 5c 22 0a 58 49 66 |, ...)".|X.\".XIf|
|00003210| 20 61 6e 20 53 51 4c 20 | 73 74 61 74 65 6d 65 6e | an SQL |statemen|
|00003220| 74 20 63 6f 6e 74 61 69 | 6e 73 20 73 75 62 73 74 |t contai|ns subst|
|00003230| 69 74 75 74 69 6f 6e 20 | 76 61 72 69 61 62 6c 65 |itution |variable|
|00003240| 73 0a 58 28 73 65 65 20 | 74 68 65 20 73 65 63 74 |s.X(see |the sect|
|00003250| 69 6f 6e 20 5c 66 42 53 | 75 62 73 74 69 74 75 74 |ion \fBS|ubstitut|
|00003260| 69 6f 6e 20 56 61 72 69 | 61 62 6c 65 73 5c 66 50 |ion Vari|ables\fP|
|00003270| 20 62 65 6c 6f 77 29 2c | 0a 58 5c 66 49 26 6f 72 | below),|.X\fI&or|
|00003280| 61 5f 62 69 6e 64 28 29 | 5c 66 50 20 69 73 20 75 |a_bind()|\fP is u|
|00003290| 73 65 64 20 74 6f 20 61 | 73 73 69 67 6e 20 61 63 |sed to a|ssign ac|
|000032a0| 74 75 61 6c 20 76 61 6c | 75 65 73 20 74 6f 20 74 |tual val|ues to t|
|000032b0| 68 65 6d 2e 0a 58 54 68 | 69 73 20 66 75 6e 63 74 |hem..XTh|is funct|
|000032c0| 69 6f 6e 20 74 61 6b 65 | 73 20 61 20 73 74 61 74 |ion take|s a stat|
|000032d0| 65 6d 65 6e 74 20 69 64 | 65 6e 74 69 66 69 65 72 |ement id|entifier|
|000032e0| 20 28 6f 62 74 61 69 6e | 65 64 20 66 72 6f 6d 20 | (obtain|ed from |
|000032f0| 5c 66 49 26 6f 72 61 5f | 6f 70 65 6e 28 29 5c 66 |\fI&ora_|open()\f|
|00003300| 50 29 0a 58 61 73 20 69 | 74 73 20 66 69 72 73 74 |P).Xas i|ts first|
|00003310| 20 70 61 72 61 6d 65 74 | 65 72 2c 0a 58 66 6f 6c | paramet|er,.Xfol|
|00003320| 6c 6f 77 65 64 20 62 79 | 20 61 73 20 6d 61 6e 79 |lowed by| as many|
|00003330| 20 70 61 72 61 6d 65 74 | 65 72 73 20 61 73 20 61 | paramet|ers as a|
|00003340| 72 65 20 72 65 71 75 69 | 72 65 64 20 62 79 20 74 |re requi|red by t|
|00003350| 68 65 20 73 74 61 74 65 | 6d 65 6e 74 2e 0a 58 0a |he state|ment..X.|
|00003360| 58 2e 6e 65 20 33 0a 58 | 45 78 61 6d 70 6c 65 3a |X.ne 3.X|Example:|
|00003370| 0a 58 0a 58 2e 74 69 20 | 2b 2e 35 69 0a 58 2e 69 |.X.X.ti |+.5i.X.i|
|00003380| 66 20 74 20 2e 66 74 20 | 43 57 0a 58 26 6f 72 61 |f t .ft |CW.X&ora|
|00003390| 5f 62 69 6e 64 28 24 63 | 73 72 2c 20 35 30 2c 20 |_bind($c|sr, 50, |
|000033a0| 27 6d 61 6e 61 67 65 6d | 65 6e 74 27 2c 20 27 50 |'managem|ent', 'P|
|000033b0| 61 72 69 73 27 29 3b 0a | 58 2e 69 66 20 74 20 2e |aris');.|X.if t .|
|000033c0| 66 74 20 50 0a 58 0a 58 | 54 68 69 73 20 66 75 6e |ft P.X.X|This fun|
|000033d0| 63 74 69 6f 6e 20 69 73 | 20 65 71 75 69 76 61 6c |ction is| equival|
|000033e0| 65 6e 74 20 74 6f 20 74 | 68 65 20 5c 66 49 4f 43 |ent to t|he \fIOC|
|000033f0| 49 20 6f 62 6e 64 72 6e | 5c 66 50 20 61 6e 64 20 |I obndrn|\fP and |
|00003400| 5c 66 49 6f 65 78 65 63 | 5c 66 50 20 73 74 61 74 |\fIoexec|\fP stat|
|00003410| 65 6d 65 6e 74 73 2e 0a | 58 0a 58 54 68 65 20 5c |ements..|X.XThe \|
|00003420| 66 49 4f 43 49 20 6f 62 | 6e 64 72 6e 5c 66 50 20 |fIOCI ob|ndrn\fP |
|00003430| 66 75 6e 63 74 69 6f 6e | 20 64 6f 65 73 20 6e 6f |function| does no|
|00003440| 74 20 61 6c 6c 6f 77 20 | 65 6d 70 74 79 20 73 74 |t allow |empty st|
|00003450| 72 69 6e 67 73 20 74 6f | 20 62 65 20 62 6f 75 6e |rings to| be boun|
|00003460| 64 2e 0a 58 41 73 20 64 | 69 73 74 72 69 62 75 74 |d..XAs d|istribut|
|00003470| 65 64 2c 20 5c 66 49 24 | 6f 72 61 5f 62 69 6e 64 |ed, \fI$|ora_bind|
|00003480| 5c 66 50 20 74 68 65 72 | 65 66 6f 72 65 20 72 65 |\fP ther|efore re|
|00003490| 70 6c 61 63 65 73 20 65 | 6d 70 74 79 20 73 74 72 |places e|mpty str|
|000034a0| 69 6e 67 73 0a 58 77 69 | 74 68 20 61 20 73 69 6e |ings.Xwi|th a sin|
|000034b0| 67 6c 65 20 73 70 61 63 | 65 2e 0a 58 48 6f 77 65 |gle spac|e..XHowe|
|000034c0| 76 65 72 2c 20 61 20 63 | 6f 6d 70 69 6c 61 74 69 |ver, a c|ompilati|
|000034d0| 6f 6e 20 6f 70 74 69 6f | 6e 20 61 6c 6c 6f 77 73 |on optio|n allows|
|000034e0| 20 74 68 69 73 20 73 75 | 62 73 74 69 74 75 74 69 | this su|bstituti|
|000034f0| 6f 6e 20 74 6f 20 62 65 | 20 73 75 70 70 72 65 73 |on to be| suppres|
|00003500| 73 65 64 2c 0a 58 63 61 | 75 73 69 6e 67 20 5c 66 |sed,.Xca|using \f|
|00003510| 49 26 6f 72 61 5f 62 69 | 6e 64 28 29 5c 66 50 20 |I&ora_bi|nd()\fP |
|00003520| 74 6f 20 66 61 69 6c 2e | 0a 58 54 68 65 20 6f 75 |to fail.|.XThe ou|
|00003530| 74 70 75 74 20 66 72 6f | 6d 20 74 68 65 20 5c 66 |tput fro|m the \f|
|00003540| 49 26 6f 72 61 5f 76 65 | 72 73 69 6f 6e 28 29 5c |I&ora_ve|rsion()\|
|00003550| 66 50 20 66 75 6e 63 74 | 69 6f 6e 0a 58 73 70 65 |fP funct|ion.Xspe|
|00003560| 63 69 66 69 65 73 20 77 | 68 69 63 68 20 69 73 20 |cifies w|hich is |
|00003570| 74 68 65 20 63 61 73 65 | 20 61 74 20 79 6f 75 72 |the case| at your|
|00003580| 20 69 6e 73 74 61 6c 6c | 61 74 69 6f 6e 2e 0a 58 | install|ation..X|
|00003590| 2e 5c 22 0a 58 2e 53 48 | 20 22 24 6e 66 69 65 6c |.\".X.SH| "$nfiel|
|000035a0| 64 73 20 3d 20 26 6f 72 | 61 5f 66 65 74 63 68 28 |ds = &or|a_fetch(|
|000035b0| 24 63 73 72 29 22 0a 58 | 2e 53 48 20 22 40 64 61 |$csr)".X|.SH "@da|
|000035c0| 74 61 20 3d 20 26 6f 72 | 61 5f 66 65 74 63 68 28 |ta = &or|a_fetch(|
|000035d0| 24 63 73 72 20 5b 2c 20 | 24 74 72 75 6e 63 5d 29 |$csr [, |$trunc])|
|000035e0| 22 0a 58 2e 5c 22 0a 58 | 54 68 65 20 5c 66 49 26 |".X.\".X|The \fI&|
|000035f0| 6f 72 61 5f 66 65 74 63 | 68 28 29 5c 66 50 20 66 |ora_fetc|h()\fP f|
|00003600| 75 6e 63 74 69 6f 6e 20 | 69 73 20 75 73 65 64 0a |unction |is used.|
|00003610| 58 69 6e 20 63 6f 6e 6a | 75 6e 63 74 69 6f 6e 20 |Xin conj|unction |
|00003620| 77 69 74 68 20 61 20 5c | 66 42 53 51 4c 20 53 45 |with a \|fBSQL SE|
|00003630| 4c 45 43 54 5c 66 50 20 | 73 74 61 74 65 6d 65 6e |LECT\fP |statemen|
|00003640| 74 0a 58 74 6f 20 72 65 | 74 72 69 65 76 65 20 69 |t.Xto re|trieve i|
|00003650| 6e 66 6f 72 6d 61 74 69 | 6f 6e 20 66 72 6f 6d 20 |nformati|on from |
|00003660| 61 20 64 61 74 61 62 61 | 73 65 2e 0a 58 54 68 69 |a databa|se..XThi|
|00003670| 73 20 66 75 6e 63 74 69 | 6f 6e 20 74 61 6b 65 73 |s functi|on takes|
|00003680| 20 6f 6e 65 20 6d 61 6e | 64 61 74 6f 72 79 20 70 | one man|datory p|
|00003690| 61 72 61 6d 65 74 65 72 | 2c 0a 58 61 20 73 74 61 |arameter|,.Xa sta|
|000036a0| 74 65 6d 65 6e 74 20 69 | 64 65 6e 74 69 66 69 65 |tement i|dentifie|
|000036b0| 72 20 28 6f 62 74 61 69 | 6e 65 64 20 66 72 6f 6d |r (obtai|ned from|
|000036c0| 20 5c 66 49 26 6f 72 61 | 5f 6f 70 65 6e 28 29 5c | \fI&ora|_open()\|
|000036d0| 66 50 29 2e 0a 58 0a 58 | 55 73 65 64 20 69 6e 20 |fP)..X.X|Used in |
|000036e0| 61 20 73 63 61 6c 61 72 | 20 63 6f 6e 74 65 78 74 |a scalar| context|
|000036f0| 2c 0a 58 74 68 65 20 66 | 75 6e 63 74 69 6f 6e 20 |,.Xthe f|unction |
|00003700| 72 65 74 75 72 6e 73 20 | 74 68 65 20 6e 75 6d 62 |returns |the numb|
|00003710| 65 72 20 6f 66 20 66 69 | 65 6c 64 73 20 72 65 74 |er of fi|elds ret|
|00003720| 75 72 6e 65 64 20 62 79 | 20 74 68 65 20 71 75 65 |urned by| the que|
|00003730| 72 79 0a 58 62 75 74 20 | 6e 6f 20 64 61 74 61 20 |ry.Xbut |no data |
|00003740| 69 73 20 61 63 74 75 61 | 6c 6c 79 20 66 65 74 63 |is actua|lly fetc|
|00003750| 68 65 64 2e 0a 58 54 68 | 69 73 20 6d 61 79 20 62 |hed..XTh|is may b|
|00003760| 65 20 75 73 65 66 75 6c | 20 69 6e 20 61 20 70 72 |e useful| in a pr|
|00003770| 6f 67 72 61 6d 0a 58 77 | 68 69 63 68 20 61 6c 6c |ogram.Xw|hich all|
|00003780| 6f 77 73 20 61 20 75 73 | 65 72 20 74 6f 20 65 6e |ows a us|er to en|
|00003790| 74 65 72 20 61 20 73 74 | 61 74 65 6d 65 6e 74 20 |ter a st|atement |
|000037a0| 69 6e 74 65 72 61 63 74 | 69 76 65 6c 79 2e 0a 58 |interact|ively..X|
|000037b0| 0a 58 2e 6e 65 20 33 0a | 58 45 78 61 6d 70 6c 65 |.X.ne 3.|XExample|
|000037c0| 3a 0a 58 0a 58 2e 74 69 | 20 2b 2e 35 69 0a 58 2e |:.X.X.ti| +.5i.X.|
|000037d0| 69 66 20 74 20 2e 66 74 | 20 43 57 0a 58 24 6e 66 |if t .ft| CW.X$nf|
|000037e0| 69 65 6c 64 73 20 3d 20 | 26 6f 72 61 5f 66 65 74 |ields = |&ora_fet|
|000037f0| 63 68 28 24 63 73 72 29 | 3b 0a 58 2e 69 66 20 74 |ch($csr)|;.X.if t|
|00003800| 20 2e 66 74 20 50 0a 58 | 0a 58 55 73 65 64 20 69 | .ft P.X|.XUsed i|
|00003810| 6e 20 61 6e 20 61 72 72 | 61 79 20 63 6f 6e 74 65 |n an arr|ay conte|
|00003820| 78 74 2c 0a 58 74 68 65 | 20 76 61 6c 75 65 20 72 |xt,.Xthe| value r|
|00003830| 65 74 75 72 6e 65 64 20 | 69 73 20 61 6e 20 61 72 |eturned |is an ar|
|00003840| 72 61 79 20 63 6f 6e 74 | 61 69 6e 69 6e 67 20 74 |ray cont|aining t|
|00003850| 68 65 20 64 61 74 61 2c | 20 6f 6e 65 20 65 6c 65 |he data,| one ele|
|00003860| 6d 65 6e 74 20 70 65 72 | 20 66 69 65 6c 64 2e 0a |ment per| field..|
|00003870| 58 0a 58 41 6e 20 6f 70 | 74 69 6f 6e 61 6c 20 73 |X.XAn op|tional s|
|00003880| 65 63 6f 6e 64 20 70 61 | 72 61 6d 65 74 65 72 20 |econd pa|rameter |
|00003890| 6d 61 79 20 62 65 20 73 | 75 70 70 6c 69 65 64 0a |may be s|upplied.|
|000038a0| 58 74 6f 20 69 6e 64 69 | 63 61 74 65 20 77 68 65 |Xto indi|cate whe|
|000038b0| 74 68 65 72 20 74 68 65 | 20 74 72 75 6e 63 61 74 |ther the| truncat|
|000038c0| 69 6f 6e 20 6f 66 20 61 | 20 5c 66 42 4c 4f 4e 47 |ion of a| \fBLONG|
|000038d0| 5c 66 50 20 6f 72 20 5c | 66 42 4c 4f 4e 47 52 41 |\fP or \|fBLONGRA|
|000038e0| 57 5c 66 50 20 66 69 65 | 6c 64 0a 58 69 73 20 74 |W\fP fie|ld.Xis t|
|000038f0| 6f 20 62 65 20 70 65 72 | 6d 69 74 74 65 64 20 28 |o be per|mitted (|
|00003900| 6e 6f 6e 5c 2d 7a 65 72 | 6f 29 0a 58 6f 72 20 63 |non\-zer|o).Xor c|
|00003910| 6f 6e 73 69 64 65 72 65 | 64 20 61 6e 20 65 72 72 |onsidere|d an err|
|00003920| 6f 72 20 28 7a 65 72 6f | 29 2e 0a 58 49 66 20 74 |or (zero|)..XIf t|
|00003930| 68 69 73 20 70 61 72 61 | 6d 65 74 65 72 20 69 73 |his para|meter is|
|00003940| 20 6e 6f 74 20 73 70 65 | 63 69 66 69 65 64 2c 0a | not spe|cified,.|
|00003950| 58 74 68 65 20 76 61 6c | 75 65 20 6f 66 20 74 68 |Xthe val|ue of th|
|00003960| 65 20 67 6c 6f 62 61 6c | 20 76 61 72 69 61 62 6c |e global| variabl|
|00003970| 65 20 5c 66 49 24 6f 72 | 61 5f 74 72 75 6e 63 5c |e \fI$or|a_trunc\|
|00003980| 66 50 20 69 73 20 75 73 | 65 64 20 69 6e 73 74 65 |fP is us|ed inste|
|00003990| 61 64 2e 0a 58 54 72 75 | 6e 63 61 74 69 6f 6e 20 |ad..XTru|ncation |
|000039a0| 6f 66 20 6f 74 68 65 72 | 20 64 61 74 61 74 79 70 |of other| datatyp|
|000039b0| 65 73 20 69 73 20 61 6c | 77 61 79 73 20 63 6f 6e |es is al|ways con|
|000039c0| 73 69 64 65 72 65 64 20 | 61 20 65 72 72 6f 72 2e |sidered |a error.|
|000039d0| 0a 58 0a 58 49 66 20 74 | 72 75 6e 63 61 74 69 6f |.X.XIf t|runcatio|
|000039e0| 6e 20 6f 63 63 75 72 73 | 2c 20 5c 66 49 24 6f 72 |n occurs|, \fI$or|
|000039f0| 61 5f 65 72 72 6e 6f 5c | 66 50 20 77 69 6c 6c 20 |a_errno\|fP will |
|00003a00| 62 65 20 73 65 74 20 74 | 6f 20 5c 66 42 31 34 30 |be set t|o \fB140|
|00003a10| 36 5c 66 50 2e 0a 58 5c | 66 49 26 6f 72 61 5f 66 |6\fP..X\|fI&ora_f|
|00003a20| 65 74 63 68 28 29 5c 66 | 50 20 77 69 6c 6c 20 63 |etch()\f|P will c|
|00003a30| 6f 6d 70 6c 65 74 65 20 | 73 75 63 63 65 73 73 66 |omplete |successf|
|00003a40| 75 6c 6c 79 20 69 66 20 | 74 72 75 6e 63 61 74 69 |ully if |truncati|
|00003a50| 6f 6e 20 69 73 20 70 65 | 72 6d 69 74 74 65 64 2c |on is pe|rmitted,|
|00003a60| 0a 58 6f 74 68 65 72 77 | 69 73 65 20 69 74 20 77 |.Xotherw|ise it w|
|00003a70| 69 6c 6c 20 66 61 69 6c | 2e 0a 58 0a 58 5c 66 49 |ill fail|..X.X\fI|
|00003a80| 26 6f 72 61 5f 66 65 74 | 63 68 28 29 5c 66 50 20 |&ora_fet|ch()\fP |
|00003a90| 77 69 6c 6c 20 66 61 69 | 6c 20 61 74 20 74 68 65 |will fai|l at the|
|00003aa0| 20 65 6e 64 20 6f 66 20 | 74 68 65 20 64 61 74 61 | end of |the data|
|00003ab0| 20 6f 72 20 69 66 20 61 | 6e 20 65 72 72 6f 72 20 | or if a|n error |
|00003ac0| 6f 63 63 75 72 73 2e 0a | 58 49 74 20 69 73 20 70 |occurs..|XIt is p|
|00003ad0| 6f 73 73 69 62 6c 65 20 | 74 6f 20 64 69 73 74 69 |ossible |to disti|
|00003ae0| 6e 67 75 69 73 68 20 62 | 65 74 77 65 65 6e 20 74 |nguish b|etween t|
|00003af0| 68 65 73 65 20 63 61 73 | 65 73 20 62 79 20 74 65 |hese cas|es by te|
|00003b00| 73 74 69 6e 67 20 74 68 | 65 20 76 61 6c 75 65 0a |sting th|e value.|
|00003b10| 58 6f 66 20 74 68 65 20 | 76 61 72 69 61 62 6c 65 |Xof the |variable|
|00003b20| 20 5c 66 49 24 6f 72 61 | 5f 65 72 72 6e 6f 5c 66 | \fI$ora|_errno\f|
|00003b30| 50 2e 0a 58 54 68 69 73 | 20 77 69 6c 6c 20 62 65 |P..XThis| will be|
|00003b40| 20 7a 65 72 6f 20 66 6f | 72 20 65 6e 64 20 6f 66 | zero fo|r end of|
|00003b50| 20 64 61 74 61 2c 20 6e | 6f 6e 5c 2d 7a 65 72 6f | data, n|on\-zero|
|00003b60| 20 69 66 20 61 6e 20 65 | 72 72 6f 72 20 68 61 73 | if an e|rror has|
|00003b70| 20 6f 63 63 75 72 72 65 | 64 2e 0a 58 0a 58 2e 6e | occurre|d..X.X.n|
|00003b80| 65 20 39 0a 58 45 78 61 | 6d 70 6c 65 3a 0a 58 0a |e 9.XExa|mple:.X.|
|00003b90| 58 2e 69 6e 20 2b 2e 35 | 69 0a 58 2e 6e 66 0a 58 |X.in +.5|i.X.nf.X|
|00003ba0| 2e 69 66 20 74 20 2e 66 | 74 20 43 57 0a 58 77 68 |.if t .f|t CW.Xwh|
|00003bb0| 69 6c 65 20 28 28 24 64 | 65 70 74 6e 6f 2c 20 24 |ile (($d|eptno, $|
|00003bc0| 64 6e 61 6d 65 2c 20 24 | 6c 6f 63 29 20 3d 20 26 |dname, $|loc) = &|
|00003bd0| 6f 72 61 5f 66 65 74 63 | 68 28 24 63 73 72 2c 20 |ora_fetc|h($csr, |
|00003be0| 31 29 29 0a 58 7b 0a 58 | 2e 69 6e 20 2b 2e 35 69 |1)).X{.X|.in +.5i|
|00003bf0| 0a 58 77 61 72 6e 20 22 | 54 72 75 6e 63 61 74 65 |.Xwarn "|Truncate|
|00003c00| 64 21 21 21 22 20 69 66 | 20 24 6f 72 61 5f 65 72 |d!!!" if| $ora_er|
|00003c10| 72 73 74 72 20 3d 3d 20 | 31 34 30 36 3b 0a 58 23 |rstr == |1406;.X#|
|00003c20| 20 64 6f 20 73 6f 6d 65 | 74 68 69 6e 67 20 77 69 | do some|thing wi|
|00003c30| 74 68 20 74 68 65 20 64 | 61 74 61 0a 58 2e 69 6e |th the d|ata.X.in|
|00003c40| 20 2d 2e 35 69 0a 58 7d | 0a 58 77 61 72 6e 20 24 | -.5i.X}|.Xwarn $|
|00003c50| 6f 72 61 5f 65 72 72 73 | 74 72 20 69 66 20 24 6f |ora_errs|tr if $o|
|00003c60| 72 61 5f 65 72 72 6e 6f | 3b 0a 58 2e 69 66 20 74 |ra_errno|;.X.if t|
|00003c70| 20 2e 66 74 20 50 0a 58 | 2e 66 69 0a 58 2e 69 6e | .ft P.X|.fi.X.in|
|00003c80| 20 2d 2e 35 69 0a 58 0a | 58 54 68 69 73 20 66 75 | -.5i.X.|XThis fu|
|00003c90| 6e 63 74 69 6f 6e 20 69 | 73 20 65 71 75 69 76 61 |nction i|s equiva|
|00003ca0| 6c 65 6e 74 20 74 6f 20 | 74 68 65 20 5c 66 49 4f |lent to |the \fIO|
|00003cb0| 43 49 20 6f 66 65 74 63 | 68 5c 66 50 20 61 6e 64 |CI ofetc|h\fP and|
|00003cc0| 20 5c 66 49 6f 66 65 6e | 5c 66 50 20 66 75 6e 63 | \fIofen|\fP func|
|00003cd0| 74 69 6f 6e 73 2e 0a 58 | 2e 5c 22 0a 58 2e 53 48 |tions..X|.\".X.SH|
|00003ce0| 20 22 26 6f 72 61 5f 63 | 6c 6f 73 65 28 24 63 73 | "&ora_c|lose($cs|
|00003cf0| 72 29 22 0a 58 2e 5c 22 | 0a 58 49 66 20 61 6e 20 |r)".X.\"|.XIf an |
|00003d00| 5c 66 42 53 51 4c 5c 66 | 50 20 73 74 61 74 65 6d |\fBSQL\f|P statem|
|00003d10| 65 6e 74 20 69 73 20 6e | 6f 20 6c 6f 6e 67 65 72 |ent is n|o longer|
|00003d20| 20 72 65 71 75 69 72 65 | 64 0a 58 28 66 6f 72 20 | require|d.X(for |
|00003d30| 65 78 61 6d 70 6c 65 2c | 20 61 6c 6c 20 74 68 65 |example,| all the|
|00003d40| 20 64 61 74 61 20 73 65 | 6c 65 63 74 65 64 20 68 | data se|lected h|
|00003d50| 61 73 20 62 65 65 6e 20 | 70 72 6f 63 65 73 73 65 |as been |processe|
|00003d60| 64 2c 0a 58 6f 72 20 6e | 6f 20 6d 6f 72 65 20 72 |d,.Xor n|o more r|
|00003d70| 6f 77 73 20 61 72 65 20 | 74 6f 20 62 65 20 69 6e |ows are |to be in|
|00003d80| 73 65 72 74 65 64 29 0a | 58 74 68 65 6e 20 74 68 |serted).|Xthen th|
|00003d90| 65 20 73 74 61 74 65 6d | 65 6e 74 20 69 64 65 6e |e statem|ent iden|
|00003da0| 74 69 66 69 65 72 20 73 | 68 6f 75 6c 64 20 62 65 |tifier s|hould be|
|00003db0| 20 72 65 6c 65 61 73 65 | 64 2e 0a 58 54 68 69 73 | release|d..XThis|
|00003dc0| 20 69 73 20 64 6f 6e 65 | 20 62 79 20 63 61 6c 6c | is done| by call|
|00003dd0| 69 6e 67 20 74 68 65 20 | 5c 66 49 26 6f 72 61 5f |ing the |\fI&ora_|
|00003de0| 63 6c 6f 73 65 28 29 5c | 66 50 20 66 75 6e 63 74 |close()\|fP funct|
|00003df0| 69 6f 6e 0a 58 77 69 74 | 68 20 74 68 65 20 73 74 |ion.Xwit|h the st|
|00003e00| 61 74 65 6d 65 6e 74 20 | 69 64 65 6e 74 69 66 69 |atement |identifi|
|00003e10| 65 72 20 61 73 20 69 74 | 73 20 6f 6e 6c 79 20 70 |er as it|s only p|
|00003e20| 61 72 61 6d 65 74 65 72 | 2e 0a 58 0a 58 54 68 69 |arameter|..X.XThi|
|00003e30| 73 20 66 75 6e 63 74 69 | 6f 6e 20 69 73 20 65 71 |s functi|on is eq|
|00003e40| 75 69 76 61 6c 65 6e 74 | 20 74 6f 20 74 68 65 20 |uivalent| to the |
|00003e50| 5c 66 49 4f 43 49 20 6f | 63 6c 6f 73 65 5c 66 50 |\fIOCI o|close\fP|
|00003e60| 20 66 75 6e 63 74 69 6f | 6e 2e 0a 58 2e 5c 22 0a | functio|n..X.\".|
|00003e70| 58 2e 53 48 20 22 26 6f | 72 61 5f 64 6f 28 24 6c |X.SH "&o|ra_do($l|
|00003e80| 64 61 2c 20 24 73 74 61 | 74 65 6d 65 6e 74 29 22 |da, $sta|tement)"|
|00003e90| 0a 58 2e 5c 22 0a 58 4e | 6f 74 20 61 6c 6c 20 5c |.X.\".XN|ot all \|
|00003ea0| 66 42 53 51 4c 5c 66 50 | 20 73 74 61 74 65 6d 65 |fBSQL\fP| stateme|
|00003eb0| 6e 74 73 20 72 65 74 75 | 72 6e 20 64 61 74 61 20 |nts retu|rn data |
|00003ec0| 6f 72 20 63 6f 6e 74 61 | 69 6e 20 73 75 62 73 74 |or conta|in subst|
|00003ed0| 69 74 75 74 69 6f 6e 20 | 76 61 72 69 61 62 6c 65 |itution |variable|
|00003ee0| 73 2e 0a 58 49 6e 20 74 | 68 65 73 65 20 63 61 73 |s..XIn t|hese cas|
|00003ef0| 65 73 20 74 68 65 20 5c | 66 49 26 6f 72 61 5f 64 |es the \|fI&ora_d|
|00003f00| 6f 28 29 5c 66 50 20 66 | 75 6e 63 74 69 6f 6e 20 |o()\fP f|unction |
|00003f10| 6d 61 79 20 62 65 20 75 | 73 65 64 0a 58 61 73 20 |may be u|sed.Xas |
|00003f20| 61 6e 20 61 6c 74 65 72 | 6e 61 74 69 76 65 20 74 |an alter|native t|
|00003f30| 6f 20 5c 66 49 26 6f 72 | 61 5f 6f 70 65 6e 28 29 |o \fI&or|a_open()|
|00003f40| 5c 66 50 20 61 6e 64 20 | 5c 66 49 26 6f 72 61 5f |\fP and |\fI&ora_|
|00003f50| 63 6c 6f 73 65 28 29 5c | 66 50 2e 0a 58 54 68 69 |close()\|fP..XThi|
|00003f60| 73 20 66 75 6e 63 74 69 | 6f 6e 20 74 61 6b 65 73 |s functi|on takes|
|00003f70| 20 74 77 6f 20 70 61 72 | 61 6d 65 74 65 72 73 2c | two par|ameters,|
|00003f80| 0a 58 61 20 6c 6f 67 69 | 6e 20 69 64 65 6e 74 69 |.Xa logi|n identi|
|00003f90| 66 69 65 72 20 61 6e 64 | 20 74 68 65 20 73 74 61 |fier and| the sta|
|00003fa0| 74 65 6d 65 6e 74 20 74 | 6f 20 62 65 20 65 78 65 |tement t|o be exe|
|00003fb0| 63 75 74 65 64 2e 0a 58 | 0a 58 2e 6e 65 20 33 0a |cuted..X|.X.ne 3.|
|00003fc0| 58 45 78 61 6d 70 6c 65 | 3a 0a 58 0a 58 2e 74 69 |XExample|:.X.X.ti|
|00003fd0| 20 2b 2e 35 69 0a 58 2e | 69 66 20 74 20 2e 66 74 | +.5i.X.|if t .ft|
|00003fe0| 20 43 57 0a 58 26 6f 72 | 61 5f 64 6f 28 24 6c 64 | CW.X&or|a_do($ld|
|00003ff0| 61 2c 20 27 64 72 6f 70 | 20 74 61 62 6c 65 20 65 |a, 'drop| table e|
|00004000| 6d 70 6c 6f 79 65 65 27 | 29 3b 0a 58 2e 69 66 20 |mployee'|);.X.if |
|00004010| 74 20 2e 66 74 20 50 0a | 58 0a 58 54 68 69 73 20 |t .ft P.|X.XThis |
|00004020| 66 75 6e 63 74 69 6f 6e | 20 69 73 20 72 6f 75 67 |function| is roug|
|00004030| 68 6c 79 20 65 71 75 69 | 76 61 6c 65 6e 74 20 74 |hly equi|valent t|
|00004040| 6f 0a 58 2e 69 66 20 74 | 20 2e 66 74 20 43 57 0a |o.X.if t| .ft CW.|
|00004050| 58 26 6f 72 61 5f 63 6c | 6f 73 65 28 26 6f 72 61 |X&ora_cl|ose(&ora|
|00004060| 5f 6f 70 65 6e 28 24 6c | 64 61 2c 5c 20 24 73 74 |_open($l|da,\ $st|
|00004070| 61 74 65 6d 65 6e 74 29 | 29 5c 63 0a 58 2e 69 66 |atement)|)\c.X.if|
|00004080| 20 74 20 2e 66 74 20 50 | 0a 58 5c 26 2e 0a 58 2e | t .ft P|.X\&..X.|
|00004090| 5c 22 0a 58 2e 53 48 20 | 22 26 6f 72 61 5f 6c 6f |\".X.SH |"&ora_lo|
|000040a0| 67 6f 66 66 28 24 6c 64 | 61 29 22 0a 58 2e 5c 22 |goff($ld|a)".X.\"|
|000040b0| 0a 58 57 68 65 6e 20 74 | 68 65 20 70 72 6f 67 72 |.XWhen t|he progr|
|000040c0| 61 6d 20 6e 6f 20 6c 6f | 6e 67 65 72 20 6e 65 65 |am no lo|nger nee|
|000040d0| 64 73 20 74 6f 20 61 63 | 63 65 73 73 20 61 20 67 |ds to ac|cess a g|
|000040e0| 69 76 65 6e 20 64 61 74 | 61 62 61 73 65 2c 0a 58 |iven dat|abase,.X|
|000040f0| 74 68 65 20 6c 6f 67 69 | 6e 20 69 64 65 6e 74 69 |the logi|n identi|
|00004100| 66 69 65 72 20 73 68 6f | 75 6c 64 20 62 65 20 72 |fier sho|uld be r|
|00004110| 65 6c 65 61 73 65 64 20 | 75 73 69 6e 67 20 74 68 |eleased |using th|
|00004120| 65 20 5c 66 49 26 6f 72 | 61 5f 6c 6f 67 6f 66 66 |e \fI&or|a_logoff|
|00004130| 28 29 5c 66 50 20 66 75 | 6e 63 74 69 6f 6e 2e 0a |()\fP fu|nction..|
|00004140| 58 0a 58 54 68 69 73 20 | 66 75 6e 63 74 69 6f 6e |X.XThis |function|
|00004150| 20 69 73 20 65 71 75 69 | 76 61 6c 65 6e 74 20 74 | is equi|valent t|
|00004160| 6f 20 74 68 65 20 5c 66 | 49 4f 43 49 20 6f 6c 6f |o the \f|IOCI olo|
|00004170| 67 6f 66 66 5c 66 50 20 | 66 75 6e 63 74 69 6f 6e |goff\fP |function|
|00004180| 2e 0a 58 2e 5c 22 0a 58 | 2e 53 48 20 41 6e 63 69 |..X.\".X|.SH Anci|
|00004190| 6c 6c 61 72 79 20 46 75 | 6e 63 74 69 6f 6e 73 0a |llary Fu|nctions.|
|000041a0| 58 2e 5c 22 0a 58 41 64 | 64 69 74 69 6f 6e 61 6c |X.\".XAd|ditional|
|000041b0| 20 66 75 6e 63 74 69 6f | 6e 73 20 61 76 61 69 6c | functio|ns avail|
|000041c0| 61 62 6c 65 20 61 72 65 | 3a 0a 58 2e 49 52 20 26 |able are|:.X.IR &|
|000041d0| 6f 72 61 5f 74 69 74 6c | 65 73 28 29 20 2c 0a 58 |ora_titl|es() ,.X|
|000041e0| 2e 49 52 20 26 6f 72 61 | 5f 6c 65 6e 67 74 68 73 |.IR &ora|_lengths|
|000041f0| 28 29 20 2c 0a 58 2e 49 | 52 20 26 6f 72 61 5f 74 |() ,.X.I|R &ora_t|
|00004200| 79 70 65 73 28 29 20 2c | 0a 58 2e 49 52 20 26 6f |ypes() ,|.X.IR &o|
|00004210| 72 61 5f 61 75 74 6f 63 | 6f 6d 6d 69 74 28 29 20 |ra_autoc|ommit() |
|00004220| 2c 0a 58 2e 49 52 20 26 | 6f 72 61 5f 63 6f 6d 6d |,.X.IR &|ora_comm|
|00004230| 69 74 28 29 20 2c 0a 58 | 2e 49 20 26 6f 72 61 5f |it() ,.X|.I &ora_|
|00004240| 72 6f 6c 6c 62 61 63 6b | 28 29 0a 58 61 6e 64 0a |rollback|().Xand.|
|00004250| 58 2e 49 52 20 26 6f 72 | 61 5f 76 65 72 73 69 6f |X.IR &or|a_versio|
|00004260| 6e 28 29 20 2e 0a 58 0a | 58 54 68 65 20 66 69 72 |n() ..X.|XThe fir|
|00004270| 73 74 20 74 68 72 65 65 | 20 61 72 65 20 6f 66 20 |st three| are of |
|00004280| 6d 6f 73 74 20 75 73 65 | 20 77 69 74 68 69 6e 20 |most use| within |
|00004290| 61 20 70 72 6f 67 72 61 | 6d 0a 58 77 68 69 63 68 |a progra|m.Xwhich|
|000042a0| 20 61 6c 6c 6f 77 73 20 | 73 74 61 74 65 6d 65 6e | allows |statemen|
|000042b0| 74 73 20 74 6f 20 62 65 | 20 65 6e 74 65 72 65 64 |ts to be| entered|
|000042c0| 20 69 6e 74 65 72 61 63 | 74 69 76 65 6c 79 2e 0a | interac|tively..|
|000042d0| 58 53 65 65 2c 20 66 6f | 72 20 65 78 61 6d 70 6c |XSee, fo|r exampl|
|000042e0| 65 2c 20 74 68 65 20 73 | 61 6d 70 6c 65 20 70 72 |e, the s|ample pr|
|000042f0| 6f 67 72 61 6d 20 5c 66 | 42 73 71 6c 5c 66 50 0a |ogram \f|Bsql\fP.|
|00004300| 58 77 68 69 63 68 20 69 | 73 20 73 75 70 70 6c 69 |Xwhich i|s suppli|
|00004310| 65 64 20 77 69 74 68 20 | 5c 66 49 4f 72 61 70 65 |ed with |\fIOrape|
|00004320| 72 6c 5c 66 50 20 61 6e | 64 20 6d 61 79 20 68 61 |rl\fP an|d may ha|
|00004330| 76 65 20 62 65 65 6e 20 | 69 6e 73 74 61 6c 6c 65 |ve been |installe|
|00004340| 64 20 61 74 20 79 6f 75 | 72 20 73 69 74 65 2e 0a |d at you|r site..|
|00004350| 58 2e 5c 22 0a 58 2e 53 | 48 20 22 40 74 69 74 6c |X.\".X.S|H "@titl|
|00004360| 65 73 20 3d 20 26 6f 72 | 61 5f 74 69 74 6c 65 73 |es = &or|a_titles|
|00004370| 28 24 63 73 72 29 22 0a | 58 2e 5c 22 0a 58 41 20 |($csr)".|X.\".XA |
|00004380| 70 72 6f 67 72 61 6d 20 | 6d 61 79 20 64 65 74 65 |program |may dete|
|00004390| 72 6d 69 6e 65 20 74 68 | 65 20 66 69 65 6c 64 20 |rmine th|e field |
|000043a0| 74 69 74 6c 65 73 20 6f | 66 20 61 6e 20 65 78 65 |titles o|f an exe|
|000043b0| 63 75 74 65 64 20 71 75 | 65 72 79 0a 58 62 79 20 |cuted qu|ery.Xby |
|000043c0| 63 61 6c 6c 69 6e 67 20 | 5c 66 49 26 6f 72 61 5f |calling |\fI&ora_|
|000043d0| 74 69 74 6c 65 73 28 29 | 5c 66 50 2e 0a 58 54 68 |titles()|\fP..XTh|
|000043e0| 69 73 20 66 75 6e 63 74 | 69 6f 6e 20 74 61 6b 65 |is funct|ion take|
|000043f0| 73 20 61 20 73 69 6e 67 | 6c 65 20 70 61 72 61 6d |s a sing|le param|
|00004400| 65 74 65 72 2c 0a 58 61 | 20 73 74 61 74 65 6d 65 |eter,.Xa| stateme|
|00004410| 6e 74 20 69 64 65 6e 74 | 69 66 69 65 72 20 28 6f |nt ident|ifier (o|
|00004420| 62 74 61 69 6e 65 64 20 | 66 72 6f 6d 20 5c 66 49 |btained |from \fI|
|00004430| 26 6f 72 61 5f 6f 70 65 | 6e 28 29 5c 66 50 29 0a |&ora_ope|n()\fP).|
|00004440| 58 69 6e 64 69 63 61 74 | 69 6e 67 20 74 68 65 20 |Xindicat|ing the |
|00004450| 71 75 65 72 79 20 66 6f | 72 20 77 68 69 63 68 20 |query fo|r which |
|00004460| 74 68 65 20 74 69 74 6c | 65 73 20 61 72 65 20 72 |the titl|es are r|
|00004470| 65 71 75 69 72 65 64 2e | 0a 58 54 68 65 20 74 69 |equired.|.XThe ti|
|00004480| 74 6c 65 73 20 61 72 65 | 20 72 65 74 75 72 6e 65 |tles are| returne|
|00004490| 64 20 61 73 20 61 6e 20 | 61 72 72 61 79 20 6f 66 |d as an |array of|
|000044a0| 20 73 74 72 69 6e 67 73 | 2c 20 6f 6e 65 20 66 6f | strings|, one fo|
|000044b0| 72 20 65 61 63 68 20 63 | 6f 6c 75 6d 6e 2e 0a 58 |r each c|olumn..X|
|000044c0| 0a 58 54 69 74 6c 65 73 | 20 61 72 65 20 74 72 75 |.XTitles| are tru|
|000044d0| 6e 63 61 74 65 64 20 74 | 6f 20 74 68 65 20 6c 65 |ncated t|o the le|
|000044e0| 6e 67 74 68 20 6f 66 20 | 74 68 65 20 66 69 65 6c |ngth of |the fiel|
|000044f0| 64 2c 0a 58 61 73 20 72 | 65 70 6f 72 74 65 64 20 |d,.Xas r|eported |
|00004500| 62 79 20 74 68 65 20 5c | 66 49 26 6f 72 61 5f 6c |by the \|fI&ora_l|
|00004510| 65 6e 67 74 68 73 28 29 | 5c 66 50 20 66 75 6e 63 |engths()|\fP func|
|00004520| 74 69 6f 6e 2e 0a 58 0a | 58 54 68 69 73 20 66 75 |tion..X.|XThis fu|
|00004530| 6e 63 74 69 6f 6e 20 69 | 73 20 65 71 75 69 76 61 |nction i|s equiva|
|00004540| 6c 65 6e 74 20 74 6f 20 | 74 68 65 20 5c 66 49 4f |lent to |the \fIO|
|00004550| 43 49 20 6f 6e 61 6d 65 | 5c 66 50 20 66 75 6e 63 |CI oname|\fP func|
|00004560| 74 69 6f 6e 2e 0a 58 2e | 5c 22 0a 58 2e 53 48 20 |tion..X.|\".X.SH |
|00004570| 22 40 6c 65 6e 67 74 68 | 73 20 3d 20 26 6f 72 61 |"@length|s = &ora|
|00004580| 5f 6c 65 6e 67 74 68 73 | 28 24 63 73 72 29 22 0a |_lengths|($csr)".|
|00004590| 58 2e 5c 22 0a 58 41 20 | 70 72 6f 67 72 61 6d 20 |X.\".XA |program |
|000045a0| 6d 61 79 20 64 65 74 65 | 72 6d 69 6e 65 20 74 68 |may dete|rmine th|
|000045b0| 65 20 6c 65 6e 67 74 68 | 20 6f 66 20 65 61 63 68 |e length| of each|
|000045c0| 20 6f 66 20 74 68 65 20 | 66 69 65 6c 64 73 20 72 | of the |fields r|
|000045d0| 65 74 75 72 6e 65 64 20 | 62 79 20 61 20 71 75 65 |eturned |by a que|
|000045e0| 72 79 0a 58 62 79 20 63 | 61 6c 6c 69 6e 67 20 74 |ry.Xby c|alling t|
|000045f0| 68 65 20 5c 66 49 26 6f | 72 61 5f 6c 65 6e 67 74 |he \fI&o|ra_lengt|
|00004600| 68 73 28 29 5c 66 50 20 | 66 75 6e 63 74 69 6f 6e |hs()\fP |function|
|00004610| 2e 0a 58 54 68 69 73 20 | 66 75 6e 63 74 69 6f 6e |..XThis |function|
|00004620| 20 74 61 6b 65 73 20 61 | 20 73 69 6e 67 6c 65 20 | takes a| single |
|00004630| 70 61 72 61 6d 65 74 65 | 72 2c 0a 58 61 20 73 74 |paramete|r,.Xa st|
|00004640| 61 74 65 6d 65 6e 74 20 | 69 64 65 6e 74 69 66 69 |atement |identifi|
|00004650| 65 72 20 28 6f 62 74 61 | 69 6e 65 64 20 66 72 6f |er (obta|ined fro|
|00004660| 6d 20 5c 66 49 26 6f 72 | 61 5f 6f 70 65 6e 28 29 |m \fI&or|a_open()|
|00004670| 5c 66 50 29 0a 58 69 6e | 64 69 63 61 74 69 6e 67 |\fP).Xin|dicating|
|00004680| 20 74 68 65 20 71 75 65 | 72 79 20 66 6f 72 20 77 | the que|ry for w|
|00004690| 68 69 63 68 20 74 68 65 | 20 6c 65 6e 67 74 68 73 |hich the| lengths|
|000046a0| 20 61 72 65 20 72 65 71 | 75 69 72 65 64 2e 0a 58 | are req|uired..X|
|000046b0| 54 68 65 20 6c 65 6e 67 | 74 68 73 20 61 72 65 20 |The leng|ths are |
|000046c0| 72 65 74 75 72 6e 65 64 | 20 61 73 20 61 6e 20 61 |returned| as an a|
|000046d0| 72 72 61 79 20 6f 66 20 | 69 6e 74 65 67 65 72 73 |rray of |integers|
|000046e0| 2c 20 6f 6e 65 20 66 6f | 72 20 65 61 63 68 20 63 |, one fo|r each c|
|000046f0| 6f 6c 75 6d 6e 2e 0a 58 | 0a 58 54 68 69 73 20 66 |olumn..X|.XThis f|
|00004700| 75 6e 63 74 69 6f 6e 20 | 72 65 74 75 72 6e 73 20 |unction |returns |
|00004710| 64 61 74 61 20 73 74 6f | 72 65 64 20 69 6e 20 74 |data sto|red in t|
|00004720| 68 65 20 63 75 72 73 6f | 72 20 62 79 20 5c 66 49 |he curso|r by \fI|
|00004730| 26 6f 72 61 5f 6f 70 65 | 6e 28 29 5c 66 50 2c 0a |&ora_ope|n()\fP,.|
|00004740| 58 6f 62 74 61 69 6e 65 | 64 20 66 72 6f 6d 20 74 |Xobtaine|d from t|
|00004750| 68 65 20 5c 66 49 4f 43 | 49 20 6f 64 73 63 5c 66 |he \fIOC|I odsc\f|
|00004760| 50 20 66 75 6e 63 74 69 | 6f 6e 2e 0a 58 2e 5c 22 |P functi|on..X.\"|
|00004770| 0a 58 2e 53 48 20 22 40 | 74 79 70 65 73 20 3d 20 |.X.SH "@|types = |
|00004780| 26 6f 72 61 5f 74 79 70 | 65 73 28 24 63 73 72 29 |&ora_typ|es($csr)|
|00004790| 22 0a 58 2e 5c 22 0a 58 | 41 20 70 72 6f 67 72 61 |".X.\".X|A progra|
|000047a0| 6d 20 6d 61 79 20 64 65 | 74 65 72 6d 69 6e 65 20 |m may de|termine |
|000047b0| 74 68 65 20 74 79 70 65 | 20 6f 66 20 65 61 63 68 |the type| of each|
|000047c0| 20 6f 66 20 74 68 65 20 | 66 69 65 6c 64 73 20 72 | of the |fields r|
|000047d0| 65 74 75 72 6e 65 64 20 | 62 79 20 61 20 71 75 65 |eturned |by a que|
|000047e0| 72 79 0a 58 62 79 20 63 | 61 6c 6c 69 6e 67 20 74 |ry.Xby c|alling t|
|000047f0| 68 65 20 5c 66 49 26 6f | 72 61 5f 74 79 70 65 73 |he \fI&o|ra_types|
|00004800| 28 29 5c 66 50 20 66 75 | 6e 63 74 69 6f 6e 2e 0a |()\fP fu|nction..|
|00004810| 58 54 68 69 73 20 66 75 | 6e 63 74 69 6f 6e 20 74 |XThis fu|nction t|
|00004820| 61 6b 65 73 20 61 20 73 | 69 6e 67 6c 65 20 70 61 |akes a s|ingle pa|
|00004830| 72 61 6d 65 74 65 72 2c | 0a 58 61 20 73 74 61 74 |rameter,|.Xa stat|
|00004840| 65 6d 65 6e 74 20 69 64 | 65 6e 74 69 66 69 65 72 |ement id|entifier|
|00004850| 20 28 6f 62 74 61 69 6e | 65 64 20 66 72 6f 6d 20 | (obtain|ed from |
|00004860| 5c 66 49 26 6f 72 61 5f | 6f 70 65 6e 28 29 5c 66 |\fI&ora_|open()\f|
|00004870| 50 29 0a 58 69 6e 64 69 | 63 61 74 69 6e 67 20 74 |P).Xindi|cating t|
|00004880| 68 65 20 71 75 65 72 79 | 20 66 6f 72 20 77 68 69 |he query| for whi|
|00004890| 63 68 20 74 68 65 20 6c | 65 6e 67 74 68 73 20 61 |ch the l|engths a|
|000048a0| 72 65 20 72 65 71 75 69 | 72 65 64 2e 0a 58 54 68 |re requi|red..XTh|
|000048b0| 65 20 74 79 70 65 73 20 | 61 72 65 20 72 65 74 75 |e types |are retu|
|000048c0| 72 6e 65 64 20 61 73 20 | 61 6e 20 61 72 72 61 79 |rned as |an array|
|000048d0| 20 6f 66 20 69 6e 74 65 | 67 65 72 73 2c 20 6f 6e | of inte|gers, on|
|000048e0| 65 20 66 6f 72 20 65 61 | 63 68 20 66 69 65 6c 64 |e for ea|ch field|
|000048f0| 2e 0a 58 0a 58 54 68 65 | 73 65 20 74 79 70 65 73 |..X.XThe|se types|
|00004900| 20 61 72 65 20 64 65 66 | 69 6e 65 64 20 69 6e 20 | are def|ined in |
|00004910| 79 6f 75 72 20 4f 43 49 | 20 64 6f 63 75 6d 65 6e |your OCI| documen|
|00004920| 74 61 74 69 6f 6e 2e 0a | 58 54 68 65 20 63 6f 72 |tation..|XThe cor|
|00004930| 72 65 63 74 20 69 6e 74 | 65 72 70 72 65 74 61 74 |rect int|erpretat|
|00004940| 69 6f 6e 20 66 6f 72 20 | 4f 72 61 63 6c 65 20 76 |ion for |Oracle v|
|00004950| 36 20 69 73 20 67 69 76 | 65 6e 20 69 6e 20 74 68 |6 is giv|en in th|
|00004960| 65 20 66 69 6c 65 20 5c | 66 42 6f 72 61 70 65 72 |e file \|fBoraper|
|00004970| 6c 2e 70 68 5c 66 50 2e | 0a 58 0a 58 54 68 69 73 |l.ph\fP.|.X.XThis|
|00004980| 20 66 75 6e 63 74 69 6f | 6e 20 72 65 74 75 72 6e | functio|n return|
|00004990| 73 20 64 61 74 61 20 73 | 74 6f 72 65 64 20 69 6e |s data s|tored in|
|000049a0| 20 74 68 65 20 63 75 72 | 73 6f 72 20 62 79 20 5c | the cur|sor by \|
|000049b0| 66 49 26 6f 72 61 5f 6f | 70 65 6e 28 29 5c 66 50 |fI&ora_o|pen()\fP|
|000049c0| 2c 0a 58 6f 62 74 61 69 | 6e 65 64 20 66 72 6f 6d |,.Xobtai|ned from|
|000049d0| 20 74 68 65 20 5c 66 49 | 4f 43 49 20 6f 64 73 63 | the \fI|OCI odsc|
|000049e0| 5c 66 50 20 66 75 6e 63 | 74 69 6f 6e 2e 0a 58 2e |\fP func|tion..X.|
|000049f0| 5c 22 0a 58 2e 53 48 20 | 22 26 6f 72 61 5f 61 75 |\".X.SH |"&ora_au|
|00004a00| 74 6f 63 6f 6d 6d 69 74 | 28 24 6c 64 61 2c 20 24 |tocommit|($lda, $|
|00004a10| 6f 6e 5f 6f 72 5f 6f 66 | 66 29 22 0a 58 2e 5c 22 |on_or_of|f)".X.\"|
|00004a20| 0a 58 41 75 74 6f 63 6f | 6d 6d 69 74 20 6d 6f 64 |.XAutoco|mmit mod|
|00004a30| 65 20 28 69 6e 20 77 68 | 69 63 68 20 65 61 63 68 |e (in wh|ich each|
|00004a40| 20 74 72 61 6e 73 61 63 | 74 69 6f 6e 20 69 73 20 | transac|tion is |
|00004a50| 63 6f 6d 6d 69 74 74 65 | 64 20 69 6d 6d 65 64 69 |committe|d immedi|
|00004a60| 61 74 65 6c 79 2c 0a 58 | 77 69 74 68 6f 75 74 20 |ately,.X|without |
|00004a70| 77 61 69 74 69 6e 67 20 | 66 6f 72 20 61 6e 20 65 |waiting |for an e|
|00004a80| 78 70 6c 69 63 69 74 20 | 63 6f 6d 6d 69 74 29 0a |xplicit |commit).|
|00004a90| 58 6d 61 79 20 62 65 20 | 65 6e 61 62 6c 65 64 20 |Xmay be |enabled |
|00004aa0| 6f 72 20 64 69 73 61 62 | 6c 65 64 20 75 73 69 6e |or disab|led usin|
|00004ab0| 67 20 5c 66 49 26 6f 72 | 61 5f 61 75 74 6f 63 6f |g \fI&or|a_autoco|
|00004ac0| 6d 6d 69 74 28 29 5c 66 | 50 2e 0a 58 54 68 69 73 |mmit()\f|P..XThis|
|00004ad0| 20 66 75 6e 63 74 69 6f | 6e 20 74 61 6b 65 73 20 | functio|n takes |
|00004ae0| 74 77 6f 20 70 61 72 61 | 6d 65 74 65 72 73 2c 0a |two para|meters,.|
|00004af0| 58 61 20 6c 6f 67 69 6e | 20 69 64 65 6e 74 69 66 |Xa login| identif|
|00004b00| 69 65 72 20 28 6f 62 74 | 61 69 6e 65 64 20 66 72 |ier (obt|ained fr|
|00004b10| 6f 6d 20 5c 66 49 26 6f | 72 61 5f 6c 6f 67 69 6e |om \fI&o|ra_login|
|00004b20| 28 29 5c 66 50 29 0a 58 | 61 6e 64 20 61 20 74 72 |()\fP).X|and a tr|
|00004b30| 75 65 2f 66 61 6c 73 65 | 20 76 61 6c 75 65 0a 58 |ue/false| value.X|
|00004b40| 69 6e 64 69 63 61 74 69 | 6e 67 20 77 68 65 74 68 |indicati|ng wheth|
|00004b50| 65 72 20 61 75 74 6f 63 | 6f 6d 6d 69 74 20 69 73 |er autoc|ommit is|
|00004b60| 20 74 6f 20 62 65 20 65 | 6e 61 62 6c 65 64 20 28 | to be e|nabled (|
|00004b70| 6e 6f 6e 5c 2d 7a 65 72 | 6f 29 20 6f 72 20 64 69 |non\-zer|o) or di|
|00004b80| 73 61 62 6c 65 64 20 28 | 7a 65 72 6f 29 2e 0a 58 |sabled (|zero)..X|
|00004b90| 42 79 20 64 65 66 61 75 | 6c 74 2c 20 61 75 74 6f |By defau|lt, auto|
|00004ba0| 63 6f 6d 6d 69 74 20 69 | 73 20 6f 66 66 2e 0a 58 |commit i|s off..X|
|00004bb0| 0a 58 4e 6f 74 65 20 74 | 68 61 74 20 61 75 74 6f |.XNote t|hat auto|
|00004bc0| 63 6f 6d 6d 69 74 20 63 | 61 6e 20 6f 6e 6c 79 20 |commit c|an only |
|00004bd0| 62 65 20 73 65 74 20 70 | 65 72 20 6c 6f 67 69 6e |be set p|er login|
|00004be0| 2c 20 6e 6f 74 20 70 65 | 72 20 73 74 61 74 65 6d |, not pe|r statem|
|00004bf0| 65 6e 74 2e 0a 58 49 66 | 20 79 6f 75 20 6e 65 65 |ent..XIf| you nee|
|00004c00| 64 20 74 6f 20 63 6f 6e | 74 72 6f 6c 20 61 75 74 |d to con|trol aut|
|00004c10| 6f 63 6f 6d 6d 69 74 20 | 62 79 20 73 74 61 74 65 |ocommit |by state|
|00004c20| 6d 65 6e 74 0a 58 28 66 | 6f 72 20 65 78 61 6d 70 |ment.X(f|or examp|
|00004c30| 6c 65 2c 20 74 6f 20 61 | 6c 6c 6f 77 20 64 65 6c |le, to a|llow del|
|00004c40| 65 74 69 6f 6e 73 20 74 | 6f 20 62 65 20 72 6f 6c |etions t|o be rol|
|00004c50| 6c 65 64 20 62 61 63 6b | 2c 0a 58 62 75 74 20 69 |led back|,.Xbut i|
|00004c60| 6e 73 65 72 74 69 6f 6e | 73 20 74 6f 20 62 65 20 |nsertion|s to be |
|00004c70| 63 6f 6d 6d 69 74 74 65 | 64 20 69 6d 6d 65 64 69 |committe|d immedi|
|00004c80| 61 74 65 6c 79 29 0a 58 | 79 6f 75 20 73 68 6f 75 |ately).X|you shou|
|00004c90| 6c 64 20 6d 61 6b 65 20 | 6d 75 6c 74 69 70 6c 65 |ld make |multiple|
|00004ca0| 20 63 61 6c 6c 73 20 74 | 6f 20 5c 66 49 26 6f 72 | calls t|o \fI&or|
|00004cb0| 61 5f 6c 6f 67 69 6e 28 | 29 5c 66 50 0a 58 61 6e |a_login(|)\fP.Xan|
|00004cc0| 64 20 75 73 65 20 61 20 | 73 65 70 61 72 61 74 65 |d use a |separate|
|00004cd0| 20 6c 6f 67 69 6e 20 69 | 64 65 6e 74 69 66 69 65 | login i|dentifie|
|00004ce0| 72 20 66 6f 72 20 65 61 | 63 68 20 73 74 61 74 65 |r for ea|ch state|
|00004cf0| 6d 65 6e 74 2e 0a 58 0a | 58 54 68 69 73 20 66 75 |ment..X.|XThis fu|
|00004d00| 6e 63 74 69 6f 6e 20 69 | 73 20 65 71 75 69 76 61 |nction i|s equiva|
|00004d10| 6c 65 6e 74 20 74 6f 20 | 74 68 65 20 5c 66 49 4f |lent to |the \fIO|
|00004d20| 43 49 20 6f 63 6f 6e 5c | 66 50 20 61 6e 64 20 5c |CI ocon\|fP and \|
|00004d30| 66 49 6f 63 6f 66 5c 66 | 50 20 66 75 6e 63 74 69 |fIocof\f|P functi|
|00004d40| 6f 6e 73 2e 0a 58 2e 5c | 22 0a 58 2e 53 48 20 22 |ons..X.\|".X.SH "|
|00004d50| 26 6f 72 61 5f 63 6f 6d | 6d 69 74 28 24 6c 64 61 |&ora_com|mit($lda|
|00004d60| 29 22 0a 58 2e 53 48 20 | 22 26 6f 72 61 5f 72 6f |)".X.SH |"&ora_ro|
|00004d70| 6c 6c 62 61 63 6b 28 24 | 6c 64 61 29 22 0a 58 2e |llback($|lda)".X.|
|00004d80| 5c 22 0a 58 4d 6f 64 69 | 66 69 63 61 74 69 6f 6e |\".XModi|fication|
|00004d90| 73 20 74 6f 20 61 20 64 | 61 74 61 62 61 73 65 20 |s to a d|atabase |
|00004da0| 6d 61 79 20 62 65 20 63 | 6f 6d 6d 69 74 74 65 64 |may be c|ommitted|
|00004db0| 20 6f 72 20 72 6f 6c 6c | 65 64 20 62 61 63 6b 0a | or roll|ed back.|
|00004dc0| 58 75 73 69 6e 67 20 74 | 68 65 20 5c 66 49 26 6f |Xusing t|he \fI&o|
|00004dd0| 72 61 5f 63 6f 6d 6d 69 | 74 28 29 5c 66 50 20 61 |ra_commi|t()\fP a|
|00004de0| 6e 64 20 5c 66 49 26 6f | 72 61 5f 72 6f 6c 6c 62 |nd \fI&o|ra_rollb|
|00004df0| 61 63 6b 28 29 5c 66 50 | 20 66 75 6e 63 74 69 6f |ack()\fP| functio|
|00004e00| 6e 73 2e 0a 58 54 68 65 | 73 65 20 66 75 6e 63 74 |ns..XThe|se funct|
|00004e10| 69 6f 6e 73 20 74 61 6b | 65 20 61 20 73 69 6e 67 |ions tak|e a sing|
|00004e20| 6c 65 20 70 61 72 61 6d | 65 74 65 72 2c 0a 58 61 |le param|eter,.Xa|
|00004e30| 20 6c 6f 67 69 6e 20 69 | 64 65 6e 74 69 66 69 65 | login i|dentifie|
|00004e40| 72 20 6f 62 74 61 69 6e | 65 64 20 66 72 6f 6d 20 |r obtain|ed from |
|00004e50| 5c 66 49 26 6f 72 61 5f | 6c 6f 67 69 6e 28 29 5c |\fI&ora_|login()\|
|00004e60| 66 50 2e 0a 58 0a 58 54 | 72 61 6e 73 61 63 74 69 |fP..X.XT|ransacti|
|00004e70| 6f 6e 73 20 77 68 69 63 | 68 20 68 61 76 65 20 62 |ons whic|h have b|
|00004e80| 65 65 6e 20 63 6f 6d 6d | 69 74 74 65 64 0a 58 28 |een comm|itted.X(|
|00004e90| 65 69 74 68 65 72 20 65 | 78 70 6c 69 63 69 74 6c |either e|xplicitl|
|00004ea0| 79 20 62 79 20 61 20 63 | 61 6c 6c 20 74 6f 20 5c |y by a c|all to \|
|00004eb0| 66 49 26 6f 72 61 5f 63 | 6f 6d 6d 69 74 28 29 5c |fI&ora_c|ommit()\|
|00004ec0| 66 50 0a 58 6f 72 20 69 | 6d 70 6c 69 63 69 74 6c |fP.Xor i|mplicitl|
|00004ed0| 79 20 74 68 72 6f 75 67 | 68 20 74 68 65 20 75 73 |y throug|h the us|
|00004ee0| 65 20 6f 66 20 5c 66 49 | 26 6f 72 61 5f 61 75 74 |e of \fI|&ora_aut|
|00004ef0| 6f 63 6f 6d 6d 69 74 28 | 29 5c 66 50 29 0a 58 63 |ocommit(|)\fP).Xc|
|00004f00| 61 6e 6e 6f 74 20 62 65 | 20 73 75 62 73 65 71 75 |annot be| subsequ|
|00004f10| 65 6e 74 6c 79 20 72 6f | 6c 6c 65 64 20 62 61 63 |ently ro|lled bac|
|00004f20| 6b 2e 0a 58 0a 58 4e 6f | 74 65 20 74 68 61 74 20 |k..X.XNo|te that |
|00004f30| 63 6f 6d 6d 69 74 20 61 | 6e 64 20 72 6f 6c 6c 62 |commit a|nd rollb|
|00004f40| 61 63 6b 20 63 61 6e 20 | 6f 6e 6c 79 20 62 65 20 |ack can |only be |
|00004f50| 75 73 65 64 20 70 65 72 | 20 6c 6f 67 69 6e 2c 20 |used per| login, |
|00004f60| 6e 6f 74 20 70 65 72 20 | 73 74 61 74 65 6d 65 6e |not per |statemen|
|00004f70| 74 2e 0a 58 49 66 20 79 | 6f 75 20 6e 65 65 64 20 |t..XIf y|ou need |
|00004f80| 74 6f 20 63 6f 6d 6d 69 | 74 20 6f 72 20 72 6f 6c |to commi|t or rol|
|00004f90| 6c 62 61 63 6b 20 62 79 | 20 73 74 61 74 65 6d 65 |lback by| stateme|
|00004fa0| 6e 74 0a 58 79 6f 75 20 | 73 68 6f 75 6c 64 20 6d |nt.Xyou |should m|
|00004fb0| 61 6b 65 20 6d 75 6c 74 | 69 70 6c 65 20 63 61 6c |ake mult|iple cal|
|00004fc0| 6c 73 20 74 6f 20 5c 66 | 49 26 6f 72 61 5f 6c 6f |ls to \f|I&ora_lo|
|00004fd0| 67 69 6e 28 29 5c 66 50 | 0a 58 61 6e 64 20 75 73 |gin()\fP|.Xand us|
|00004fe0| 65 20 61 20 73 65 70 61 | 72 61 74 65 20 6c 6f 67 |e a sepa|rate log|
|00004ff0| 69 6e 20 69 64 65 6e 74 | 69 66 69 65 72 20 66 6f |in ident|ifier fo|
|00005000| 72 20 65 61 63 68 20 73 | 74 61 74 65 6d 65 6e 74 |r each s|tatement|
|00005010| 2e 0a 58 0a 58 54 68 65 | 73 65 20 66 75 6e 63 74 |..X.XThe|se funct|
|00005020| 69 6f 6e 73 20 61 72 65 | 20 65 71 75 69 76 61 6c |ions are| equival|
|00005030| 65 6e 74 20 74 6f 20 74 | 68 65 20 5c 66 49 4f 43 |ent to t|he \fIOC|
|00005040| 49 20 6f 63 6f 6d 5c 66 | 50 20 61 6e 64 20 5c 66 |I ocom\f|P and \f|
|00005050| 49 6f 72 6f 6c 5c 66 50 | 20 66 75 6e 63 74 69 6f |Iorol\fP| functio|
|00005060| 6e 73 2e 0a 58 2e 5c 22 | 0a 58 2e 53 48 20 22 26 |ns..X.\"|.X.SH "&|
|00005070| 6f 72 61 5f 76 65 72 73 | 69 6f 6e 28 29 22 0a 58 |ora_vers|ion()".X|
|00005080| 2e 5c 22 0a 58 54 68 65 | 20 5c 66 49 26 6f 72 61 |.\".XThe| \fI&ora|
|00005090| 5f 76 65 72 73 69 6f 6e | 28 29 5c 66 50 20 66 75 |_version|()\fP fu|
|000050a0| 6e 63 74 69 6f 6e 0a 58 | 70 72 69 6e 74 73 20 74 |nction.X|prints t|
|000050b0| 68 65 20 76 65 72 73 69 | 6f 6e 20 6e 75 6d 62 65 |he versi|on numbe|
|000050c0| 72 20 61 6e 64 20 63 6f | 70 79 72 69 67 68 74 20 |r and co|pyright |
|000050d0| 69 6e 66 6f 72 6d 61 74 | 69 6f 6e 20 63 6f 6e 63 |informat|ion conc|
|000050e0| 65 72 6e 69 6e 67 20 4f | 72 61 70 65 72 6c 2e 0a |erning O|raperl..|
|000050f0| 58 49 74 20 61 6c 73 6f | 20 70 72 69 6e 74 73 20 |XIt also| prints |
|00005100| 74 68 65 20 76 61 6c 75 | 65 73 20 6f 66 20 76 61 |the valu|es of va|
|00005110| 72 69 6f 75 73 20 63 6f | 6d 70 69 6c 61 74 69 6f |rious co|mpilatio|
|00005120| 6e 20 74 69 6d 65 20 6f | 70 74 69 6f 6e 73 2e 0a |n time o|ptions..|
|00005130| 58 49 74 20 64 6f 65 73 | 20 6e 6f 74 20 72 65 74 |XIt does| not ret|
|00005140| 75 72 6e 20 61 6e 79 20 | 76 61 6c 75 65 2c 20 61 |urn any |value, a|
|00005150| 6e 64 20 73 68 6f 75 6c | 64 20 6e 6f 74 20 6e 6f |nd shoul|d not no|
|00005160| 72 6d 61 6c 6c 79 20 62 | 65 20 75 73 65 64 20 69 |rmally b|e used i|
|00005170| 6e 20 61 20 70 72 6f 67 | 72 61 6d 2e 0a 58 0a 58 |n a prog|ram..X.X|
|00005180| 2e 6e 65 20 31 34 0a 58 | 45 78 61 6d 70 6c 65 3a |.ne 14.X|Example:|
|00005190| 0a 58 0a 58 2e 6e 66 0a | 58 2e 69 6e 20 2b 2e 35 |.X.X.nf.|X.in +.5|
|000051a0| 69 0a 58 2e 69 66 20 74 | 20 2e 66 74 20 43 57 0a |i.X.if t| .ft CW.|
|000051b0| 58 24 20 6f 72 61 70 65 | 72 6c 20 5c 2d 65 20 27 |X$ orape|rl \-e '|
|000051c0| 26 6f 72 61 5f 76 65 72 | 73 69 6f 6e 27 0a 58 0a |&ora_ver|sion'.X.|
|000051d0| 58 54 68 69 73 20 69 73 | 20 4f 72 61 70 65 72 6c |XThis is| Oraperl|
|000051e0| 2c 20 76 65 72 73 69 6f | 6e 20 32 2c 20 70 61 74 |, versio|n 2, pat|
|000051f0| 63 68 20 6c 65 76 65 6c | 20 30 2e 0a 58 0a 58 44 |ch level| 0..X.XD|
|00005200| 65 62 75 67 67 69 6e 67 | 20 69 73 20 61 76 61 69 |ebugging| is avai|
|00005210| 6c 61 62 6c 65 2c 20 69 | 6e 63 6c 75 64 69 6e 67 |lable, i|ncluding|
|00005220| 20 74 68 65 20 5c 2d 44 | 20 66 6c 61 67 2e 0a 58 | the \-D| flag..X|
|00005230| 44 65 66 61 75 6c 74 20 | 66 65 74 63 68 20 72 6f |Default |fetch ro|
|00005240| 77 20 63 61 63 68 65 20 | 73 69 7a 65 20 69 73 20 |w cache |size is |
|00005250| 35 2e 0a 58 45 6d 70 74 | 79 20 62 69 6e 64 20 76 |5..XEmpt|y bind v|
|00005260| 61 6c 75 65 73 20 61 72 | 65 20 72 65 70 6c 61 63 |alues ar|e replac|
|00005270| 65 64 20 62 79 20 61 20 | 73 70 61 63 65 2e 0a 58 |ed by a |space..X|
|00005280| 0a 58 50 65 72 6c 20 69 | 73 20 63 6f 70 79 72 69 |.XPerl i|s copyri|
|00005290| 67 68 74 20 62 79 20 4c | 61 72 72 79 20 57 61 6c |ght by L|arry Wal|
|000052a0| 6c 3b 20 74 79 70 65 20 | 6f 72 61 70 65 72 6c 20 |l; type |oraperl |
|000052b0| 5c 2d 76 20 66 6f 72 20 | 64 65 74 61 69 6c 73 2e |\-v for |details.|
|000052c0| 0a 58 41 64 64 69 74 69 | 6f 6e 73 20 66 6f 72 20 |.XAdditi|ons for |
|000052d0| 6f 72 61 70 65 72 6c 3a | 20 43 6f 70 79 72 69 67 |oraperl:| Copyrig|
|000052e0| 68 74 20 31 39 39 31 2c | 20 31 39 39 32 2c 20 4b |ht 1991,| 1992, K|
|000052f0| 65 76 69 6e 20 53 74 6f | 63 6b 2e 0a 58 0a 58 4f |evin Sto|ck..X.XO|
|00005300| 72 61 70 65 72 6c 20 6d | 61 79 20 62 65 20 64 69 |raperl m|ay be di|
|00005310| 73 74 72 69 62 75 74 65 | 64 20 75 6e 64 65 72 20 |stribute|d under |
|00005320| 74 68 65 20 73 61 6d 65 | 20 63 6f 6e 64 69 74 69 |the same| conditi|
|00005330| 6f 6e 73 20 61 73 20 50 | 65 72 6c 2e 0a 58 2e 69 |ons as P|erl..X.i|
|00005340| 66 20 74 20 2e 66 74 20 | 50 0a 58 2e 69 6e 20 2d |f t .ft |P.X.in -|
|00005350| 2e 35 69 0a 58 2e 66 69 | 0a 58 0a 58 54 68 69 73 |.5i.X.fi|.X.XThis|
|00005360| 20 66 75 6e 63 74 69 6f | 6e 20 69 73 20 74 68 65 | functio|n is the|
|00005370| 20 65 71 75 69 76 61 6c | 65 6e 74 20 6f 66 20 5c | equival|ent of \|
|00005380| 66 49 50 65 72 6c 5c 66 | 50 27 73 20 5c 66 42 5c |fIPerl\f|P's \fB\|
|00005390| 2d 76 5c 66 50 20 66 6c | 61 67 2e 0a 58 2e 5c 22 |-v\fP fl|ag..X.\"|
|000053a0| 0a 58 2e 53 48 20 56 41 | 52 49 41 42 4c 45 53 0a |.X.SH VA|RIABLES.|
|000053b0| 58 2e 5c 22 0a 58 53 69 | 78 20 73 70 65 63 69 61 |X.\".XSi|x specia|
|000053c0| 6c 20 76 61 72 69 61 62 | 6c 65 73 20 61 72 65 20 |l variab|les are |
|000053d0| 70 72 6f 76 69 64 65 64 | 2c 0a 58 5c 66 49 24 6f |provided|,.X\fI$o|
|000053e0| 72 61 5f 63 61 63 68 65 | 5c 66 50 2c 0a 58 5c 66 |ra_cache|\fP,.X\f|
|000053f0| 49 24 6f 72 61 5f 6c 6f | 6e 67 5c 66 50 2c 0a 58 |I$ora_lo|ng\fP,.X|
|00005400| 5c 66 49 24 6f 72 61 5f | 74 72 75 6e 63 5c 66 50 |\fI$ora_|trunc\fP|
|00005410| 2c 0a 58 5c 66 49 24 6f | 72 61 5f 65 72 72 6e 6f |,.X\fI$o|ra_errno|
|00005420| 5c 66 50 2c 0a 58 5c 66 | 49 24 6f 72 61 5f 65 72 |\fP,.X\f|I$ora_er|
|00005430| 72 73 74 72 5c 66 50 20 | 61 6e 64 0a 58 5c 66 49 |rstr\fP |and.X\fI|
|00005440| 24 6f 72 61 5f 76 65 72 | 6e 6f 5c 66 50 2e 0a 58 |$ora_ver|no\fP..X|
|00005450| 2e 5c 22 0a 58 2e 53 48 | 20 22 43 75 73 74 6f 6d |.\".X.SH| "Custom|
|00005460| 69 73 61 74 69 6f 6e 20 | 56 61 72 69 61 62 6c 65 |isation |Variable|
|00005470| 73 22 0a 58 2e 5c 22 0a | 58 54 68 65 73 65 20 76 |s".X.\".|XThese v|
|00005480| 61 72 69 61 62 6c 65 73 | 20 61 72 65 20 75 73 65 |ariables| are use|
|00005490| 64 20 74 6f 20 64 69 63 | 74 61 74 65 20 74 68 65 |d to dic|tate the|
|000054a0| 20 62 65 68 61 76 69 6f | 75 72 20 6f 66 20 5c 66 | behavio|ur of \f|
|000054b0| 49 4f 72 61 70 65 72 6c | 5c 66 50 0a 58 75 6e 64 |IOraperl|\fP.Xund|
|000054c0| 65 72 20 63 65 72 74 61 | 69 6e 20 63 6f 6e 64 69 |er certa|in condi|
|000054d0| 74 69 6f 6e 73 2e 0a 58 | 2e 5c 22 0a 58 2e 53 48 |tions..X|.\".X.SH|
|000054e0| 20 22 24 6f 72 61 5f 63 | 61 63 68 65 22 0a 58 2e | "$ora_c|ache".X.|
|000054f0| 5c 22 0a 58 54 68 65 20 | 5c 66 49 24 6f 72 61 5f |\".XThe |\fI$ora_|
|00005500| 63 61 63 68 65 5c 66 50 | 20 76 61 72 69 61 62 6c |cache\fP| variabl|
|00005510| 65 0a 58 64 65 74 65 72 | 6d 69 6e 65 73 20 74 68 |e.Xdeter|mines th|
|00005520| 65 20 64 65 66 61 75 6c | 74 20 63 61 63 68 65 20 |e defaul|t cache |
|00005530| 73 69 7a 65 20 75 73 65 | 64 20 62 79 20 74 68 65 |size use|d by the|
|00005540| 20 5c 66 49 26 6f 72 61 | 5f 6f 70 65 6e 28 29 5c | \fI&ora|_open()\|
|00005550| 66 50 20 66 75 6e 63 74 | 69 6f 6e 0a 58 66 6f 72 |fP funct|ion.Xfor|
|00005560| 20 5c 66 42 53 45 4c 45 | 43 54 5c 66 50 20 73 74 | \fBSELE|CT\fP st|
|00005570| 61 74 65 6d 65 6e 74 73 | 0a 58 69 66 20 61 6e 20 |atements|.Xif an |
|00005580| 65 78 70 6c 69 63 69 74 | 20 63 61 63 68 65 20 73 |explicit| cache s|
|00005590| 69 7a 65 20 69 73 20 6e | 6f 74 20 67 69 76 65 6e |ize is n|ot given|
|000055a0| 2e 0a 58 0a 58 49 74 20 | 69 73 20 69 6e 69 74 69 |..X.XIt |is initi|
|000055b0| 61 6c 69 73 65 64 20 74 | 6f 20 74 68 65 20 64 65 |alised t|o the de|
|000055c0| 66 61 75 6c 74 20 76 61 | 6c 75 65 20 72 65 70 6f |fault va|lue repo|
|000055d0| 72 74 65 64 20 62 79 20 | 5c 66 49 26 6f 72 61 5f |rted by |\fI&ora_|
|000055e0| 76 65 72 73 69 6f 6e 28 | 29 5c 66 50 0a 58 62 75 |version(|)\fP.Xbu|
|000055f0| 74 20 6d 61 79 20 62 65 | 20 73 65 74 20 77 69 74 |t may be| set wit|
|00005600| 68 69 6e 20 61 20 70 72 | 6f 67 72 61 6d 0a 58 74 |hin a pr|ogram.Xt|
|00005610| 6f 20 61 70 70 6c 79 20 | 74 6f 20 61 6c 6c 20 73 |o apply |to all s|
|00005620| 75 62 73 65 71 75 65 6e | 74 20 63 61 6c 6c 73 20 |ubsequen|t calls |
|00005630| 74 6f 20 5c 66 49 26 6f | 72 61 5f 6f 70 65 6e 28 |to \fI&o|ra_open(|
|00005640| 29 5c 66 50 2e 0a 58 43 | 75 72 73 6f 72 73 20 77 |)\fP..XC|ursors w|
|00005650| 68 69 63 68 20 61 72 65 | 20 61 6c 72 65 61 64 79 |hich are| already|
|00005660| 20 6f 70 65 6e 20 61 72 | 65 20 6e 6f 74 20 61 66 | open ar|e not af|
|00005670| 66 65 63 74 65 64 2e 0a | 58 41 73 20 64 69 73 74 |fected..|XAs dist|
|00005680| 72 69 62 75 74 65 64 2c | 20 74 68 65 20 64 65 66 |ributed,| the def|
|00005690| 61 75 6c 74 20 76 61 6c | 75 65 20 69 73 20 66 69 |ault val|ue is fi|
|000056a0| 76 65 2c 0a 58 62 75 74 | 20 6d 61 79 20 68 61 76 |ve,.Xbut| may hav|
|000056b0| 65 20 62 65 65 6e 20 61 | 6c 74 65 72 65 64 20 61 |e been a|ltered a|
|000056c0| 74 20 79 6f 75 72 20 69 | 6e 73 74 61 6c 6c 61 74 |t your i|nstallat|
|000056d0| 69 6f 6e 2e 0a 58 0a 58 | 41 73 20 61 20 73 70 65 |ion..X.X|As a spe|
|000056e0| 63 69 61 6c 20 63 61 73 | 65 2c 20 61 73 73 69 67 |cial cas|e, assig|
|000056f0| 6e 69 6e 67 20 7a 65 72 | 6f 20 74 6f 20 5c 66 49 |ning zer|o to \fI|
|00005700| 24 6f 72 61 5f 63 61 63 | 68 65 5c 66 50 0a 58 72 |$ora_cac|he\fP.Xr|
|00005710| 65 73 65 74 73 20 69 74 | 20 74 6f 20 74 68 65 20 |esets it| to the |
|00005720| 64 65 66 61 75 6c 74 20 | 76 61 6c 75 65 2e 0a 58 |default |value..X|
|00005730| 41 74 74 65 6d 70 74 69 | 6e 67 20 74 6f 20 73 65 |Attempti|ng to se|
|00005740| 74 20 5c 66 49 24 6f 72 | 61 5f 63 61 63 68 65 5c |t \fI$or|a_cache\|
|00005750| 66 50 20 74 6f 20 61 20 | 6e 65 67 61 74 69 76 65 |fP to a |negative|
|00005760| 20 76 61 6c 75 65 0a 58 | 72 65 73 75 6c 74 73 20 | value.X|results |
|00005770| 69 6e 20 61 20 77 61 72 | 6e 69 6e 67 2e 0a 58 2e |in a war|ning..X.|
|00005780| 5c 22 0a 58 2e 53 48 20 | 22 24 6f 72 61 5f 6c 6f |\".X.SH |"$ora_lo|
|00005790| 6e 67 22 0a 58 2e 5c 22 | 0a 58 4e 6f 72 6d 61 6c |ng".X.\"|.XNormal|
|000057a0| 6c 79 2c 20 5c 66 49 4f | 72 61 70 65 72 6c 5c 66 |ly, \fIO|raperl\f|
|000057b0| 50 20 69 6e 74 65 72 72 | 6f 67 61 74 65 73 20 74 |P interr|ogates t|
|000057c0| 68 65 20 64 61 74 61 62 | 61 73 65 0a 58 74 6f 20 |he datab|ase.Xto |
|000057d0| 64 65 74 65 72 6d 69 6e | 65 20 74 68 65 20 6c 65 |determin|e the le|
|000057e0| 6e 67 74 68 20 6f 66 20 | 65 61 63 68 20 66 69 65 |ngth of |each fie|
|000057f0| 6c 64 0a 58 61 6e 64 20 | 61 6c 6c 6f 63 61 74 65 |ld.Xand |allocate|
|00005800| 73 20 62 75 66 66 65 72 | 20 73 70 61 63 65 20 61 |s buffer| space a|
|00005810| 63 63 6f 72 64 69 6e 67 | 6c 79 2e 0a 58 54 68 69 |ccording|ly..XThi|
|00005820| 73 20 69 73 20 6e 6f 74 | 20 70 6f 73 73 69 62 6c |s is not| possibl|
|00005830| 65 20 66 6f 72 20 66 69 | 65 6c 64 73 20 6f 66 20 |e for fi|elds of |
|00005840| 74 79 70 65 20 5c 66 42 | 4c 4f 4e 47 5c 66 50 20 |type \fB|LONG\fP |
|00005850| 6f 72 20 5c 66 42 4c 4f | 4e 47 52 41 57 5c 66 50 |or \fBLO|NGRAW\fP|
|00005860| 2e 0a 58 54 6f 20 61 6c | 6c 6f 63 61 74 65 20 73 |..XTo al|locate s|
|00005870| 70 61 63 65 20 61 63 63 | 6f 72 64 69 6e 67 20 74 |pace acc|ording t|
|00005880| 6f 20 74 68 65 20 6d 61 | 78 69 6d 75 6d 20 70 6f |o the ma|ximum po|
|00005890| 73 73 69 62 6c 65 20 6c | 65 6e 67 74 68 20 28 36 |ssible l|ength (6|
|000058a0| 35 35 33 35 20 62 79 74 | 65 73 29 0a 58 77 6f 75 |5535 byt|es).Xwou|
|000058b0| 6c 64 20 6f 62 76 69 6f | 75 73 6c 79 20 62 65 20 |ld obvio|usly be |
|000058c0| 65 78 74 72 65 6d 65 6c | 79 20 77 61 73 74 65 66 |extremel|y wastef|
|000058d0| 75 6c 20 6f 66 20 6d 65 | 6d 6f 72 79 2e 0a 58 0a |ul of me|mory..X.|
|000058e0| 58 54 68 65 72 65 66 6f | 72 65 2c 20 77 68 65 6e |XTherefo|re, when|
|000058f0| 20 5c 66 49 26 6f 72 61 | 5f 6f 70 65 6e 28 29 5c | \fI&ora|_open()\|
|00005900| 66 50 20 64 65 74 65 72 | 6d 69 6e 65 73 20 74 68 |fP deter|mines th|
|00005910| 61 74 20 61 20 66 69 65 | 6c 64 20 69 73 20 61 20 |at a fie|ld is a |
|00005920| 5c 66 42 4c 4f 4e 47 5c | 66 50 20 74 79 70 65 2c |\fBLONG\|fP type,|
|00005930| 0a 58 69 74 20 61 6c 6c | 6f 63 61 74 65 73 20 74 |.Xit all|ocates t|
|00005940| 68 65 20 61 6d 6f 75 6e | 74 20 6f 66 20 73 70 61 |he amoun|t of spa|
|00005950| 63 65 20 69 6e 64 69 63 | 61 74 65 64 20 62 79 20 |ce indic|ated by |
|00005960| 74 68 65 20 5c 66 49 24 | 6f 72 61 5f 6c 6f 6e 67 |the \fI$|ora_long|
|00005970| 5c 66 50 20 76 61 72 69 | 61 62 6c 65 2e 0a 58 54 |\fP vari|able..XT|
|00005980| 68 69 73 20 69 73 20 69 | 6e 69 74 69 61 6c 6c 79 |his is i|nitially|
|00005990| 20 73 65 74 20 74 6f 20 | 5c 66 42 38 30 5c 66 50 | set to |\fB80\fP|
|000059a0| 0a 58 28 66 6f 72 20 63 | 6f 6d 70 61 74 69 62 69 |.X(for c|ompatibi|
|000059b0| 6c 69 74 79 20 77 69 74 | 68 20 5c 66 49 4f 72 61 |lity wit|h \fIOra|
|000059c0| 63 6c 65 5c 66 50 20 70 | 72 6f 64 75 63 74 73 29 |cle\fP p|roducts)|
|000059d0| 0a 58 62 75 74 20 6d 61 | 79 20 62 65 20 73 65 74 |.Xbut ma|y be set|
|000059e0| 20 77 69 74 68 69 6e 20 | 61 20 70 72 6f 67 72 61 | within |a progra|
|000059f0| 6d 20 74 6f 20 77 68 61 | 74 65 76 65 72 20 73 69 |m to wha|tever si|
|00005a00| 7a 65 20 69 73 20 72 65 | 71 75 69 72 65 64 2e 0a |ze is re|quired..|
|00005a10| 58 2e 5c 22 0a 58 2e 53 | 48 20 22 24 6f 72 61 5f |X.\".X.S|H "$ora_|
|00005a20| 74 72 75 6e 63 22 0a 58 | 2e 5c 22 0a 58 53 69 6e |trunc".X|.\".XSin|
|00005a30| 63 65 20 5c 66 49 4f 72 | 61 70 65 72 6c 5c 66 50 |ce \fIOr|aperl\fP|
|00005a40| 20 63 61 6e 6e 6f 74 20 | 64 65 74 65 72 6d 69 6e | cannot |determin|
|00005a50| 65 20 65 78 61 63 74 6c | 79 0a 58 74 68 65 20 6d |e exactl|y.Xthe m|
|00005a60| 61 78 69 6d 75 6d 20 6c | 65 6e 67 74 68 20 6f 66 |aximum l|ength of|
|00005a70| 20 61 20 5c 66 42 4c 4f | 4e 47 5c 66 50 20 66 69 | a \fBLO|NG\fP fi|
|00005a80| 65 6c 64 2c 0a 58 69 74 | 20 69 73 20 70 6f 73 73 |eld,.Xit| is poss|
|00005a90| 69 62 6c 65 20 74 68 61 | 74 20 74 68 65 20 6c 65 |ible tha|t the le|
|00005aa0| 6e 67 74 68 20 69 6e 64 | 69 63 61 74 65 64 20 62 |ngth ind|icated b|
|00005ab0| 79 20 5c 66 49 24 6f 72 | 61 5f 6c 6f 6e 67 5c 66 |y \fI$or|a_long\f|
|00005ac0| 50 0a 58 69 73 20 6e 6f | 74 20 73 75 66 66 69 63 |P.Xis no|t suffic|
|00005ad0| 69 65 6e 74 20 74 6f 20 | 73 74 6f 72 65 20 74 68 |ient to |store th|
|00005ae0| 65 20 64 61 74 61 20 66 | 65 74 63 68 65 64 2e 0a |e data f|etched..|
|00005af0| 58 49 6e 20 73 75 63 68 | 20 61 20 63 61 73 65 2c |XIn such| a case,|
|00005b00| 20 74 68 65 20 6f 70 74 | 69 6f 6e 61 6c 20 73 65 | the opt|ional se|
|00005b10| 63 6f 6e 64 20 70 61 72 | 61 6d 65 74 65 72 20 74 |cond par|ameter t|
|00005b20| 6f 20 5c 66 49 26 6f 72 | 61 5f 66 65 74 63 68 28 |o \fI&or|a_fetch(|
|00005b30| 29 5c 66 50 0a 58 69 6e | 64 69 63 61 74 65 73 20 |)\fP.Xin|dicates |
|00005b40| 77 68 65 74 68 65 72 20 | 74 68 65 20 74 72 75 6e |whether |the trun|
|00005b50| 63 61 74 69 6f 6e 20 73 | 68 6f 75 6c 64 20 62 65 |cation s|hould be|
|00005b60| 20 61 6c 6c 6f 77 65 64 | 0a 58 6f 72 20 73 68 6f | allowed|.Xor sho|
|00005b70| 75 6c 64 20 70 72 6f 76 | 6f 6b 65 20 61 6e 20 65 |uld prov|oke an e|
|00005b80| 72 72 6f 72 2e 0a 58 0a | 58 49 66 20 74 68 69 73 |rror..X.|XIf this|
|00005b90| 20 73 65 63 6f 6e 64 20 | 70 61 72 61 6d 65 74 65 | second |paramete|
|00005ba0| 72 20 69 73 20 6e 6f 74 | 20 73 70 65 63 69 66 69 |r is not| specifi|
|00005bb0| 65 64 2c 0a 58 74 68 65 | 20 76 61 6c 75 65 20 6f |ed,.Xthe| value o|
|00005bc0| 66 20 5c 66 49 24 6f 72 | 61 5f 74 72 75 6e 63 5c |f \fI$or|a_trunc\|
|00005bd0| 66 50 20 69 73 20 75 73 | 65 64 20 61 73 20 61 20 |fP is us|ed as a |
|00005be0| 64 65 66 61 75 6c 74 2e | 0a 58 54 68 69 73 20 6f |default.|.XThis o|
|00005bf0| 6e 6c 79 20 61 70 70 6c | 69 65 73 20 74 6f 20 5c |nly appl|ies to \|
|00005c00| 66 42 4c 4f 4e 47 5c 66 | 50 20 61 6e 64 20 5c 66 |fBLONG\f|P and \f|
|00005c10| 42 4c 4f 4e 47 52 41 57 | 5c 66 50 20 64 61 74 61 |BLONGRAW|\fP data|
|00005c20| 20 74 79 70 65 73 2e 0a | 58 54 72 75 6e 63 61 74 | types..|XTruncat|
|00005c30| 69 6f 6e 20 6f 66 20 61 | 20 66 69 65 6c 64 20 6f |ion of a| field o|
|00005c40| 66 20 61 6e 79 20 6f 74 | 68 65 72 20 74 79 70 65 |f any ot|her type|
|00005c50| 20 69 73 20 61 6c 77 61 | 79 73 20 63 6f 6e 73 69 | is alwa|ys consi|
|00005c60| 64 65 72 65 64 20 61 6e | 20 65 72 72 6f 72 0a 58 |dered an| error.X|
|00005c70| 28 70 72 69 6e 63 69 70 | 61 6c 6c 79 20 62 65 63 |(princip|ally bec|
|00005c80| 61 75 73 65 20 69 74 20 | 69 6e 64 69 63 61 74 65 |ause it |indicate|
|00005c90| 73 20 61 20 62 75 67 20 | 69 6e 20 5c 66 49 4f 72 |s a bug |in \fIOr|
|00005ca0| 61 70 65 72 6c 5c 66 50 | 29 2e 0a 58 2e 5c 22 0a |aperl\fP|)..X.\".|
|00005cb0| 58 2e 53 48 20 22 53 74 | 61 74 75 73 20 56 61 72 |X.SH "St|atus Var|
|00005cc0| 69 61 62 6c 65 73 22 0a | 58 2e 5c 22 0a 58 54 68 |iables".|X.\".XTh|
|00005cd0| 65 73 65 20 76 61 72 69 | 61 62 6c 65 73 20 72 65 |ese vari|ables re|
|00005ce0| 70 6f 72 74 20 69 6e 66 | 6f 72 6d 61 74 69 6f 6e |port inf|ormation|
|00005cf0| 20 61 62 6f 75 74 20 65 | 72 72 6f 72 20 63 6f 6e | about e|rror con|
|00005d00| 64 69 74 69 6f 6e 73 0a | 58 6f 72 20 61 62 6f 75 |ditions.|Xor abou|
|00005d10| 74 20 5c 66 49 4f 72 61 | 70 65 72 6c 5c 66 50 20 |t \fIOra|perl\fP |
|00005d20| 69 74 73 65 6c 66 2e 0a | 58 54 68 65 79 20 6d 61 |itself..|XThey ma|
|00005d30| 79 20 6f 6e 6c 79 20 62 | 65 20 72 65 61 64 3b 0a |y only b|e read;.|
|00005d40| 58 61 20 66 61 74 61 6c | 20 65 72 72 6f 72 20 6f |Xa fatal| error o|
|00005d50| 63 63 75 72 73 20 69 66 | 20 61 20 70 72 6f 67 72 |ccurs if| a progr|
|00005d60| 61 6d 20 61 74 74 65 6d | 70 74 73 20 74 6f 20 63 |am attem|pts to c|
|00005d70| 68 61 6e 67 65 20 74 68 | 65 6d 2e 0a 58 2e 5c 22 |hange th|em..X.\"|
|00005d80| 0a 58 2e 53 48 20 22 24 | 6f 72 61 5f 65 72 72 6e |.X.SH "$|ora_errn|
|00005d90| 6f 22 0a 58 2e 5c 22 0a | 58 5c 66 49 24 6f 72 61 |o".X.\".|X\fI$ora|
|00005da0| 5f 65 72 72 6e 6f 5c 66 | 50 20 63 6f 6e 74 61 69 |_errno\f|P contai|
|00005db0| 6e 73 20 74 68 65 20 5c | 66 49 4f 72 61 63 6c 65 |ns the \|fIOracle|
|00005dc0| 5c 66 50 20 65 72 72 6f | 72 20 63 6f 64 65 0a 58 |\fP erro|r code.X|
|00005dd0| 70 72 6f 76 6f 6b 65 64 | 20 62 79 20 74 68 65 20 |provoked| by the |
|00005de0| 6c 61 73 74 20 66 75 6e | 63 74 69 6f 6e 20 63 61 |last fun|ction ca|
|00005df0| 6c 6c 2e 0a 58 0a 58 54 | 68 65 72 65 20 61 72 65 |ll..X.XT|here are|
|00005e00| 20 74 77 6f 20 63 61 73 | 65 73 20 6f 66 20 70 61 | two cas|es of pa|
|00005e10| 72 74 69 63 75 6c 61 72 | 20 69 6e 74 65 72 65 73 |rticular| interes|
|00005e20| 74 20 63 6f 6e 63 65 72 | 6e 69 6e 67 20 5c 66 49 |t concer|ning \fI|
|00005e30| 26 6f 72 61 5f 66 65 74 | 63 68 28 29 5c 66 50 2e |&ora_fet|ch()\fP.|
|00005e40| 0a 58 49 66 20 61 20 5c | 66 42 4c 4f 4e 47 5c 66 |.XIf a \|fBLONG\f|
|00005e50| 50 20 6f 72 20 5c 66 42 | 4c 4f 4e 47 52 41 57 5c |P or \fB|LONGRAW\|
|00005e60| 66 50 20 66 69 65 6c 64 | 20 69 73 20 74 72 75 6e |fP field| is trun|
|00005e70| 63 61 74 65 64 20 28 61 | 6e 64 20 74 72 75 6e 63 |cated (a|nd trunc|
|00005e80| 61 74 69 6f 6e 20 69 73 | 20 61 6c 6c 6f 77 65 64 |ation is| allowed|
|00005e90| 29 0a 58 74 68 65 6e 20 | 5c 66 49 26 6f 72 61 5f |).Xthen |\fI&ora_|
|00005ea0| 66 65 74 63 68 28 29 5c | 66 50 20 77 69 6c 6c 20 |fetch()\|fP will |
|00005eb0| 63 6f 6d 70 6c 65 74 65 | 20 73 75 63 63 65 73 73 |complete| success|
|00005ec0| 66 75 6c 6c 79 0a 58 62 | 75 74 20 5c 66 49 24 6f |fully.Xb|ut \fI$o|
|00005ed0| 72 61 5f 65 72 72 6e 6f | 5c 66 50 20 77 69 6c 6c |ra_errno|\fP will|
|00005ee0| 20 62 65 20 73 65 74 20 | 74 6f 20 5c 66 42 31 34 | be set |to \fB14|
|00005ef0| 30 36 5c 66 50 20 74 6f | 20 69 6e 64 69 63 61 74 |06\fP to| indicat|
|00005f00| 65 20 74 68 65 20 74 72 | 75 6e 63 61 74 69 6f 6e |e the tr|uncation|
|00005f10| 2e 0a 58 57 68 65 6e 20 | 5c 66 49 26 6f 72 61 5f |..XWhen |\fI&ora_|
|00005f20| 66 65 74 63 68 28 29 5c | 66 50 20 66 61 69 6c 73 |fetch()\|fP fails|
|00005f30| 2c 0a 58 5c 66 49 24 6f | 72 61 5f 65 72 72 73 74 |,.X\fI$o|ra_errst|
|00005f40| 72 5c 66 50 20 77 69 6c | 6c 20 62 65 20 73 65 74 |r\fP wil|l be set|
|00005f50| 20 74 6f 20 7a 65 72 6f | 20 69 66 20 74 68 69 73 | to zero| if this|
|00005f60| 20 77 61 73 20 64 75 65 | 20 74 6f 20 74 68 65 20 | was due| to the |
|00005f70| 65 6e 64 20 6f 66 20 64 | 61 74 61 0a 58 6f 72 20 |end of d|ata.Xor |
|00005f80| 61 6e 20 65 72 72 6f 72 | 20 63 6f 64 65 20 69 66 |an error| code if|
|00005f90| 20 69 74 20 77 61 73 20 | 64 75 65 20 74 6f 20 61 | it was |due to a|
|00005fa0| 6e 20 61 63 74 75 61 6c | 20 65 72 72 6f 72 2e 0a |n actual| error..|
|00005fb0| 58 2e 5c 22 0a 58 2e 53 | 48 20 22 24 6f 72 61 5f |X.\".X.S|H "$ora_|
|00005fc0| 65 72 72 73 74 72 22 0a | 58 2e 5c 22 0a 58 54 68 |errstr".|X.\".XTh|
|00005fd0| 65 20 5c 66 49 24 6f 72 | 61 5f 65 72 72 73 74 72 |e \fI$or|a_errstr|
|00005fe0| 5c 66 50 20 76 61 72 69 | 61 62 6c 65 20 63 6f 6e |\fP vari|able con|
|00005ff0| 74 61 69 6e 73 20 74 68 | 65 20 5c 66 49 4f 72 61 |tains th|e \fIOra|
|00006000| 63 6c 65 5c 66 50 20 65 | 72 72 6f 72 20 6d 65 73 |cle\fP e|rror mes|
|00006010| 73 61 67 65 0a 58 63 6f | 72 72 65 73 70 6f 6e 64 |sage.Xco|rrespond|
|00006020| 69 6e 67 20 74 6f 20 74 | 68 65 20 63 75 72 72 65 |ing to t|he curre|
|00006030| 6e 74 20 76 61 6c 75 65 | 20 6f 66 20 5c 66 49 24 |nt value| of \fI$|
|00006040| 6f 72 61 5f 65 72 72 6e | 6f 5c 66 50 2e 0a 58 0a |ora_errn|o\fP..X.|
|00006050| 58 54 68 69 73 20 69 73 | 20 65 71 75 69 76 61 6c |XThis is| equival|
|00006060| 65 6e 74 20 74 6f 20 74 | 68 65 20 5c 66 49 4f 43 |ent to t|he \fIOC|
|00006070| 49 20 6f 65 72 72 6d 73 | 67 5c 66 50 20 66 75 6e |I oerrms|g\fP fun|
|00006080| 63 74 69 6f 6e 2e 0a 58 | 2e 5c 22 0a 58 2e 53 48 |ction..X|.\".X.SH|
|00006090| 20 22 24 6f 72 61 5f 76 | 65 72 6e 6f 22 0a 58 2e | "$ora_v|erno".X.|
|000060a0| 5c 22 0a 58 54 68 65 20 | 5c 66 49 24 6f 72 61 5f |\".XThe |\fI$ora_|
|000060b0| 76 65 72 6e 6f 5c 66 50 | 20 76 61 72 69 61 62 6c |verno\fP| variabl|
|000060c0| 65 20 63 6f 6e 74 61 69 | 6e 73 20 74 68 65 20 76 |e contai|ns the v|
|000060d0| 65 72 73 69 6f 6e 20 6e | 75 6d 62 65 72 20 6f 66 |ersion n|umber of|
|000060e0| 20 5c 66 49 4f 72 61 70 | 65 72 6c 5c 66 50 0a 58 | \fIOrap|erl\fP.X|
|000060f0| 69 6e 20 74 68 65 20 66 | 6f 72 6d 5c 20 5c 66 49 |in the f|orm\ \fI|
|00006100| 76 5c 66 42 2e 5c 66 49 | 70 70 70 5c 66 52 0a 58 |v\fB.\fI|ppp\fR.X|
|00006110| 77 68 65 72 65 20 5c 66 | 49 76 5c 66 50 20 69 73 |where \f|Iv\fP is|
|00006120| 20 74 68 65 20 6d 61 6a | 6f 72 20 76 65 72 73 69 | the maj|or versi|
|00006130| 6f 6e 20 6e 75 6d 62 65 | 72 0a 58 61 6e 64 20 5c |on numbe|r.Xand \|
|00006140| 66 49 70 70 70 5c 66 50 | 20 69 73 20 74 68 65 20 |fIppp\fP| is the |
|00006150| 70 61 74 63 68 6c 65 76 | 65 6c 2e 0a 58 46 6f 72 |patchlev|el..XFor|
|00006160| 20 65 78 61 6d 70 6c 65 | 2c 20 69 6e 20 5c 66 49 | example|, in \fI|
|00006170| 4f 72 61 70 65 72 6c 5c | 66 50 20 76 65 72 73 69 |Oraperl\|fP versi|
|00006180| 6f 6e 20 33 2c 20 70 61 | 74 63 68 20 6c 65 76 65 |on 3, pa|tch leve|
|00006190| 6c 20 31 34 32 2c 0a 58 | 5c 66 49 24 6f 72 61 5f |l 142,.X|\fI$ora_|
|000061a0| 76 65 72 6e 6f 5c 66 50 | 20 77 6f 75 6c 64 20 63 |verno\fP| would c|
|000061b0| 6f 6e 74 61 69 6e 20 74 | 68 65 20 76 61 6c 75 65 |ontain t|he value|
|000061c0| 20 5c 66 42 33 2e 31 34 | 32 5c 66 50 0a 58 28 6d | \fB3.14|2\fP.X(m|
|000061d0| 6f 72 65 20 6f 72 20 6c | 65 73 73 2c 20 61 6c 6c |ore or l|ess, all|
|000061e0| 6f 77 69 6e 67 20 66 6f | 72 20 66 6c 6f 61 74 69 |owing fo|r floati|
|000061f0| 6e 67 20 70 6f 69 6e 74 | 20 65 72 72 6f 72 29 2e |ng point| error).|
|00006200| 0a 58 0a 58 2e 6e 65 20 | 34 0a 58 45 78 61 6d 70 |.X.X.ne |4.XExamp|
|00006210| 6c 65 3a 0a 58 0a 58 2e | 69 66 20 74 20 2e 66 74 |le:.X.X.|if t .ft|
|00006220| 20 43 57 0a 58 2e 74 69 | 20 2b 2e 35 69 0a 58 24 | CW.X.ti| +.5i.X$|
|00006230| 6f 72 61 5f 64 65 62 75 | 67 20 3d 20 28 24 6f 72 |ora_debu|g = ($or|
|00006240| 61 5f 76 65 72 6e 6f 20 | 3e 3d 20 32 29 0a 58 2e |a_verno |>= 2).X.|
|00006250| 74 69 20 2b 31 69 0a 58 | 3f 20 27 64 2c 65 6e 74 |ti +1i.X|? 'd,ent|
|00006260| 72 79 2c 65 78 69 74 2c | 69 6e 66 6f 3a 74 3a 4e |ry,exit,|info:t:N|
|00006270| 27 20 3a 20 38 3b 0a 58 | 2e 69 66 20 74 20 2e 66 |' : 8;.X|.if t .f|
|00006280| 74 20 50 0a 58 0a 58 54 | 68 69 73 20 69 73 20 65 |t P.X.XT|his is e|
|00006290| 71 75 69 76 61 6c 65 6e | 74 20 74 6f 20 5c 66 49 |quivalen|t to \fI|
|000062a0| 50 65 72 6c 27 73 5c 66 | 50 20 5c 66 42 24 5d 5c |Perl's\f|P \fB$]\|
|000062b0| 66 50 20 76 61 72 69 61 | 62 6c 65 20 69 6e 20 61 |fP varia|ble in a|
|000062c0| 20 6e 75 6d 65 72 69 63 | 20 63 6f 6e 74 65 78 74 | numeric| context|
|000062d0| 2e 0a 58 2e 5c 22 0a 58 | 2e 53 48 20 53 55 42 53 |..X.\".X|.SH SUBS|
|000062e0| 54 49 54 55 54 49 4f 4e | 20 56 41 52 49 41 42 4c |TITUTION| VARIABL|
|000062f0| 45 53 0a 58 2e 5c 22 0a | 58 5c 66 49 4f 72 61 70 |ES.X.\".|X\fIOrap|
|00006300| 65 72 6c 5c 66 50 20 61 | 6c 6c 6f 77 73 20 61 6e |erl\fP a|llows an|
|00006310| 20 53 51 4c 20 73 74 61 | 74 65 6d 65 6e 74 20 74 | SQL sta|tement t|
|00006320| 6f 20 63 6f 6e 74 61 69 | 6e 20 73 75 62 73 74 69 |o contai|n substi|
|00006330| 74 75 74 69 6f 6e 20 76 | 61 72 69 61 62 6c 65 73 |tution v|ariables|
|00006340| 2e 0a 58 54 68 65 73 65 | 20 63 6f 6e 73 69 73 74 |..XThese| consist|
|00006350| 20 6f 66 20 61 20 63 6f | 6c 6f 6e 20 66 6f 6c 6c | of a co|lon foll|
|00006360| 6f 77 65 64 20 62 79 20 | 61 20 6e 75 6d 62 65 72 |owed by |a number|
|00006370| 2e 0a 58 46 6f 72 20 65 | 78 61 6d 70 6c 65 2c 20 |..XFor e|xample, |
|00006380| 61 20 70 72 6f 67 72 61 | 6d 20 77 68 69 63 68 20 |a progra|m which |
|00006390| 61 64 64 65 64 20 72 65 | 63 6f 72 64 73 20 74 6f |added re|cords to|
|000063a0| 20 61 20 74 65 6c 65 70 | 68 6f 6e 65 20 6c 69 73 | a telep|hone lis|
|000063b0| 74 0a 58 6d 69 67 68 74 | 20 75 73 65 20 74 68 65 |t.Xmight| use the|
|000063c0| 20 66 6f 6c 6c 6f 77 69 | 6e 67 20 63 61 6c 6c 20 | followi|ng call |
|000063d0| 74 6f 20 5c 66 49 26 6f | 72 61 5f 6f 70 65 6e 28 |to \fI&o|ra_open(|
|000063e0| 29 5c 66 50 3a 0a 58 0a | 58 2e 69 66 20 74 20 2e |)\fP:.X.|X.if t .|
|000063f0| 66 74 20 43 57 0a 58 2e | 74 69 20 2b 2e 35 69 0a |ft CW.X.|ti +.5i.|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.