logmktemp

The logmktemp() function returns a file name that is guaranteed to be unique on the log host.

This function requires a full path template. Do not save Iologs to temp directories.

result = logmktemp (template);
template Required. Character string that contains a file name template. Within template, characters forming a unique identifier replace six trailing X characters. Many, but not all, user systems require precisely six X characters, which must be the trailing characters. Five X character ss, or X character ss in the middle of a template, might work on some systems, but this behavior is not guaranteed.

result contains the generated file name. If a unique file name cannot be generated from template, then result contains a blank character string ("").

In this example,

result = logmktemp ("/var/adm/iolog.XXXXXX");

result contains the file name /var/adm/iolog.XXXXXX, where XXXXXX is replaced by a unique identifier that is generated by the operating system.

mktemp(), stat()