Top
PowerCOBOL V11.0 Reference
FUJITSU Software

5.70 PokeData Method

Description:

Sets data in the DDE server.

Used in controls:

DDE

Used in objects:

None.

Parameters:

No OLE data types.

PokeData: A group item whose length is 8196 bytes.

Description of Parameters:

PokeData has the following elementary items.

DataLengthS9(9) COMP-5
The length of the data in the buffer.

DataAreaX(8192)
The data to pass to the DDE server.

Return value:

VT_I4 - ReturnValueS9(9) COMP-5

Zero or greater indicates normal completion.
Negative indicates an error.

Example:

Place this code in the Form's Opened method so that it establishes the DDE connection and executes only once:

 ENVIRONMENT DIVISION.
 DATA DIVISION.
 WORKING-STORAGE SECTION.
 PROCEDURE DIVISION.
     INVOKE CmDDE1 "Execute" 
      USING "Excel c:\exceldde97.xls"
            POW-SWSHOWNORMAL  
      RETURNING ReturnValue
     INVOKE CmDDE1 "OpenDDE" 
      RETURNING ReturnValue

The following code executes the PokeData method:

 ENVIRONMENT DIVISION.
 DATA DIVISION.
 WORKING-STORAGE SECTION.
 01 DDE-Data.
   03 Buffer-Len  PIC S9(9) COMP-5.
   03 DDE-Buffer  PIC X(1024).
 01 ReturnValue   PIC S9(9) COMP-5.
 PROCEDURE DIVISION.
     COMPUTE Buffer-Len
           = LENGTH OF DDE-Buffer.
     MOVE "all of my data" 
       TO DDE-Buffer
     INVOKE CmDDE1 "PokeData" USING DDE-Data 
       RETURNING ReturnValue

Backward compatibility
method name:

POKEDATA
POKEDATA1
POKEDATA4
POKEDATA8

Backward compatibility
arguments:

POKEDATA made up of:
S9(9)COMP-5
X(256)

POKEDATA1 made up of:
S9(9)COMP-5
X(1024)

POKEDATA4 made up of:
S9(9)COMP-5
X(4096)

POKEDATA8 made up of:
S9(9)COMP-5
X(8192)