X"91" call outs do not seem to work in managed code under visual studio

[Migrated content. Thread originally posted on 08 May 2012]

Have a problem with x"91" call outs in managed code.

Code reads as...

01 command-lin-string pic x(80) value "dir/w".

01 RESULT PIC X COMP-X.
01 FUNC PIC X COMP-X VALUE 35.
01 COMMAND-LIN.
03 COMMAND-LIN-LENGTH PIC X COMP-X VALUE 0.
:
:
DISPLAY COMMAND-LIN-STRING UPON COMMAND-LINE.
CALL x"91" USING RESULT, FUNC, COMMAND-LIN.
IF RESULT = 0
MOVE "01" to lnk-error-status
END-IF.

No DOS box appears showing a directory listing (as it does in UNMANAGED code) but RESULT comes back as 0!


Managed code as defined by Application (program) output as Class library under .Net Framework 4.0
Parents
  • Over the years it has been our policy to try to replace these call-by-number rotuines with equivalent call-by-name routines where possible.

    We understand that some customers (and indeed our own software) use various call-by-number routines, so over time and when needed some of these calls have been implemented to help bridge the gap between native and managed code. Some of them have been implemented because the MF ACCEPT/DISPLAY module (ADIS) required them under-the-covers.

    So to answer your question, some of these routines have been implemented in managed .NET code but not all of them are available and some are only partially implemented.

    Specifically for the ones that you mention in your post:

    x”a7” fn 17 (set cursor shape)  is implemented (used by our ADIS support)
        alternatively you can use Console::Shape (which is what the runtime does)
    x”af” is partially implemented (used by our ADIS support)
    x”b0” fn 0 (setup function key table) is implemented (used by our ADIS support)
    x'e5' (sound alarm) is implemented (used by our ADIS support)

    All of these functions are only available in managed console applications (not gui) and it is unknown if they are 100% compatible, as the main purpose of the routines is to support ADIS itself in its pursuit of implementing the accept/display syntax.

    If you have a requirement for a specific routine and it does not appear to function properly, then please let us know about it and we will do our best to provide a workaround, if possible.

    Thanks.

Reply
  • Over the years it has been our policy to try to replace these call-by-number rotuines with equivalent call-by-name routines where possible.

    We understand that some customers (and indeed our own software) use various call-by-number routines, so over time and when needed some of these calls have been implemented to help bridge the gap between native and managed code. Some of them have been implemented because the MF ACCEPT/DISPLAY module (ADIS) required them under-the-covers.

    So to answer your question, some of these routines have been implemented in managed .NET code but not all of them are available and some are only partially implemented.

    Specifically for the ones that you mention in your post:

    x”a7” fn 17 (set cursor shape)  is implemented (used by our ADIS support)
        alternatively you can use Console::Shape (which is what the runtime does)
    x”af” is partially implemented (used by our ADIS support)
    x”b0” fn 0 (setup function key table) is implemented (used by our ADIS support)
    x'e5' (sound alarm) is implemented (used by our ADIS support)

    All of these functions are only available in managed console applications (not gui) and it is unknown if they are 100% compatible, as the main purpose of the routines is to support ADIS itself in its pursuit of implementing the accept/display syntax.

    If you have a requirement for a specific routine and it does not appear to function properly, then please let us know about it and we will do our best to provide a workaround, if possible.

    Thanks.

Children
No Data