MapAudit (-A)

Use the MapAudit execution command (-A) to control the creation of audit log information.

Using this command, audit information is recorded which can include data audit information and execution audit information.

When used with other specified options, the MapAudit settings specified with the MapAudit command (-A) override all MapAudit settings compiled into the map. When used without other specified options, no audit log is produced.


-A[D[R|W]{1|2}][E[R|W]][B[R|W]][C[R|W]][P[R|W]]
   [M[S]|[U][+|!+][={file|dir}]]

For information about the audit log files, see the Map Designer documentation.

Option
Description
D
Include data audit information in the audit log. The recorded information is based on the MapAudit settings configured in the Map Designer for a particular map.

The sub-options for D include: R, W, and 1 or 2

R
Generate audit files each time the map is run only if the outcome of the map's execution is an error condition. Used with the burst audit data information (D), execution summary audit information (E), burst execution information (B), card (data) settings (C), and map settings (P) options.
W
Generate audit files each time the map is run only if the outcome of the map's execution is a warning or an error condition. Used with the burst audit data information (D), execution summary audit information (E), burst execution information (B), card (data) settings (C), and map settings (P) options.
1|2
1 is the audit code for fail size (WrongSize).

2 is the audit code for fail minimum size or fail maximum size (TooLongTooShort).

Note If using the 1 or 2 option as well as the R or W option with the D sub-option, the 1 or 2 must follow the R or W. For example:

-AEDW2

This example represents SummaryAudit Execution, SummaryAudit Data, OnWarning, and TooLongTooShort.

B
The burst execution information includes:
  • the burst return value
  • the time it took for the burst to execute
  • the number of bytes, the adapter return value, and the content return value for each card

Example:


<ExecutionLog burstreturn="0" ElapsedSec="0.6846">
   <inputstatus card="1" bytes="4904" 
adapterreturn="0"          contentreturn="0"/>
   <inputstatus card="2" bytes="270" 
adapterreturn="0"          contentreturn="0"/>
   <outputstatus card="1" bytes="18695 
adapterreturn="0"          contentreturn="0"/>
</ExecutionLog>
E
The execution summary audit information includes:

  • return codes resulting from the map execution
  • execution time (in seconds)
  • command line used to execute the map
  • number of input objects found and output objects built (Command Server only)
  • details about the map sources and destinations
  • work file names and sizes
C
The card (data) settings audit information includes:
  • the data settings for sources and target cards
P
The map settings audit information includes:
  • the map settings
M
The memory setting can be used only when the map is run by the RUN() function or an API. If memory is set, audit information is stored in memory and appended to the last set of data returned during map execution.

When the map is run by a Command Server, this setting is ignored and the audit log is created in a file in the map directory, using the <mapname>.log naming convention.

If the audit in memory fails or there is insufficient available memory, a Disk write error or Not enough memory to execute map message can be returned.

S
Only use with the memory option (M). This option prefixes the audit data with a text number indicating the size (in bytes) of the audited data followed by a space.

This option causes the resulting audit log entry to be returned as an ASCII number followed by a space, then followed by the specified number of bytes of data. This helps to distinguish it from multiple character strings in the returned data when at least one output and the audit log are echoed.

For example, if used in a RUN() function:

RUN ("mymap.mmc","-OE3S -ADEMS")

If the data resulting from output card #3 was This and That, the string returned by this RUN() function is:

13 This and That1031 BEGIN RUN Function for Windows....

U
Generate audit files with unique names each time the map is run. The name of the audit log for top-level maps is:
mer_mapname_processkey_mapcounter_hostname.bak
where processkey is a combination of the process id from the operating system and the time the process started, mapcounter is a value representing each unique instance of a map within the same process, and hostname is the host name of the computer where HCL Link is running.
Run maps use:
run_mapname_processkey_mapcounter_hostname.bak
Unique names are globally unique; each process has a unique value.

Unique log file names are typically used in a multi-threaded environment so that more than one instance of the same map can run at the same time. In a command environment, unique log file names are typically used when more than one command specifies the same map to run and you do not want one log file to overwrite the other. Or, use this option when multiple servers run the same map. This option prevents one log file from overwriting another log file.

This option cannot be used with the append option (+).

+
Each time the map is run, append specified information to the audit log. If no audit log exists at the start of map execution, an audit log is created. Turn off the + option. Discontinue appending specified information to the audit log. This option cannot be used with the U option for unique names.
!+
Turn off the + option. Discontinue appending specified information to the audit log. This option cannot be used with the U option for unique names.
=file|dir
Specify a file name for appending audit information or specify a full directory path and file name in which you want the audit log file created. By default, the audit log file is created in the same directory as the compiled map (.mmc) file, using the <mapname>.bak naming convention.