6.8.8 DMcob_Control

With this function, general settings in the ISA Dialog Manager can be changed or actions can be triggered.

77  DM-objectid  pic 9(9) binary.
77  action       pic 9(4) binary.

call "DMcob_Control" using
            DM-StdArgs
            DM-objectid
            action.

Parameters

-> DM-objectid

This parameter specifies the object to which the action to be triggered refers.

-> action

Specifies the action the Dialog Manager is to execute. To do so, there are different constants defined in the copy file IDMcobws.cob. These constants are described in the table below.

-> DM-Options of DM-StdArgs

This parameter possibly is used for an argument required by action (see table below).

Return Value

DM-status

DM-error

The action could not be executed.

DM-success

The action was executed successfully.

The following table shows the valid assignments of the individual parameters and describes their meanings. When nothing else is stated with the action, DM-objectid should be 0.

action

options

Meaning

DMF-UpdateScreen

0

All internal SetVal calls are to be brought on screen. To do so, the first parameter has to be specified with the dialog.

DMF-SignalMode

0

The signals are intercepted by the function "signal".

 

1

The signals are intercepted by the function "sigaction".

DMF-SetCodePage

 

With this action the code page for the transfer of strings between application and IDM can be set.

Usually, IDM expects and returns strings that are encoded according to the ISO 8859-1 standard. With this action a different character encoding can be defined.

As of IDM version A.06.01.d, it is possible to specify an Application object in the objectid parameter. This changes the application-specific code page that is required for processing strings. The change of an application-specific code page within one of the functions of the corresponding application has an immediate effect.

However, the call on a DDM server side does not support changing the application code page, but only affects the network application anyway.

DMF-SetFormatCodePage

 

Defines the code page in which format functions expect and return strings.

The options below apply to DMF-SetCodePage and DMF-SetFormatCodePage

 

CP-ascii

ASCII character encoding.

 

CP-iso8859

Western European Latin-1 encoding according to ISO 8859-1.

 

CP-cp437

English character encoding according IBM code page 437 (MS-DOS).

 

CP-cp850

Western European character encoding according to IBM code page 850 (MS-DOS).

 

CP-iso6937

Western European character encoding with variable length according to ISO 6937..

 

CP-winansi

Microsoft Windows character encoding.

 

CP-dec169

Character encoding according to DEC code page 169.

 

CP-roman8

8-bit character encoding according to HP code page Roman-8.

 

CP-utf8

8-bit Unicode encoding with variable length, corresponds to ASCII encoding for the characters 0 to 127.

 

CP-utf16

CP-utf16b

CP-utf16l

16-bit Unicode encoding with character widths from 2 up to 4 bytes.

There are two variants:

  • BE – big-endian, bytes with higher numerical significance first.
  • LE – little-endian, bytes with lower numerical significance first.

UTF-16 without a specified byte order corresponds to the LE variant on Microsoft Windows and to the BE variant on Unix systems.

 

CP-cp1252

Western European character encoding according to Microsoft Windows code page 1252.

 

CP-acp

Currently used “ANSI code page” of an application on Microsoft Windows.

Can only be used on Microsoft Windows.

 

CP-hp15

Western European 16-bit character encoding used by HP systems.

 

CP-jap15

Japanese 16-bit character encoding used by HP systems.

 

CP-roc15

Simplified Chinese 16-bit character encoding used by HP systems.

 

CP-prc15

Traditional Chinese 16-bit character encoding used by HP systems.

Note

Switching to a code page is valid until another code page is set. All strings have to be transferred in this code page and all strings which IDM transfers to the application use this code page.

Example

To set “IBM 437” as code page, the call should look like this:

    77 action        pic 9(4) binary value 0.

 

    move CP-cp437 to action.

    move DMF-SetCodePage to DM-Options.

    call "DMcob_Control" using DM-StdArgs 0 action.