![]() ![]() |
|
OSBWRITEWrites an OS file to an file opened.
COMMAND SYNTAXOSBWRITE Variable ON |TO FileVar AT ByteExpr {ON ERROR Statements}
SYNTAX ELEMENTS
NOTESThe jBC OSBWRITE command writes an expression to a OS file starting at a specified byte location. OSBWRITE immediately writes a file segment out to the UNIX or Windows NT file. jBC begins writing to the file at the offset specified by ByteExpr. After successful execution of OSBWRITE, the file pointer remains at the next byte after the data is written.You do not have to specify a length expression because the number of bytes in Variable is written to the file. ReminderYou must first open the file by using the OSOPEN command. jBC uses the ASCII 0 character (CHAR(0)) as a string-end delimiter. Therefore, ASCII 0 cannot be used in any string variable within jBC. If jBC reads a string that contains CHAR(0) characters by using OSBREAD, those characters are converted to CHAR(128). OSBWRITE converts CHAR(128) back to CHAR(0) when writing a block of characters.
EXAMPLES
Related CommandsOSOPEN, OSCLOSE, OSBREAD, OSREAD, OSWRITE, OSDELETE |