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.

$ZUTIL(78,22)$ZUTIL(78,22,filename): If you include filename, $ZUTIL(78,22) opens the specified fileand reads the header. You must specify a complete file pathname, such as"C:\CacheSys\Mgr\Journal\20020206.001". If you include filename and omit key,$ZUTIL(78,22) returns one of the following values:0-11File doesn't exist.File is not a journal file.File exists and is a journal file.$ZUTIL(78,22,filename,key): You must specify filename to specify a key. If you includekey, $ZUTIL(78,22) returns the previously listed numeric values for non-journals: 0 for anon-existent file, or -1 for a non-journal file.If the file does exist and is a journal file, $ZUTIL(78,22) returns key, followed by a secondfield, delimited by a comma. If the value for the second field is a null string (for example,key=2 and there is no next journal file), $ZUTIL(78,22) just returns the key number.The following example shows the values returned by the different key numbers. Note thatthe key number itself is the first thing returned, followed by a value. In this case, there is nonext journal file, so key=2 returns just the key number itself.To determine the filename of the current journal file, use $ZUTIL(78,21).SET jrninfo=$ZUTIL(78,21)SET jrnname=$PIECE(jrninfo,",",2,2)WRITE !,"Current journal: ",jrnnameWRITE !,"prior: ",$ZUTIL(78,22,jrnname,1)WRITE !,"next: ",$ZUTIL(78,22,jrnname,2)WRITE !,"size: ",$ZUTIL(78,22,jrnname,3)1,c:\cachesys\mgr\journal\20021203.00123,1073741824See Also• $ZUTIL(78,21) Search Journal File for Open Transactions function• Using <strong>ObjectScript</strong> for Transaction Processing in Using <strong>Caché</strong> <strong>ObjectScript</strong>• Journaling in the <strong>Caché</strong> High Availability Guide<strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong> 685

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

Saved successfully!

Ooh no, something went wrong!