Directives
PROCESS Call a NOMADS Panel
 
Formats 1. Invoke a NOMADS Panel: PROCESS "panel","[lib]",arg_1$,arg_2$, ... arg_20$
 
2. Invoke a NOMADS Query: PROCESS "panel","[lib]",val$
 
3. Invoking File Maintenance: PROCESS "panel","[lib]",arg_1$
 
Where:
 
arg_1$ ... List of valid arguments for a Panel Object. Optional string
arg_20$ expressions. You can use up to 20 arguments. These arguments are accessible in the invoked panel as values in the reserved NOMADS variables ARG_1$ through ARG_20$.
For Query or File Maintenance objects, you're limited to one argument, the value of which is accessible in the reserved variable ARG_1$. The others are reserved.
 
lib Optional. Name of the NOMADS library containing the panel name. String expression. If you use null (""), NOMADS uses your currently active library.
 
panel Name of the NOMADS Panel, Query or File Maintenance object. String expression.
 
val$ Starting / return value for a Query. See the examples, below.
 
Description Use the PROCESS directive to call a NOMADS panel from a program. NOMADS returns to the program when the panel is exited. You can pass optional arguments to and from the NOMADS panel.


*Note* When you use the PROCESS directive, ProvideX converts the statement internally into a CALL to *winproc(the NOMADS engine) to process the panel.


 
See Also PROCESS, to Invoke a Query Object in the NOMADS Reference
 
Examples The following examples illustrate the different uses for the PROCESS directive.
 
Panel Example:
In the example below, the ProvideX PROCESS statement invokes the SALES panel through the program and passes two arguments, SALES_ID$ and STR(SALES_AMT), to the SALES panel to get the values:
 
PROCESS "SALES","LIBRARY.EN",SALES_ID$,STR(SALES_AMT)
In the NOMADS Panel Header Pre-Display logic, you would Execute the following assignments:
 
SALES_ID$=ARG_1$;SALES_AMT=NUM(ARG_2$)
 
Query Example:
 
For queries that are not attached to a NOMADS control object,
 
0110 PROCESS "MY_QUERY","",X$
When MY_QUERY runs, the value of X$ is used to set the starting position in the file. When MY_QUERY is exited, NOMADS passes the return value to the calling program in X$.