Предположим, у меня есть файл со структурой:
Declare
type file_type is record
(
field1 number(10),
field2 char,
field3 varchar(50),
field4 number(50),
..
..
field100 varchar(50),
)
file_rec file_type;
BEGIN
/* 1) Here we will get data from some tables/views and then prepare
record for file "file_rec".
2) Once i have all the fileds file_rec.field1 to..
file_rec.field100 is ready,
we need to write the record in file.
3) while writing i have to pass all the fields to DBMS_OUTPUT package/ prepare a string
after concatinating all the fileds.(I dont want to pass this.I hate this).
4) So i want to create a procedure lets say PROC_WRITE(file_rec) which will take only
file_rec as input and it will then find the structure of file_rec and
then will prepare a string with proper padding and write it to a different file.
5) Note:
a) PROC_WRITE will be a generic function, which should be able to take any record structure as input.
b) All the file record structure will be inside different procedure(which are inside different pacakges).
It means record structures are not on schema level.
*/
END;
Дайте мне знать, если у нас есть лучшее решение для этого.Просто условие, что функция должна быть универсальной.Спасибо, Правин