bildwelt
E2E FORUM
E2E Bridge E2E Commerce

How can I write ASCII control characters in a Flat File?

E2E Forum Modeling & Development How can I write ASCII control characters in a Flat File?

This topic contains 0 replies, has 1 voice, and was last updated by  Jörg 4 years, 8 months ago.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #380

    Jörg
    Moderator

    To write FF (Form Feed) into the first line of a flat file with compose, you cannot do it directly. Proceed as follows:

    The first line must be defined as a Blob. This means that thus line is not set in the Flat File Record object. Afterwards, you call concatBlob() in order to concatenate th first line Blob with the Flat File Blob. It is not very comfortable, but still an easy way to do.

    1.
    firstLine:Blob
    local formFeed = convertHexToBlob(“0C”)
    local header = “@@na2″
    local lineBreak = text(“n”)
    set firstLine = formFeed.concatBlob(header.transcodeToBlob(“ISO-8859-1″), formFeed, lineBreak.transcodeToBlob(“ISO-8859-1″))

    2.
    Before the flat file adapter action “Write Flat File” you must concatenate the Blobs:

    set data = firstLine.concatBlob(data)

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.