IBM Support

ReadBlock WriteBlock vs. ReadBytes WriteBytes - Sterling Gentran:Server for Microsoft Windows

White Papers


Abstract

This document discusses the differences between the Extended Rule functions ReadBlock / WriteBlock and ReadBytes / WriteBytes.

Content

The ReadBlock function reads a block of data (segment or record), up to but not including the Segment terminator, from the input file and places it into the argument of a string variable. The ReadBlock and WriteBlock functions are used in conjunction with each other to pass a block of data from the input file to the output file without compliance checking or testing for proper syntax. Together these functions provide a more efficient alternative of using “wildcard” segments, which are typically implemented in build and break maps and are not permitted with XML File Formats.

The WriteBlock function writes the data contained in the argument of a string variable to the output file. The ReadBlock and WriteBlock functions are used in conjunction with each other to pass a block of data from the input file to the output file without compliance checking or testing for proper syntax.

The ReadBytes function reads a number of bytes from the input file. This function is used in conjunction with the WriteBytes function. Used together, the ReadBytes and WriteBytes function provide an efficient method of passing data through a map if the data does not need to be compliance checked or altered in any way.
ReadBytes is similar to the ReadBlock function, but the ReadBlock function only works with entire blocks (i.e., an entire segment or record), and the ReadBytes function works with any quantity of data, whether it is smaller or larger than a block.

The WriteBytes function writes a specified number of bytes to the output file. This function is used in conjunction with the ReadBytes function. Used together, the ReadBytes and WriteBytes function provide an efficient method of passing data through a map if the data does not need to be compliance checked or altered in any way.

[{"Product":{"code":"SS6V3G","label":"Sterling Gentran:Server for Microsoft Windows"},"Business Unit":{"code":"BU055","label":"Cognitive Applications"},"Component":"Not Applicable","Platform":[{"code":"PF033","label":"Windows"}],"Version":"5.3.1;5.3;5.2","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Document Information

Modified date:
17 June 2018

UID

swg27022736