W
W0lfw00ds
Guest
I'm trying to implement Java's
I've pieced together the following:
The
I started the
test.p:
Continue reading...
System.out.println()
method in Progress ABL
.I've pieced together the following:
Code:
METHOD STATIC PUBLIC VOID println(i_cText AS CHAR):
IF i_cText = ? THEN i_cText = "".
/* Unix */
IF OPSYS = "UNIX" THEN DO:
IF SESSION:BATCH THEN DO:
UNIX VALUE("echo " + QUOTER(i_cText)).
PAUSE 0.
END.
ELSE DO:
MESSAGE i_cText SKIP.
PAUSE 0.
END.
END.
/* Windows 32/64 */
ELSE IF OPSYS = "WIN32" THEN DO:
IF SESSION:BATCH THEN DO:
OS-COMMAND VALUE("echo " + QUOTER(i_cText)).
PAUSE 0.
END.
ELSE DO:
MESSAGE i_cText SKIP.
PAUSE 0.
END.
END.
/* Else unsupported system */
ELSE UNDO, THROW NEW Progress.Lang.AppError(SUBST("&1: Unsupported operating system '&2'!", PROGRAM-NAME(1), OPSYS)).
END.
The
MESSAGE
statements work fine both in Unix
and Windows
. However, the OS-COMMAND
s are not outputting anything in Windows
(Not tested in Unix
).I started the
prowin
in batch
mode with the following in Powershell
:
Code:
C:\dlc117\bin\prowin -p test.p -b
test.p:
Code:
OS-COMMAND SILENT VALUE("echo " + QUOTER("test1")).
OS-COMMAND VALUE("echo " + QUOTER("test2")).
DOS VALUE("echo " + QUOTER("test3")).
PAUSE 10 NO-MESSAGE.
Continue reading...