85: where file_detail_id=file_id
86: for update of blob_file_fragment;
87:
88:
89: if (dbms_lob.isopen(g_file_list(file_id).file_locator)<>1)
90: then
91: dbms_lob.open(g_file_list(file_id).file_locator, DBMS_LOB.LOB_READWRITE);
92: dbms_lob.trim(g_file_list(file_id).file_locator, 0);
93: g_file_list(file_id).position := 1;
87:
88:
89: if (dbms_lob.isopen(g_file_list(file_id).file_locator)<>1)
90: then
91: dbms_lob.open(g_file_list(file_id).file_locator, DBMS_LOB.LOB_READWRITE);
92: dbms_lob.trim(g_file_list(file_id).file_locator, 0);
93: g_file_list(file_id).position := 1;
94: end if;
95:
88:
89: if (dbms_lob.isopen(g_file_list(file_id).file_locator)<>1)
90: then
91: dbms_lob.open(g_file_list(file_id).file_locator, DBMS_LOB.LOB_READWRITE);
92: dbms_lob.trim(g_file_list(file_id).file_locator, 0);
93: g_file_list(file_id).position := 1;
94: end if;
95:
96: exception
131: from pay_file_details
132: where file_detail_id = file_id
133: for update of blob_file_fragment;
134:
135: dbms_lob.open(g_file_list(file_id).file_locator, DBMS_LOB.LOB_READWRITE);
136:
137: end;
138: --
139: if (g_head_file_ptr is not null) then
289: into g_tmp_clob
290: from pay_file_details
291: where file_detail_id = p_file_id;
292: --
293: dbms_lob.open(g_tmp_clob, DBMS_LOB.LOB_READONLY);
294: --
295: end open_clob_direct;
296:
297: procedure open_blob_direct(p_file_id in number)
302: into g_tmp_blob
303: from pay_file_details
304: where file_detail_id = p_file_id;
305: --
306: dbms_lob.open(g_tmp_blob, DBMS_LOB.LOB_READONLY);
307:
308: end open_blob_direct;
309: --
310: --------------------------- read_from_clob_direct ----------------
324: is
325: --
326: begin
327: --
328: dbms_lob.read(p_clob,
329: p_size,
330: p_position,
331: p_text
332: );
348: raw_data raw(8000); --changed raw_data size from 2000 bug no 4775422
349: --
350: begin
351: --
352: dbms_lob.read(p_blob,
353: p_size,
354: p_position,
355: raw_data
356: );
373: procedure close_clob_direct
374: is
375: begin
376: --
377: dbms_lob.close(g_tmp_clob);
378: g_tmp_clob := null;
379: --
380: end close_clob_direct;
381: --
383: procedure close_blob_direct
384: is
385: begin
386: --
387: dbms_lob.close(g_tmp_blob);
388: g_tmp_blob := null;
389: --
390: end close_blob_direct;
391: --
491: end if;
492: --
493: Begin
494: l_size := p_size;
495: dbms_lob.read(g_tmp_blob,
496: l_size,
497: p_position,
498: raw_data
499: );
538: text_size:=utl_raw.length(raw_data);
539: hr_utility.trace('p_text size = ' || to_char(length(p_text)));
540: hr_utility.trace('raw_data Size = ' || text_size);
541:
542: dbms_lob.write(g_file_list(p_file_id).file_locator,
543: text_size,
544: g_file_list(p_file_id).position,
545: raw_data
546: );
546: );
547: g_file_list(p_file_id).position := g_file_list(p_file_id).position
548: + text_size;
549: hr_utility.trace('Blob Size = ' ||
550: to_char(dbms_lob.getlength(g_file_list(p_file_id).file_locator)));
551: --
552: end write_to_file;
553: --
554: --------------------------- write_to_file_raw -------------------------
577: text_size:=utl_raw.length(raw_data);
578: hr_utility.trace('p_text size = ' || to_char(length(p_text)));
579: hr_utility.trace('raw_data Size = ' || text_size);
580:
581: dbms_lob.write(g_file_list(p_file_id).file_locator,
582: text_size,
583: g_file_list(p_file_id).position,
584: raw_data
585: );
585: );
586: g_file_list(p_file_id).position := g_file_list(p_file_id).position
587: + text_size;
588: hr_utility.trace('Blob Size = ' ||
589: to_char(dbms_lob.getlength(g_file_list(p_file_id).file_locator)));
590: --
591: end write_to_file_raw;
592: --
593: --------------------------- close_file -------------------------
606: prvptr number;
607: nxtptr number;
608: begin
609: --
610: dbms_lob.close(g_file_list(p_file_id).file_locator);
611:
612: --
613: prvptr := g_file_list(p_file_id).prvptr ;
614: nxtptr := g_file_list(p_file_id).nxtptr ;
639: procedure open_temp_file
640: (p_file in out nocopy clob)
641: is
642: begin
643: dbms_lob.createtemporary(p_file, TRUE);
644: end open_temp_file;
645: --
646: --------------------------- close_temp_file -------------------------
647: /*
654: */
655: procedure close_temp_file(p_file in out nocopy clob)
656: is
657: begin
658: dbms_lob.freetemporary(p_file);
659: end close_temp_file;
660: --
661: -- Added for Bug # 3688801.
662: --------------------------- form_read_clob ---------------------
691: p_text := null;
692: return;
693: end if;
694: --
695: dbms_lob.open(l_clob, DBMS_LOB.LOB_READONLY);
696: --
697: l_size := p_size;
698: read_from_clob_direct
699: (l_clob,
701: p_position,
702: p_text
703: );
704: --
705: dbms_lob.close(l_clob);
706: --
707: p_size := l_size;
708: --
709: end form_read_clob;
735: if l_clob is null then
736: return null;
737: end if;
738: --
739: dbms_lob.open(l_clob, DBMS_LOB.LOB_READONLY);
740: --
741: l_length := DBMS_LOB.GETLENGTH(l_clob);
742:
743: dbms_lob.close(l_clob);
737: end if;
738: --
739: dbms_lob.open(l_clob, DBMS_LOB.LOB_READONLY);
740: --
741: l_length := DBMS_LOB.GETLENGTH(l_clob);
742:
743: dbms_lob.close(l_clob);
744: --
745: return l_length;
739: dbms_lob.open(l_clob, DBMS_LOB.LOB_READONLY);
740: --
741: l_length := DBMS_LOB.GETLENGTH(l_clob);
742:
743: dbms_lob.close(l_clob);
744: --
745: return l_length;
746: --
747: end return_clob_length;
764: if l_blob is null then
765: return null;
766: end if;
767: --
768: dbms_lob.open(l_blob, DBMS_LOB.LOB_READONLY);
769: --
770: l_length := DBMS_LOB.GETLENGTH(l_blob);
771:
772: dbms_lob.close(l_blob);
766: end if;
767: --
768: dbms_lob.open(l_blob, DBMS_LOB.LOB_READONLY);
769: --
770: l_length := DBMS_LOB.GETLENGTH(l_blob);
771:
772: dbms_lob.close(l_blob);
773: --
774: return l_length;
768: dbms_lob.open(l_blob, DBMS_LOB.LOB_READONLY);
769: --
770: l_length := DBMS_LOB.GETLENGTH(l_blob);
771:
772: dbms_lob.close(l_blob);
773: --
774: return l_length;
775: --
776: end return_length;
781: raw_data raw(32767);
782: begin
783: raw_data:=utl_raw.cast_to_raw(p_text);
784: text_size:=utl_raw.length(raw_data);
785: dbms_lob.writeappend(pay_mag_tape.g_blob_value,
786: text_size,
787: raw_data
788: );
789: end;
790:
791: procedure write_to_magtape_lob(p_data in blob)
792: is
793: begin
794: dbms_lob.append(pay_mag_tape.g_blob_value,
795: p_data);
796: end;
797:
798: --