Note that there are some explanatory texts on larger screens.

plurals
  1. POProblem running legacy program in Windows 7 using DDE
    primarykey
    data
    text
    <p>My admin folks have encountered a big problem, and I'm relaying their plight to SO:</p> <p>We have a legacy database application (written in Progress 4GL/OpenEdge) that invokes <strong>WordPerfect X3</strong> in order to generate a report. The path to the WordPerfect executable is hard-coded within the database app, as well as the location of scanned PDFs that are to be inserted into the database, <em>and we have no way to modify the program</em>.</p> <p>Most of our workstations have been successfully migrated from <strong>WinXP</strong> to <strong>Win7</strong>, and the legacy application works fine UNTIL it tries to invoke WordPerfect, saying it can't find the executable (even with X3 installed in the exact same path used on WinXP) ... same with the scanned document folder.</p> <p>Any suggestions?</p> <hr> <p><strong>UPDATE:</strong></p> <p>I spent this morning helping my admin folks with the various suggestions you all provided ... we checked file permissions, looked at the compiled (.r) files with a Hex Editor (thanks @Tom and @Ernest), and did a <em>search in files</em> inside all source code (.p) with Notepad++.</p> <p><strong><em>Here's what I found:</em></strong> the program is NOT invoking WordPerfect directly (<em>as I was originally informed</em>), but instead is using DDE. Here's the error message that Progress 4GL produces:</p> <p><img src="https://i.stack.imgur.com/TPJN5.png" alt="DDE INITIATE Failed. (3153)"></p> <p>I am aware that there are issues with DDE and Win7, so I was wondering if there's a work-around, maybe registry keys that need to be modified or something to that affect. </p> <p>I'm including an excerpt from the source code below, hoping that somebody recognizes what's going on (I'm NOT familiar with Progress 4GL, so it's all greek to me):</p> <pre><code>/* setup DDE communicaiton with WordPerfect 12 */ /* and perform the merge of the various document */ DEFINE VARIABLE sys AS INTEGER NO-UNDO. DEFINE VARIABLE mline AS CHAR FORMAT "x(220)" NO-UNDO. DEFINE VARIABLE intResult AS INTEGER NO-UNDO. DEFINE VARIABLE err-status AS INTEGER. {GLOBVAR.I} DEFINE VAR C-Win AS WIDGET-HANDLE NO-UNDO. DEFINE FRAME FRAME-b WITH 1 DOWN KEEP-TAB-ORDER OVERLAY SIDE-LABELS NO-UNDERLINE THREE-D AT COL 13 ROW 4.1 SIZE 11 BY 2 TITLE "FRAMEWP". IF SESSION:DISPLAY-TYPE = "GUI":U THEN CREATE WINDOW C-Win ASSIGN HIDDEN = YES HEIGHT = 4 WIDTH = 20 MAX-HEIGHT = 4 MAX-WIDTH = 20 VIRTUAL-HEIGHT = 4 VIRTUAL-WIDTH = 20 RESIZE = yes SCROLL-BARS = no STATUS-AREA = no BGCOLOR = ? FGCOLOR = ? KEEP-FRAME-Z-ORDER = yes THREE-D = yes MESSAGE-AREA = no SENSITIVE = YES. IF SESSION:DISPLAY-TYPE = "GUI":U AND VALID-HANDLE(C-Win) THEN C-Win:HIDDEN = NO. VIEW FRAME DEFAULT-FRAME IN WINDOW C-Win. VIEW FRAME FRAME-b IN WINDOW C-Win. C-Win. ENABLE ALL WITH FRAME FRAME-B TITLE "". ASSIGN FRAME FRAME-B:VISIBLE = FALSE. OS-DELETE VALUE(pass-txtout). PAUSE 1 NO-MESSAGE IN WINDOW c-win. OS-DELETE VALUE(pass-mergedoc). pass-shelldoc = '"' + trim(pass-shelldoc) + '"'. pass-shelldoc = TRIM(pass-shelldoc). pass-txtfile = '"' + TRIM(pass-txtfile) + '"'. pass-txtfile = TRIM(pass-txtfile). pass-txtout = '"' + TRIM(pass-txtout) + '"'. pass-txtout = TRIM(pass-txtout). pass-mergedoc = '"' + TRIM(pass-mergedoc) + '"'. pass-mergedoc = TRIM(pass-mergedoc). DDE INITIATE sys FRAME FRAME FRAME-B:HANDLE APPLICATION "wpwin13_macros" TOPIC "COMMANDS". /* create a wp doc from the pass-txtfile just created */ mline = "Application (WordPerfect; " + '"WordPerfect"' + '; Default!; "EN")'. mline = TRIM(mline). DDE EXECUTE sys COMMAND mline. mline = "FileNew ()". mline = TRIM(mline). DDE EXECUTE sys COMMAND mline. mline = "ImportSetFileName (Filename: " + pass-txtfile + ")". mline = TRIM(mline). DDE EXECUTE sys COMMAND mline. mline = "ImportSetSource (SourceType: ASCII!)". mline = TRIM(mline). DDE EXECUTE sys COMMAND mline. mline = "ImportSetDestination (DestinationType: MergeData!)". mline = TRIM(mline). DDE EXECUTE sys COMMAND mline. mline = "ImportSetSizeToFit (State: No!)". mline = TRIM(mline). DDE EXECUTE sys COMMAND mline. mline = "ImportSetAsciiFieldDelimiter (FieldDelimiter: " + '"^"' + ")". mline = TRIM(mline). DDE EXECUTE sys COMMAND mline. mline = "ImportSetAsciiRecordDelimiter (RecordDelimiter: " + '"%"' + ")". mline = TRIM(mline). DDE EXECUTE sys COMMAND mline. mline = "ImportSetAsciiStrip (StripChars: " + '""' + ")". mline = TRIM(mline). DDE EXECUTE sys COMMAND mline. mline = "ImportSetAsciiEncap (EncapsulationChar: " + '"""' + '""' + ")". mline = TRIM(mline). DDE EXECUTE sys COMMAND mline. mline = "ImportDoImport ()". mline = TRIM(mline). DDE EXECUTE sys COMMAND mline. mline = "WAIT(10)". mline = TRIM(mline). DDE EXECUTE sys COMMAND mline. mline = "FileSave (Filename: " + pass-txtout + "; ExportType: WordPerfect_6_7_8!; yes!)". mline = TRIM(mline). DDE EXECUTE sys COMMAND mline. mline = "Close()". mline = TRIM(mline). DDE EXECUTE sys COMMAND mline. /* perform the merge using sheldoc, pass-txtout and pass-shelldoc */ mline = "Application (WordPerfect; " + '"WordPerfect"' + '; Default!; "EN")'. mline = TRIM(mline). DDE EXECUTE sys COMMAND mline. mline = "MergeRUN(Formfile!;" + pass-shelldoc + ";DataFile!;". mline = TRIM(mline). DDE EXECUTE sys COMMAND mline. mline = mline + pass-txtout + ";TOFILE!;" + pass-mergedoc + ")". mline = TRIM(mline). DDE EXECUTE sys COMMAND mline. mline = "CLOSE()". mline = TRIM(mline). DDE EXECUTE sys COMMAND mline. IF substring(pass-mergedoc,16,3) = "D12" THEN. ELSE DO: mline = "FileOpen (Filename: " + pass-mergedoc + ")". mline = TRIM(mline). DDE EXECUTE sys COMMAND mline. mline = "AppMaximize ()". mline = TRIM(mline). DDE EXECUTE sys COMMAND mline. mline = "APPRESTORE ()". mline = TRIM(mline). DDE EXECUTE sys COMMAND mline. END. DDE TERMINATE sys NO-ERROR. : : </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload