Consultor Eletrônico



Kbase 17245: How to write a NULL to a file.
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   5/10/1998
How to write a NULL to a file.


You can use the NULL keyword to output null characters (\0)
with PUT CONTROL.

Example :

OUTPUT TO testfile.
PUT CONTROL NULL.

To write multiple NULLs :
PUT CONTROL NULL(n).
n = number of nulls to be written.

To embed NULLs in between data :

PUT "This is to test".
PUT CONTROL NULL.
PUT "the null character" .

The output will be :
This is to test the null character.
The \0 is not readable; however it can be looked at on the UNIX
systems with octal dump : od -c <file>.

REFERENCES TO WRITTEN DOCUMENTATION
===================================

PUT statement in the Reference Manual.
Discussion is under PUT CONTROL.
The example is at the end under NOTES.

Progress Software Technical Support Note # 17245