---
name: "pmiSetVersion"
section: "3"
platform: "linux"
package: "pcp"
version: "7.2.2-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/pmiSetVersion"
---

# pmiSetVersion(3)

set the archive version for a LOGIMPORT archive

## NAME

**pmiSetVersion** - set the archive version for a LOGIMPORT archive

## C SYNOPSIS

**#include \<pcp/pmapi.h\>**\
 **#include \<pcp/import.h\>**

**int pmiSetVersion(int** *value***);**

**cc ... -lpcp\_import -lpcp**

## Perl SYNOPSIS

**use PCP::LogImport;**

**pmiSetVersion($***value***);**

## Python SYNOPSIS

**from pcp import pmi**

**log.pmiSetVersion(***value***)**

## DESCRIPTION

As part of the Performance Co-Pilot Log Import API (see [**LOGIMPORT**(3)](/LOGIMPORT/3.md)), **pmiSetVersion** sets the output archive version in the current context to be *value*.

In the absence of a call to **pmiSetVersion** the version currently defaults to the traditional v2 format. In a future major version of PCP it will default to v3 format.

## DIAGNOSTICS

**pmiSetVersion** returns zero on success else a negative value that can be turned into an error message by calling [**pmiErrStr**(3)](/pmiErrStr/3.md).

## SEE ALSO

[**LOGIMPORT**(3)](/LOGIMPORT/3.md), [**pmiErrStr**(3)](/pmiErrStr/3.md), [**pmiSetHostname**(3)](/pmiSetHostname/3.md), [**pmiSetTimezone**(3)](/pmiSetTimezone/3.md) and [**pmiStart**(3)](/pmiStart/3.md).
