Contents: | Main | Chapter | See Also: | Getting Started Manual | Advanced User Manual |
This extrinsic function retrieves a single attribute from a single file or field.
$$GET1^DID(FILE,FIELD,FLAGS,ATTRIBUTE,TARGET_ROOT,MSG_ROOT)
FILE |
(Required) File number. |
|
FIELD |
Field number or name. (Required only when field attributes are being requested, otherwise this function assumes a file attribute is being requested) |
|
FLAGS |
(Optional) Flag to control processing: |
|
Z | Zero nodes on word processing attributes are included in the array subscripts. | |
ATTRIBUTE |
(Required) A list of data dictionary attribute names separated by semicolons. Full attribute names must be used. To see a list of the FILE ATTRIBUTES that you can use, click here. To see a list of the FIELD ATTRIBUTES that can be used, click here. |
|
TARGET-ROOT |
Closed array reference where multi-lined attributes will be returned. (Required only when multi-line values are returned, such as word processing attributes like "DESCRIPTION") |
|
MSG-ROOT |
(Optional) The name of a closed root reference that is used to pass error messages. If not passed, ^TMP("DIERR",$J) is used. |
A successful call returns the attribute requested. This can either be set into a variable or written to the output device.
Example 1
> S X=$$GET1^DID(999000,"","","DESCRIPTION","ARRAY","ERR") ZW @X ARRAY(1)=This is the description of the file (ZZZDLTEST). ARRAY(2)=And this is the second line of the description.
Example 2
>W $$GET1^DID(999000,"","","GLOBAL NAME") ^DIZ(999000,
Example 3
>W $$GET1^DID(999000,.01,"","LABEL") NAME
Example 4
>S X=$$GET1^DID(999000,.01,"Z","DESCRIPTION","ARRAY","ERR") ZW @X ARRAY(1,0)=This is the description of the .01 filed ARRAY(2,0)=in file 999000. >W X ARRAY
200 | Parameter is invalid or missing. |
202 | Specified parameter in missing or invalid. |
505 | Ambiguous field. |
File/Field |
This retriever call differentiates whether the request is for a file or a field by the second parameter. If the second parameter is null, the retriever assumes (since no field is passed) that a file attribute is desired. If the second parameter is not null, the retriever assumes a field attribute is requested. |
Reviewed/Updated: March 10, 2007