11.07.2015 Views

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

$ZUTIL(147)$ZUTIL(147)Handles spaces in pathnames for the host platform.$ZUTIL(147,pathname)$ZU(147,pathname)ParameterspathnameA file name or pathname, specified as a quoted string.DescriptionThe $ZUTIL(147) function handles spaces in pathnames as appropriate to the host platform.If pathname contains a space character, pathname handling is platform-dependent.• VMS permits space characters in pathnames; $ZUTIL(147) performs no special processingand returns the pathname unchanged.• UNIX only permits space characters in quoted pathnames; if a pathname containingspaces $ZUTIL(147) returns the pathname enclosed in double quotes (“pathname”). Ifa pathname does not contain spaces, $ZUTIL(147) returns it unchanged. $ZUTIL(147)performs no other pathname validation.• Windows does not support spaces in pathnames; $ZUTIL(147) strips spaces from thesupplied pathname. If a pathname does not contain spaces, $ZUTIL(147) returns itunchanged in all cases. On Windows systems, $ZUTIL(147) validates pathnames thatcontain spaces. If a pathname containing spaces does not exist, $ZUTIL(147) returnsthe pathname unchanged (with its blank spaces), with the entire pathnames enclosed indouble quotes (“pathname”). If a pathname containing spaces exists, $ZUTIL(147)returns the short form pathname with spaces removed, such as the following:USER>WRITE $ZUTIL(147,"C:\\My Test File.txt")C:\\MYTEST~1.TXTIn this case, the filename is truncated at the second blank space (if present), and an ordinalnumber is appending to distinguish similarly-named files.$ZUTIL(147) is commonly used with the $ZF(-1) and $ZF(-2) functions.ExamplesThe following Windows example shows how $ZUTIL(147) handles existing and non-existingpathnames with and without spaces:<strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong> 715

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

Saved successfully!

Ooh no, something went wrong!