# 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$ ... arg_20$ | List of valid arguments for a Panel object. Optional string 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 are 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 Example.

## 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.

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

## See Also

Invoking a Query

## Example

These examples illustrate the different uses for the PROCESS directive.

Panel Example:

In this example, the PxPlus 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:

> 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$.