3.14 Logging User Defined Fields
LANSA for the Web allows you to trace fields within your functions. If you want to trace information in your function, you will need to have event logging enabled at the detailed level and you must include a LANSA standard field, STDTRCFLD, in your RDML function. This is defined as a CHAR(100) field in the LANSA Repository.
The Event Logging facility allows you to trace up to 10 fields in your RDML function. The nominated field names are concatenated together into the STDTRCFLD field. The first trace field is defined in position 1 to 10 of the STDTRCFLD, the second trace field in position 11 to 20, and so on. For example, if you want to trace the EMPNO, SURNAME and GIVENAME fields, these field names are concatenated together. Each of the field names that are less than 10 characters are padded with blanks. In this case, the value of the STDTRCFLD field would be:
EMPNO SURNAME GIVENAME
You use the STDTRCFLD field as a *HIDDEN attribute as part of your display or request commands in your functions.
When detailed event logging is enabled in LANSA for the Web, it will check the value of the STDTRCFLD field to determine the user defined fields to trace. The field value length of each of the user defined trace fields is limited to 50 bytes. LANSA for the Web will truncate the data if the length is greater than 50. The trace fields and their contents are logged to the respective fields in the detailed file (DC@W27).