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

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

Reference Type: Supported, Category: Host Files, Integration Agreement: 2320

Description

This 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 overflow(s) 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 will be the incrementing subscript (i.e., the subscript that $$FTG^%ZISH will increment 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 will increment the third subscript, such as ^TMP(115,1,x), but will WRITE nodes at the full global reference, such as ^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)

 


VA (Internet) / VA(Intranet) / OI / PD / Site Map / Terms of Use / VA Privacy Policy / Accessibility

Reviewed/Updated: August 26, 2011

If you have questions, need more information, or are having accessibility problems with this website, please contact us by E-Mail: Webmasters, Phone: 510-768-6800, or FAX: 510-768-6850.