11.07.2015 Views

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Transferring a Block between <strong>Caché</strong> DatabasesWhen you open the view buffer, <strong>Caché</strong> does not automatically clear the existing block. Thisallows you to transfer a block of data from one <strong>Caché</strong> database to another using the followingsequence:1. Use OPEN 63 and specify the namespace that contains the first <strong>Caché</strong> database.2. Use VIEW to read the desired block from the file into the view buffer.3. If necessary, use VIEW to modify the data in the view buffer.4. Use OPEN 63 again and specify the namespace that contains the second <strong>Caché</strong> database.5. Use VIEW to write the block from the view buffer to the second <strong>Caché</strong> database.6. Close the view buffer with a CLOSE 63 command.Modifying Data in MemoryIn addition to reading and writing data from a <strong>Caché</strong> database, the VIEW command allowsyou to modify data in memory either in the view buffer or in other system memory areas.To modify data, use the following form:VIEW offset:mode:length:newvalueAll four arguments are required.You modify data by storing a new value into a memory location, which is specified as a byteoffset from the base address indicated by mode. You specify the amount of memory affectedin the length argument.The possible values for mode are shown in the following table.VIEW<strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong> 155

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!