This code does not work on XP or 2003 server. Any ideas?
SELECT SXML-FILE ASSIGN TO WS-SXML-FILE-NAME
ORGANIZATION IS SEQUENTIAL
LOCK MODE IS MANUAL
ACCESS IS SEQUENTIAL
FILE STATUS IS 200-FILE-STATUS.
/
01 WS-OPERATION PIC X(005).
01 WS-FILE-NAME PIC X(255).
01 WS-PARAMETERS PIC X(255).
01 WS-DIRECTORY PIC X(255).
01 WS-RETURN-STATUS PIC X(005) COMP-5.
01 WS-SXML-PRINTER PIC X(255).
**********
010-EXECUTE-WINDOWS-NORMAL.
******************************************************************
* *
******************************************************************
MOVE SPACES TO WS-OPERATION.
STRING "Open" DELIMITED BY SPACE
X"00" DELIMITED BY SIZE
INTO WS-OPERATION.
MOVE WS-SXML-PRINTER TO WS-FILE-NAME.
MOVE WS-SXML-FILE-NAME TO WS-PARAMETERS.
MOVE SPACES TO WS-DIRECTORY.
CALL WINAPI "ShellExecuteA" USING BY VALUE 0 SIZE 4
BY REFERENCE WS-OPERATION
BY REFERENCE WS-FILE-NAME
BY REFERENCE WS-PARAMETERS
BY REFERENCE WS-DIRECTORY
BY VALUE 0 SIZE 4
RETURNING WS-RETURN-STATUS.
/
SELECT SXML-FILE ASSIGN TO WS-SXML-FILE-NAME
ORGANIZATION IS SEQUENTIAL
LOCK MODE IS MANUAL
ACCESS IS SEQUENTIAL
FILE STATUS IS 200-FILE-STATUS.
/
01 WS-OPERATION PIC X(005).
01 WS-FILE-NAME PIC X(255).
01 WS-PARAMETERS PIC X(255).
01 WS-DIRECTORY PIC X(255).
01 WS-RETURN-STATUS PIC X(005) COMP-5.
01 WS-SXML-PRINTER PIC X(255).
**********
010-EXECUTE-WINDOWS-NORMAL.
******************************************************************
* *
******************************************************************
MOVE SPACES TO WS-OPERATION.
STRING "Open" DELIMITED BY SPACE
X"00" DELIMITED BY SIZE
INTO WS-OPERATION.
MOVE WS-SXML-PRINTER TO WS-FILE-NAME.
MOVE WS-SXML-FILE-NAME TO WS-PARAMETERS.
MOVE SPACES TO WS-DIRECTORY.
CALL WINAPI "ShellExecuteA" USING BY VALUE 0 SIZE 4
BY REFERENCE WS-OPERATION
BY REFERENCE WS-FILE-NAME
BY REFERENCE WS-PARAMETERS
BY REFERENCE WS-DIRECTORY
BY VALUE 0 SIZE 4
RETURNING WS-RETURN-STATUS.
/