/*******************************************************************************
procksyn.p
This procedure will check the syntax of a Progress procedure from within Ed4W.
copy from PEG
*******************************************************************************/
def var tInt as int no-undo.
def var vSourceFile as character format "x(30)" no-undo.
assign vSourceFile = session:parameter.
/***** substitute your database parameters here ****/
connect unifipc -S unifidev -N tcp -H nt_los_reports.
/*-- compile part ---*/
compile value(vSourceFile).
if compiler:error or
compiler:warning then do:
/* first -1 is digit one, second -l is lc("L") */
run WinExec ("c:\ed4w\ed4w -1 " + compiler:file-name +
" -l " + string(compiler:error-row),1,output tInt).
end.
else do:
message "Syntax is correct." view-as alert-box information.
end.
quit.
&if "{&OPSYS}" = "WIN32" &then
procedure WinExec external "kernel32.dll":u:
def input parameter pProgName as char.
def input parameter pStyle as long. /* 1=normal, 2=minimized */
def return parameter pResult as long.
end procedure.
&else
procedure WinExec external "kernel.exe":u:
def input parameter pProgName as char.
def input parameter pStyle as short. /* 1=normal, 2=minimized */
def return parameter pResult as short.
end procedure.
&endif
/*******************************************************************************/

In Progress 8.2+ it will be DLC\BIN\PROWIN32.EXE.
