write_records
Build a fixed-length EBCDIC test file from JSON records and a COBOL copybook; missing fields become spaces or zeros, and non-round-trip characters are reported.
Instructions
Build a fixed-length EBCDIC file (test data) from JSON records shaped like read_records output. Missing fields are spaces / zero. Reports characters that will not read back the same (〜 → ~).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"records": "<records>",
"copybook": "<copybook>",
"output_path": "<output_path>",
"codepage": "<codepage>"
},
"name": "write_records"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rdw | No | ||
| record | No | ||
| records | Yes | ||
| codepage | Yes | Code page of the system that will read the file: ibm930 (katakana) or ibm939 (lowercase). | |
| copybook | Yes | Absolute path to the COBOL copybook | |
| output_path | Yes | ||
| copybook_encoding | No | auto = UTF-8, else Shift_JIS (cp932) | auto |