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.

<strong>Caché</strong> <strong>ObjectScript</strong> Special Variables$ZEOFContains flag indicating whether end-of-file has been reached.$ZEOFDescriptionFollowing each sequential file READ, <strong>Caché</strong> sets the $ZEOF special variable to indicatewhether or not the end of the file has been reached. This special variable is provided forcompatibility with MSM routines that use $ZC device status checking.$ZEOF can be set to the following values:–1 End-of-file reached0 Not at end-of-fileTo use this feature, you must disable the error for sequential files.• To disable this for a process, call $ZUTIL(68,40,1) for that process.• To disable this system-wide, either call $ZUTIL(69,40,1), or go to the System ManagementPortal, select System Configuration, select Advanced Settings, on the pull-downCategory list select <strong>ObjectScript</strong>. View and edit the current setting of SetZEOF. Thisoption controls the behavior when <strong>Caché</strong> encounters an unexpected end-of-file whenreading a sequential file. When set to “true” , <strong>Caché</strong> sets the $ZEOF special variable toindicate that you have reached the end of the file. When set to “false” , <strong>Caché</strong> issues an error. The default is “false” .When the end of a file is reached, rather than returning an error, the READwill return a null string, set $ZPOS=null and set $ZEOF=–1.$ZEOF does not support all of the features of the MSM $ZC function. Unlike $ZC, $ZEOFdoes not identify file delimiter characters or I/O errors. $ZEOF does not check for properfile termination with file delimiter characters. I/O errors are detected by a READ commanderror, not by $ZEOF.This special variable cannot be modified using the SET command. Attempting to do so resultsin a error.See Also• $ZUTIL(68,40) End-of-File Handling for Sequential Files function468 <strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong>

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

Saved successfully!

Ooh no, something went wrong!