Skip to content

Virtual files

A virtual file is a logical file exposed to partners (PI 12). It maps a name partners use to a physical location and a set of protocol options. Managed in the Virtual files tab or under /api/v1/config/files.

Virtual files

Fields

FieldMeaning
idThe virtual file name (PI 12).
directionRECEIVE (partners write it), SEND (partners read it) or BOTH.
recordFormat0x80 variable or 0x00 fixed; combined with text gives BU / BF / TV / TF.
recordLengthRecord length (PI 32).
textLine records (LF stripped on send, appended on receive) instead of binary chunks.
ebcdicTranslate article bytes Latin-1 ↔ EBCDIC CP037 on the wire (PI 16 = 1).
receiveDirectory / receiveFilenamePatternWhere received files land, and the name pattern (${virtualFile}, ${transferId}, ${date}, ${partnerId} …).
sendFileThe physical file served when a partner reads it.
connector / connectorPathBack the file with a storage connector instead of the local filesystem.
bash
curl -s -H "X-API-Key: $KEY" -H 'Content-Type: application/json' \
  "$A/api/v1/config/files" -X POST \
  -d '{"id":"INVOICES","enabled":true,"direction":"RECEIVE","recordLength":4096,"recordFormat":128}'

Record formats

The node applies proper PeSIT article codecs, so files interoperate with other PeSIT stacks:

  • Binary (BU / BF / BV) — the file is cut into articles of the record length.
  • Text (TV / TF) — one article per line; the line feed is removed on send and appended on receive, and TF pads to the record length.
  • EBCDIC — set ebcdic: true to translate text data between the local Latin-1 representation and EBCDIC CP037 on the wire; the responder also honours an incoming PI 16.

PeSIT Wizard — open source under Apache-2.0