DLG-VDEFINE

Establish a link between a Dialog function pool variable and a COBOL program variable.
Restriction: This topic applies only when the AppMaster Builder AddPack has been installed, and applies only to Windows platforms.

Target:

DLG

Syntax:

DLG-VDEFINE [COBOLlevel] COBOLvariable

... [[AS] dialogvariable]
... [PIC COBOLpicture]|LEN value
... [GENONLY]

Syntax Rules:

  1. Code AS dialogvariable on the same line as COBOLvariable.
  2. NTRY automatically links any panel variables to screen field names.
  3. Coding COBOLlevel generates COBOLvariable in Working-Storage; otherwise, define the COBOL variable in Working-Storage.
  4. Data field DLG-VDEFINE-RC checks the return code after call execution.

Parameters:

AS dialog variable

DLG variable where data links from; default is COBOLvariable, truncated to eight characters.

COBOLlevel

COBOLvariable level number.

COBOLvariable

COBOL data name the call processes.

GENONLY

Define the COBOLvariable data item in Working-Storage only.

LEN value

COBOLvariable length; can be numeric integer, COBOL variable, or arithmetic expression.

PIC COBOLpicture

COBOLvariable picture; default is alphanumeric.

Example:

Establish a link between function pool variable COMDATA and COBOL variable WS-COMM-DATA. Coding the COBOL level number generates the COBOL data name.
DLG-VDEFINE 01 WS-COMM-DATA PIC X(150) AS COMDATA