Navigation:  Commands > Configuration File [CFG] >

$log_field [CFG]

Previous pageReturn to chapter overviewNext page

Specify Custom Fields in the Transaction Log File

$log_field fieldname fieldwidth


This command allows you to add extra log-file fields DATA1 through DATA9. Data fields 1 through 4 are predefined (see Appendix E: Transaction Log), but you may use this command to change them to numeric format.

The parameters on this command are used as follows:

fieldname one of the keywords DATA1 .. DATA9. You must specify fields 5 and above in sequence, with no gaps. For example you cannot just specify field DATA6 without having defined field DATA5.
fieldwidth the width of the field, preceded by N to create a numeric field. For fields 1 to 4, the width value is ignored. Numeric fields have no decimal places.

When you use this command, the new logfile format will not be used until the next daily logfile is created, but different format records in the same file may make the file invalid. Therefore to have immediate feedback of your changes you should rename or delete any logfile already created for today and allow the system to create a fresh one.

As with fields DATA1 to DATA4, you may assign values to any DATAx variable using $set_var. If multiple DATAx $set_var assignments occur in the same .IIF file, all the values will be in the same log record. If you assign values in separate .IIF files, separate log records will be written. All these log records have code 'D' in the fourth flag position. The additional fields follow DATA4 in the record layout. If you specify a numeric format, it is your responsibility to assign to the field a variable value which can be converted to a number.

If you need more than five additional fields, we recommend using one of the DATAx fields as a record type code, and writing multiple records, reusing the other data fields for different data in each record. The maximum width of a data field is 254 characters.

Default: none (optional feature)

Examples:

$log_field DATA5 20

$log_field DATA6 10

$log_field DATA7 32

$log_field DATA3 N

$log_field DATA4 N

 


Topic url: http://www.copia.com/support/refmanual/index.html?$log_field.htm