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.

ZLOAD2. A USE command to make the device the current device.3. A ZLOAD command without arguments.Line loading will continue until <strong>Caché</strong> reads a null string line (""). This loaded routine hasno name until you file it with the ZSAVE command.ZLOAD with an ArgumentZLOAD routine loads the specified (existing) routine into the routine buffer from the currentnamespace.ZLOAD does an implicit ZREMOVE when it loads the routine. That is, ZLOAD deletesany routine previously loaded as it writes the loaded routine. When it loads the routine,ZLOAD leaves the line pointer at the end of the last line of the routine.Once loaded, a routine remains the current one for the process until you load another routineexplicitly, with a ZLOAD command, or implicitly, with a DO or a GOTO command. Aslong as the routine is current, you can edit the routine (with ZINSERT and ZREMOVEcommands) and display it (with the ZPRINT command).You can only use the ZLOAD command when you enter it from the programmer prompt orwhen you call it using an XECUTE command. It should not be coded into the body of aroutine because its operation would effect the execution of that routine. Specifying ZLOADin a routine results in a compile error. Any attempt to execute ZLOAD from within a routinealso generates an error.ArgumentspcAn optional postconditional expression. <strong>Caché</strong> executes the command if the postconditionalexpression is true (evaluates to a non-zero numeric value). <strong>Caché</strong> does not execute the commandif the postconditional expression is false (evaluates to zero). For further details, referto Command Postconditional Expressions in Using <strong>Caché</strong> <strong>ObjectScript</strong>.routineThe name of the routine to be loaded. Routine names are case-sensitive. If the specified routinedoes not exist, <strong>Caché</strong> generates a error.ExamplesThe following example loads the routine ROUT, saved on disk:ZLOAD ROUT<strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong> 395

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

Saved successfully!

Ooh no, something went wrong!