Hiba_t
14th November 2006, 16:23
Hi all,

I'm writing a program to get the values for certain audited fields. The old value and the new value. (before and after update operation)

I'm facing a field of type array of double, array length is 3.. The problem is that when I use the function aud_get_fld_values for this field, I get a weird value with strange characters..

How can I get the values of the array ? The three values ?

Can anyone help me ?

I'm working on baan5b..

Thanks,
Hiba

Hiba_t
20th November 2006, 08:54
Can someone give me the list and documentation of all functions declared in the headers <bic_audhdr.h> and <bic_audlib> ? Maybe then I can find what I need..

I found some of the documentation in the CMS site, but I don't think that's all of it..

I appreciate any help..

lakoon
20th November 2006, 15:43
Hello Hiba_t

here the list of audit functions.

aud_close_audit(long seqid)[Ret:long]
aud_get_app_info1(string seq_hdr(),string app1(4))These fill their second argument with the application-specific information from the sequence header.[Ret:void ]
aud_get_app_info2(string seq_hdr(),string app2(4))These fill their second argument with the application-specific information from the sequence header.[Ret:void ]
aud_get_app_info3(string seq_hdr(),string app3(4))These fill their second argument with the application-specific information from the sequence header.[Ret:void ]
aud_get_app_info4(string seq_hdr(),string app4(4))These fill their second argument with the application-specific information from the sequence header.[Ret:void ]
aud_get_audit_dd(const string seqhdr(), ref string colnames(,), ref long colinfo(,))[Ret:void]
aud_get_col_info(const string seqhdr(), long col_no, ref string col_name(), ref long col_type, ref long col_dep, ref long col_len)[Ret:void]
aud_get_compno(string info_hdr())This returns the company number of the table to which the info file relates. [Ret:long ]
aud_get_creat_date(string seq_hdr())This returns the creation date(in UTC)of the sequence file. Use utc.to.local()to convert the UTC date to a local date.[Ret:string]
aud_get_creat_time(string seq_hdr())This returns the creation time(in UTC)of the sequence file. Use utc.to.local()to convert the UTC time to local time.[Ret:string]
aud_get_curr_security(string info_hdr())This returns the security permissions for the info file and associated sequence files. [Ret:long ]
aud_get_curr_seqno(string info_hdr())This returns the sequence number of the current sequence file. This is the sequence file to which new audit information will be written.[Ret:long ]
aud_get_fld_values(long colno, const long colinfo(,), const string rec_buff(), ref string values(,))[Ret:long]
aud_get_from_seqno(string info_hdr())This returns the starting number for sequence files related to the info file.[Ret:long ]
aud_get_hdr_size(long seqid)[Ret:long ]
aud_get_info_seq_hdr_size(long seqid, long seqno)[Ret:long ]
aud_get_max_audit_file_size(string info_hdr())This returns the maximum size(in bytes)of sequence files related to the info file.[Ret:long ]
aud_get_no_audit_flds(string seq_hdr())This returns the number of audited fields in the sequence file.[Ret:long ]
aud_get_no_prim_flds(string seq_hdr())This returns the number of primary key fields among the audited fields in the sequence file.[Ret:long ]
aud_get_no_trans(string seq_hdr())This returns the number of transactions in the sequence file.[Ret:long]
aud_get_rec_app_info(string appinfo(4), string rec_buff())This reads the application-specific information of the record into appinfo.[Ret:void ]
aud_get_rec_op_type(string rec_buff())This returns the type of action of the record. Possible values are:"I"insert record[Ret:string ]
aud_get_rec_seqno(string rec_buff())This retrieves the sequence number of the record within the transaction.[Ret:long ]
aud_get_seqno(string seq_hdr())This returns the sequence number of the sequence file.[Ret:long ]
aud_get_seq_full_status(string seq_hdr())This returns the value of the status field in the sequence header. Note that you cannot use this value because the version information is included in the status. Use aud_get_seq_status()instead.[Ret:long ]
aud_get_seq_status(string seq_hdr())This returns a value indicating the termination status of the sequence file. [Ret:long ]
aud_get_seq_version(string seq_hdr())This returns the version of the sequence file as stored in the sequence header.[Ret:long ]
aud_get_status(string info_hdr())This returns the value of the status field in the info header. The status field indicates whether the sequence file reuse feature is enabled or disabled. [Ret:long ]
aud_get_tablename(string info_hdr())This returns the name of the table to which the specified info file relates. [Ret:string ]
aud_get_term_date(string seq_hdr())This returns the termination date(in UTC)of the sequence file(if the file is terminated). Use utc.to.local()to convert the UTC date to a local date.[Ret:string ]
aud_get_term_time(string seq_hdr())This returns the termination time(in UTC)of the sequence file(if the file is terminated). Use utc.to.local()to convert the UTC time to local time.[Ret:string ]
aud_get_to_seqno(string info_hdr())This returns the maximum sequence number for sequence files related to the info file.[Ret:long ]
aud_get_tran_bytes(string tran_hdr())This returns the total size in bytes of the transaction data.[Ret:long ]
aud_get_tran_commit_date(string tran_hdr())This returns the UTC commit date from the transaction header.[Ret:string ]
aud_get_tran_commit_time(string tran_hdr())This returns the UTC commit time from the transaction header.[Ret:string ]
aud_get_tran_date_dd(string tran_hdr())This retrieves the day value from the transaction commit date.[Ret:long ]
aud_get_tran_date_mm(string tran_hdr())This retrieves the month value from the transaction commit date.[Ret:long ]
aud_get_tran_date_yyyy(string tran_hdr())This retrieves the year value from transaction commit date. The year is represented by four digits.[Ret:long ]
aud_get_tran_entries(string tran_hdr())This returns the number of audited actions in the transaction.[Ret:long ]
aud_get_tran_id(string tran_hdr(), long g1, long g2)This reads the transaction id from the transaction header. The transaction id consists of two longs which together form a unique identification.[Ret:long ]
aud_get_tran_sess(string tran_hdr())This returns the name of the session that committed the transaction.[Ret:string ]
aud_get_tran_status(string tran_hdr())This returns the commit status of the transaction. [Ret:long ]
aud_get_tran_time_hh(string tran_hdr())This retrieves the hours value from the transaction commit time.[Ret:long ]
aud_get_tran_time_mm(string tran_hdr())This retrieves the minutes value from the transaction commit time.[Ret:long ]
aud_get_tran_time_ss(string tran_hdr())This retrieves the seconds value from the transaction commit time.[Ret:long ]
aud_get_tran_tuname(string tran_hdr())This returns the BAAN user name of the user who performed the transaction. [Ret:string ]
aud_get_tran_uuid(string tran_hdr())This returns the UNIX user id of the user who performed the transaction.[Ret:long ]
aud_get_version(string info_hdr())This returns the current version of the info file and related sequence files. [Ret:string ]
aud_open_audit(const string host_name(), const string table_name(), long compno, long seqno)[Ret:long]
aud_read_audit_rec(long seqid, long rec_no, ref string rec_buff())[Ret:long]
aud_read_info_hdr(const string host_name(), const string table_name(), long compno, ref string info_hdr())[Ret:long ]
aud_read_info_seq_hdr(long seqid, long seqno, ref string seqhdr())[Ret:long]
aud_read_next_audit_rec(long seqid, ref string rec_buff())[Ret:long]
aud_read_next_tran(long seqid, ref string tran_hdr())[Ret:long]
aud_read_seq_hdr(long seqid, ref string seqhdr())[Ret:long]
aud_read_tran(long seqid, long tran_no, ref string tran_hdr())[Ret:long]
aud_select_host(const string table_name(), long compno, long user_interaction, ref string host_name())[Ret:long]
aud_set_app_info1(string app1(4), string seq_hdr())These write application-specific information to seq_hdr.[Ret:void ]
aud_set_app_info2(string app2(4), string seq_hdr())These write application-specific information to seq_hdr.[Ret:void ]
aud_set_app_info3(string app3(4), string seq_hdr())These write application-specific information to seq_hdr.[Ret:void ]
aud_set_app_info4(string app4(4), string seq_hdr())These write application-specific information to seq_hdr.[Ret:void ]
aud_set_curr_seqno(long c_seq, string info_hdr())This stores the value of the c_seq in the current sequence number field of the info header.[Ret:void ]
aud_set_max_audit_file_size(long m_size, string info_hdr())This stores the value of m_size in the maximum file size field of the info header.[Ret:void ]
aud_set_security(long c_sec, string info_hdr())This stores the value of c_sec in the security field of the info header. For a list of valid values, see aud_get_curr_security().[Ret:void ]
aud_set_seq_status(long st, string seq_hdr())This stores the content of st in the status field of the sequence header.[Ret:void ]
aud_set_status(long status, string info_hdr())This stores the value of status in the status field of the info header.[Ret:void]
aud_set_term_date(string t_date(), string seq_hdr())This stores the content of t_date in the termination date field of the sequence header.[Ret:void ]
aud_set_term_time(string t_time(), string seq_hdr())This stores the content t_time in the termination time field of the sequence header.[Ret:void ]
aud_set_to_seqno(long to_seq, string info_hdr())This stores the value of to_seq in the maximum sequence number field of the info header.[Ret:void ]
aud_update_infofile(long seqid, const string seqhdr)[Ret:long]
aud_write_info_hdr(const string host_name(), const string table_name(), long compno, const string info_hdr)[Ret:long]
aud_write_seq_hdr(long seqid, const string seqhdr())[Ret:long]



