PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0
Showing posts with label extended-sql. Show all posts
Showing posts with label extended-sql. Show all posts

Monday, July 11, 2022

[FIXED] How to write CHARACTER variable to file in ESQL?

 July 11, 2022     extended-sql, ibm-integration-bus, message, messagebroker     No comments   

Issue

I'm trying to implement simple message flow, which reads text file (SWIFT message) and replaces one field value, then I need to put it back to file. Flow reads file as blob, then I cast message as CHARACTER and doing replacement. As result I get a CHARACTER variable, which I want write to file.


Solution

Cast the variable back to BLOB, make it the message root, then send it into a FileOutput node with default settings. Assuming that you are doing the character replacement with ESQL in a Compute node (with its Compute Mode set to change Message), then the subsequent ESQL would be:

SET OutputRoot.BLOB.BLOB = CAST(yourCharVar AS BLOB);



Answered By - Steve Parsons
Answer Checked By - David Goodson (PHPFixing Volunteer)
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Older Posts Home

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
All Comments
Atom
All Comments

Copyright © PHPFixing