Selecting Data Types and Structures 
The receive program must be able to recognize which type of data it can receive and whether this data is complete and correct.
An additional logon log can also be agreed between the sender and the receiver, for example, in order to request data again, to provide notification of a processing problem, or simply to send an acknowledgement to the partner. This type of control sequence must be distinguishable from pure data, for example, by defining a special log header (type, record type, number...).
When organizing communication between heterogeneous systems, please note that representation of one data type can be different in each system, and the receiver of this format may not be able to process the format directly. Examples of this are whole numbers, packed numbers and floating point numbers.
In this case, you should consider defining a common transfer format. The simplest form of this would be conversion of data into a character string.