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.

from the current console. It waits for the process to return. It returns the child process exitstatus. It returns -1 if a child process could not be forked.On UNIX and VMS systems, $ZF(-1) with no specified parameter launches the default shell.On Windows systems, the progname parameter is mandatory. For further details, see IssuingOperating System Commands from <strong>Caché</strong> in Using <strong>Caché</strong> <strong>ObjectScript</strong>.If the pathname supplied in progname contains a space character, pathname handling isplatform-dependent. VMS permits space characters in pathnames; no special processing isrequired. UNIX permits space characters in pathnames, but a pathname containing spacesmust be enclosed in double quote (“) characters. Windows does not support spaces in pathnames;spaces must be stripped from the supplied pathname. The $ZUTIL(147) functionhandles spaces in pathnames as appropriate to the host platform.$ZF(-1) requires the %System_Callout:U privilege.At the programmer prompt, you can perform the same operations as $ZF(-1) by using anexclamation point (!) or a dollar sign ($) as the first character, followed by the command youwish to execute as a child process. For further details, see Issuing Operating System Commandsfrom <strong>Caché</strong> in Using <strong>Caché</strong> <strong>ObjectScript</strong>.ExampleThe following example uses $ZUTIL(147) to handle a pathname for $ZF(-1). A pathnamecontaining spaces is handled as appropriate for the host platform. A pathname that does notcontain spaces is passed through unchanged.SET x=$ZF(-1,$ZUTIL(147,"C:\\MyTest.txt"))See Also• $ZF(-2) function• $ZUTIL(147) function• Calling Out of <strong>Caché</strong> in Using <strong>Caché</strong> <strong>ObjectScript</strong>$ZF(-1)<strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong> 535

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

Saved successfully!

Ooh no, something went wrong!