And attached a Baan Code example.



regards lakoon

Hiba_t
20th November 2006, 16:02
Thanks a lot for your reply..

I searched through the functions you posted but didn't find any that can solve my problem.

I also looked at the code sample you attached at the function get.values which handles some types of fields values.. But it doesn't handle fields that are of type array. Do you know how to handle these fields and get the values for each cell of the array ?

Thanks again..

NPRao
20th November 2006, 19:23
Refer to the function - aud.get.field.info() (http://www.baanboard.com/programmers_manual_baanerp_help_functions_audtr_aud_get_field_info)

There is note in the latest SSA ERP LN 6.1 Programmers Guide -
aud_get_col_info()
--------------------------------------------------------------------------------
Warning
The functions and macros listed below must not be used anymore. Using them in BaanERP 5.0c or higher releases may result in less reliable data. Know that there is a new set of functions that you can use for retrieval of audit information. Refer to Audit Management Overview

Hiba_t
21st November 2006, 08:18
I use that to get the depth of the array.. But then I don't know how to get the values of each cell in the array.

george7a
27th November 2006, 18:37
Hi,

According to this thread (http://www.baanboard.com/baanboard/showthread.php?t=651), it is almost impossible to get the documentation of the functions inside any "bic_*" (under $BSE/include*)!

- George

Hiba_t
15th February 2007, 10:26
I found out that copy.mem() should be used for the values returned from the audit function..