# SetFormatFile

### void SetFormatFile(string strFormatFile)

EZGemPlus에서 Format Check기능을 사용할 때 읽을 Format File을 설정함.

{% hint style="info" %}
Format.SML파일의 메시지 구조와 다를 경우 GEM에서 자동으로 HOST에게  에러메시지를 보냅니다.
{% endhint %}

Parameters

<table data-header-hidden><thead><tr><th width="176" valign="top"></th><th width="107" valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Name</td><td valign="top">Type</td><td valign="top">Description</td></tr><tr><td valign="top">strFormatFile</td><td valign="top">string</td><td valign="top">Format 파일의 파일명</td></tr></tbody></table>

```csharp
// S9계열 error메세지를 자동으로 HOST에게 보내기 위하여 미리 포멧을 정의합니다.
m_gem.SetFormatFile(string.Format("FORMAT.SML"));	
```

{% hint style="warning" %}
SetFormatCheck()함수와 같이 사용합니다.

<pre class="language-csharp"><code class="lang-csharp"><strong>m_gem.SetFormatCheck(true);         //Format.SML을 사용하도록 설정합니다
</strong></code></pre>

{% endhint %}

<figure><img src="/files/xhPlK2zghWuvBw9bW4ze" alt=""><figcaption></figcaption></figure>

***

<figure><img src="/files/PCBnyX8G2E5zBk2rdAff" alt=""><figcaption></figcaption></figure>

예시로 S2F41W가 이와같은 메시지 구조로 들어오지 않는다면 GEM에서S9F7메시지를 자동으로 보냅니다.

또는  RCMD가  A\[40]으로 정의되어 있는데 50자로 들어오게 된다면 에러메시지를 자동으로 보냅니다.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://nviasoft.gitbook.io/nviasoft-docs/api-reference/undefined-1/setformatfile.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
