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

$$FTG^%ZISH(): Load Host File into Global

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

Description

The $$FTG^%ZISH extrinsic function loads a Host file into a global. Each line of the Host file becomes the value of one node in the global. You do not need to open the Host file before making this call; it is opened and closed by $$FTG^%ZISH.

If a line from a Host file exceeds 255 characters in length, the overflows are stored in overflow nodes for that line, as follows:

Host File: Overflow lines in a Host file sample

Format

  $$FTG^%ZISH(path,filename,global_ref,inc_subscr[,ovfsub])

Input Parameters

path:

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

filename:

(required) Name of the file to open.

global_ref:

(required) Global reference to WRITE Host file to, in fully resolved (closed root) format. This function does not KILL the global before writing to it.

At least one subscript must be numeric. This is the incrementing subscript (i.e., the subscript that $$FTG^%ZISH increments to store each new global node). This subscript need not be the final subscript. For example, to load into a WORD PROCESSING field, the incrementing node is the second-to-last subscript; the final subscript is always zero.

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, $$FTG^%ZISH increments the third subscript [e.g., ^TMP(115,1,x)], but WRITEs nodes at the full global reference
[e.g.,^TMP(115,1,x,0)].

ovfsub:

(optional) Name of subscript level at which overflow nodes for lines (if any) should be stored. Overflows occur if a line is greater than 255 characters. Further overflows occur for every additional 255 characters. The default subscript name at which overflows are stored for a line is "OVF".

Output

returns:

Returns:

  • 1—Success.

  • 0—Failure.

Example

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