For information about the individual environments where the function is meaningful, see "Compatibility" in this topic.
The sysLib.audit() function is system dependent. If you need portability between supported and unsupported environments, develop a non-EGL program with the same name as the system function (audit) to receive the service call in unsupported environments. When generating for an environment in which the service is not supported, EGL turns the function call into a call to the program with the same name. Alternatively, you can test the value of sysVar.sysType to determine the runtime environment, then invoke sysLib.audit() only where the environment supports it.
sysLib.audit( record BasicRecord in [, jid SMALLINT in] )
The first 2 bytes contain the length of the record to be written. The next 2 bytes contain a code that identifies the source of the journal record; the first byte of that code must be in the range X'A0' to X'FF'.
The first 28 bytes are reserved for containing the record length and record identifier code and for system usage. The first 28 bytes must not contain user data; bytes 29 to 32767 are available for audit data.
package com.companyb.customer; Record wrkRecord type basicRecord 10 length smallint; 10 code char(2); 10 reserved char(24); 10 data char(32737); end Program calc2 wrkrec wrkRecord; jrnlid smallint; Function main() wrkrec.length = 32765; wrkrec.code = x"A012"; wrkrec.data = "THIS IS THE DATA TO BE WRITTEN TO JOURNAL NUMBER 2"; jrnlid = 2; sysLib.audit(wrkrec, jrnlid); end // main() end // program
Platform | Issue |
---|---|
CICS® | The function writes to the CICS journal.
If you are in V6 exception mode (see Using V6 exception compatibility), EGL sets sysVar.errorCode as
follows:
|
IMS™ | The function writes to the IMS log. EGL automatically converts the record to IMS log format by adding 2 to the length and inserting 2 bytes of binary zeros following the length field. Only the first byte of the record identifier code is used. The second byte of the record identifier code is ignored. The jid parameter is ignored. IMS/VS has a maximum limit of 32,765 bytes. |
iSeries® COBOL | The sysLib.audit() function is not supported. |
Java™ generation | sysLib.audit() is not supported. |
JavaScript generation | sysLib.audit() is not supported. |
z/OS® batch | To use the sysLib.audit() function
in z/OS batch, you must specify a PSB for the program,
and the program must meet at least one of the following criteria:
|