Skip to content

Set_Channel_Position

Include: Use System\FileSystem.pkg

See Also: Direct_Input, Direct_Output, Get_Channel_Position, Get_Channel_Size, Read_Block, Sequential Channels

Purpose

Sets the byte position for an open channel.

Syntax

Set_Channel_Position {ChannelNumber} to {Position}

Use it to seek before the next read or write on that channel. Use Seq_New_Channel when opening files in application code; see Sequential Channels.

Example

Handle hFile
String sData

Get Seq_New_Channel to hFile
Direct_Input Channel hFile FILE "test1.dat"
Set_Channel_Position hFile to 3
Read_Block Channel hFile sData 2
Close_Input Channel hFile
Send Seq_Release_Channel hFile