> ## Documentation Index
> Fetch the complete documentation index at: https://docs.arc.cdata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# messageReadLine

> メッセージアイテムの内容を1行ずつ読み取って列挙し、メッセージから1行ずつ返します。

メッセージアイテムの内容を1行ずつ読み取って列挙し、メッセージから1行ずつ返します。

## オプションのパラメータ

* **separator**：各新規行を決定する文字区切り。デフォルト値は改行文字（`\n`）です。
* **encoding**：使用するエンコーディング。使用できる値は、使用しているJVM/OS によって決まります。ほとんどのオペレーティングシステムおよびJVM で一般的にサポートされるエンコーディングの値には、`UTF-8`、`ASCII`、`windows-1252`、および `ISO-8859-2` が含まれます。デフォルトは`UTF-8` です。

## アウトプット属性

* **line**：メッセージから送り出されるデータの行番号。
* **data**：メッセージからの行データ。

## 例

### 最初の行のみARCESB をCData Arc に置換する

```xml theme={null}
<!-- Initializing the item to hold the message data minus the first line -->
<arc:set attr="restof.data" value="" />
<!-- Calling the messageReadLine operation and setting the output item -->
<arc:call op="messageReadLine" out="result" >
  <!-- Once the operation gets to the first line in the message data, perform a replace -->
  <arc:if exp="[result.line] == 1">
    <arc:set attr="first.line" value="[result.data | replace('ArcESB','CData Arc')]" />
    <arc:else>
      <!-- Setting the data for the output message to be the concatenation of the modified first line and the rest of the message data -->
      <arc:set attr="output.data" value="[first.line][restof.data]\n[result.data]" />
    </arc:else>
  </arc:if> 
</arc:call>
<arc:set attr="output.filepath" value="[FilePath]" />
<arc:push item="output" />
```
