DLG-VCOPY

Copy data from a Dialog variable to a COBOL program variable and generate the Working-Storage entry for the COBOL variable, if the COBOL level is specified.
Restriction: This topic applies only when the AppMaster Builder AddPack has been installed, and applies only to Windows platforms.

Target:

DLG

Syntax:

DLG-VCOPY [COBOLlevel] COBOLvariable

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

Syntax Rules:

  1. Code FROM dialogvariable on the same line as COBOLvariable.
  2. Coding COBOLlevel generates COBOLvariable in Working-Storage; otherwise, define the COBOL variable in Working-Storage.
  3. Data field DLG-VCOPY-RC contains the return code after call execution.

Parameters:

COBOLlevel

COBOLvariable level number.

COBOLvariable

COBOL data name the call processes.

FROM dialog variable

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

GENONLY

Define 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:

Copy data from a system variable into a screen field. The call does not generate the COBOL variable because the COBOL level number is not coded.
DLG-VCOPY SCRA-ZUSER FROM ZUSER LEN 8

                  		
Copy data from a system variable into a Working-Storage variable. Coding the COBOL level number generates the COBOL variable.
DLG-VCOPY 01 WS-LONG-ERROR-MESSAGE PIC X(78) FROM 
ZERRLM