Products Downloads


French version


 

Context: 2 programs running into two different client processes:

 

Program 1 send data (text input field) to program 2.

Data is automatically received by program 2.

 

************PROGRAM 1***********

 

** Data sent

 

Declaration

NUM_BIN_4

ReturnCode

ALPHA(15)

AdeliaVar

NUM_BIN_4

DataNbr

BOOL

DataRecept

 

Program

* Data Exchange object name: DTX_01

* Data name: DATA_01

*

* 1st step: Connection

*

DataRecept = *true

CALL_METHOD DTX_01 CONNECT DataRecept ReturnCode

*

* 2nd step: Data loading

*

AdeliaVar = 'Data to send'

DataNbr = 1

CALL_METHOD DTX_01 WRITE AdeliaVar DataNbr ReturnCode

*

* 3rd step: Validating data (triggers event "DataChange")

* of program 2

*

CALL_METHOD DTX_01 VALIDATE ReturnCode

*

 

 

************PROGRAM 2***********

 

** Data reception

 

Declaration

ALPHA(15)

AdeliaVar

NUM_BIN_4

Index

NUM_BIN_4

DataNbr

NUM_BIN_4

ReturnCode

BOOL

DataRecept

 

 

Program

* Data Exchange object name: DTX_02

* Data name: DATA_01

*

 

INITIALIZATION

*

* Connection

*

DataRecept = *true

CALL_METHOD DTX_02 CONNECT DataRecept ReturnCode

WORK_WITH_EVENTS

DTX_02

DTX_02:DataChange

*

* Read (event triggered by the method Validate of program 1 DTX_01 object)

*

Index = 1

DataNbr = 1

CALL_METHOD DTX_02 READ AdeliaVar Index DataNbr ReturnCode

*

ZZ_DATA_01 = AdeliaVar

 

 

Back

 

↑ Top of page

  • Aucune étiquette