Michael_Lowry

GET_VAR and :FILL

Discussion created by Michael_Lowry on Jul 22, 2016
Latest reply on May 24, 2017 by Michael_Lowry
I am testing using CREATE_PROCESS and PUT_PROCESS_LINE, and I have run into an error when using GET_VAR. Here is the script
:DEFINE &ProfileList#, string, 4
:FILL &ProfileList#[] = GET_VAR(UC0.MAL.PROFILE_LIST.VARA)
:PRINT &ProfileList#[1]
:PRINT &ProfileList#[2]
:PRINT &ProfileList#[3]
:PRINT &ProfileList#[4]
This results the following error message:
7/22/2016 15:48:15 -  U00020331 Runtime error in object 'UC0.CREATE_PROCESS_TEST.SCRI', line '00002':
U00003712 Missing key for accessing variable 'UC0.MAL.PROFILE_LIST.VARA'.
The GET_VAR tool tip indicates that the second argument is optional:
xyw10u9qjbg3.png
The documentation page for PUT_PROCESS_LINE also includes an example using GET_VAR with only one argument:
:SET &HND# = PREP_PROCESS_FILENAME("WIN01","C:\AUTOMIC\temp\test*.txt","Y",,)
:SET &LINE# = GET_VAR(VARA.FILELIST)
:SET &RET# = PUT_PROCESS_LINE(&HND#,&LINE#)
Is it possible to run GET_VAR with only one argument? If so, how? If not, are the documentation and tool tip incorrect?

Also, although the GET_VAR documentation indicates that the second argument specifies the name of a VARA key, the tool tip refers to the second argument as the Validity Keyword. This suggest that it is not limited to just the name of a key. What are the other valid values of the Validity Keyword? Moreover, how does one use GET_VAR and :FILL together to fill an array with multiple values?

FWIW, this is AE v11.2.2.

Outcomes