Kernel 8.0 APIs Banner
Office of Information and Technology (OIT) Banner
[skip navigation]

$$GTF^%ZISH(): Copy Global to Host File

Reference Type: Supported, Category: Host Files, ICR#: 2320

Description

The $$GTF^%ZISH extrinsic function WRITEs the values of nodes in a global (at the subscript level you specify) to a Host file. If the Host file already exists, it is truncated to length zero (0) before the copy. You do not need to open the Host file before making this call. The Host file is opened (in WRITE mode) and closed by $$GTF^%ZISH.

Format

  $$GTF^%ZISH(global_ref,inc_subscr,path,filename)

Input Parameters

global_ref:

(required) Global to READ lines from, fully resolved in closed root form.

inc_subscr:

(required) Identifies the incrementing subscript level. For example, if you pass ^TMP(115,1,1,0) as the global_ref parameter, and pass 3 as the inc_subscr parameter, $$GTF^%ZISH increments the third subscript [e.g., ^TMP(115,1,x)], but READs nodes at the full global reference
[e.g., ^TMP(115,1,x,0)].

path:

(required) Full path, up to but not including the filename.

filename:

(required) Name of the file to open.

Output

returns:

Returns:

  • 1—Success.

  • 0—Failure.

Example

>S Y=$$GTF^%ZISH($NA(^MYGLOBAL(612,1,0)),2,"USER$:[COMMON]","MYFILE.DAT")