Colon followed by white space terminates a statement. (199)

aug333

New Member
The code below runs in Progress 6.03 on a Unix box but will not compile in Progress 10.2b on a Windows box. Checked syntax, puncuation, hidden characters and can't see anything. I get the following error:

** Line 54. Colon followed by white space terminates a statement. (199)

Can anyone point out the issue?


{syscom.i}
define var response as logical format "Y/N".
define var loop as integer. /* loop control */
define var qreset as logical. /* used in fileunlock proc */
define var seq as integer.
define new shared var output_file as character format "x(8)".
define var data_error as logical.
define var kount1 as integer.
define var kount2 as integer.
define new shared var check like abm_lstchk.
define new shared var old_check like abm_lstchk.
define var order as char format "X".
define var align as logical format "Y/N" initial "Y".
define new shared var comp_add as char format "x(45)" extent 4.
define new shared var comp_name like coc_name.
define var alignments as integer.
define var chkst like abm_chkst.
define new shared var bank like abm_num.
define new shared var cdate as date.
define new shared var fdate as date.
define var date_error like data_error.
define new shared var summarize as logical format "Y/N".
define new shared var rundate as date. /* passed to checkdate.p */
define new shared var fisper as integer. /* returned by checkdate.p */
define new shared var qtyear as logical. /* returned by checkdate.p */
def new shared var vparms as char.
def new shared var vprt label "Printer" like printr.uname init "fin-main".
def new shared var vcopy as integer format ">9" init 1.
{pick.i new} /* variables for getprtr.i */
/*screen headings */
display today "A/P - Print Checks" to 50 dcompany to 79
with no-box no-labels frame scrhead.
/* main program block */
PROGBLOCK:
do:
/* set file lock status for ap_check to io mode */
FILELOCKS:
do for co_filstatus transaction on error undo FILELOCKS, leave PROGBLOCK:
/* check on status of files */
find co_filstatus "ap_check" exclusive-lock no-error no-wait.
if locked co_filstatus or fs_numrpt ne 0 or fs_numexc ne 0 or fs_numio <> 0
then do:
message "~007The Check File is currently locked".
undo FILELOCKS, leave PROGBLOCK.
end.
fs_numexc = fs_numexc + 1.
end. /* FILELOCKS */
PROCESS:
do on endkey undo PROCESS, leave PROCESS:
kount1 = 1.
do for ap_config transaction:
find ap_config "1" no-lock.
bank = acf_bank.
if acf_prcomp = true or acf_praddr = true then do:
do for co_config:
find co_config "1" no-lock.
if acf_prcomp = true then comp_name = coc_name.
if acf_praddr = true then do:
if length(coc_add1) <> 0 then do:
comp_add[kount1] = coc_add1.
kount1 = kount1 + 1.
end.
if length(coc_add2) <> 0 then do:
comp_add[kount1] = coc_add2.
kount1 = kount1 + 1.
end.
if length(coc_add3) <> 0 then do:
comp_add[kount1] = coc_add3.
kount1 = kount1 + 1.
end.
comp_add[kount1] = coc_city + " " + coc_state + " " + coc_zip.
end.
end.
end.
end.
do for ap_bank transaction:
find ap_bank where abm_num = bank no-lock no-error.
if available ap_bank then do:
check = abm_lstchk.
old_check = abm_lstchk.
end.
end.
TAXES:
do for ap_control transaction:
find ap_control "1" no-lock.
fdate = arc_cfdate.
end.
cdate = today.
order = "V".
summarize = false.
alignments = 0.
form "Print Checks (Y/N): " response skip
"Bank Number: " bank skip
"Vendor or Job Order(J/V): " order skip
"Summarize Invoices(Y/N): " summarize skip
"Check Date: " cdate skip
"Check Fiscal Date: " fdate skip
"Check Printer: " vprt
validate (can-find(printr where printr.uname = vprt),
"Printer doesn't exist")
help "Enter printer name or CURSOR-DOWN for options" skip
"Starting Check Number: " check format ">>>>>9" skip
"Print Alignment form(Y/N):" align
with row 6 column 23 no-labels frame datainput.
display response bank cdate fdate vprt check align order
summarize with frame datainput.
update response with frame datainput.
if response = false then leave PROCESS.
PROMPTINPUT:
repeat for ap_bank transaction on endkey undo, leave /*PROCESS*/ PROMPTINPUT:
data_error = false.
update bank with frame datainput.
find ap_bank where abm_num = bank no-lock no-error.
if not available ap_bank then do:
message "~007Bank is not on File".
undo, retry PROMPTINPUT.
end.
check = abm_lstchk.
old_check = abm_lstchk.
update order summarize cdate fdate vprt check
with frame datainput
editing:
readkey.
{getprtr.i
&row = 03
&column = 46
&uframe = datainput
&ufield = vprt
} else apply lastkey.
end.
order = caps(order).
if order <> "J" and order <> "V" then do:
message "~007Order must be J - Job or V - Vendor ".
undo,retry PROMPTINPUT.
end.
/* check fiscal date */
rundate = fdate.
run cochkdat.p.
if rundate = 01/01/1951 then do:
undo,retry PROMPTINPUT.
end.
if length(vprt) = 0 then do:
message "~007Form type must be entered".
undo,retry PROMPTINPUT.
end.
if check = 0 then do:
message "~007Invalid check number".
undo,retry PROMPTINPUT.
end.
if check < old_check then do:
message "~007Check number lower than previosly used check".
message "Care should be taken not to duplicate check numbers".
data_error = true.
end.
if month(cdate) <> month(fdate) then do:
message "~007Month of the Check date is different than the month of the Fiscal Date".
date_error = true.
end.
if date_error = true then do:
response = false.
message "Continue(Y/N):" update response.
if response = true then leave. else next.
end.
/* MOD 1.1 */
/* else leave. */
if data_error = false then leave.
end.
chkst = check.
PRINTALIGN:
repeat on endkey undo PRINTALIGN, return:
update align with frame datainput.
if align = false then leave.
form "Generating Alignment" with no-labels row 17 column 30
frame head.
view frame head.
alignments = alignments + 1.
run align.p.
end.
display "Generating Checks" with row 17 column 31 no-labels frame head1.
if order = "V" then run ap081.p.
else run ap082.p.
hide frame head1 no-pause.
/* set the check print flag */
response = false.
do for ap_control while response = false transaction:
find ap_control "1" exclusive-lock no-wait.
if available ap_control then do:
arc_checks = true.
arc_cfdate = fdate.
leave.
end.
end.
do for ap_bank while response = false transaction:
find ap_bank where abm_num = bank exclusive-lock no-wait.
if available ap_bank then do:
abm_checks = true.
abm_chkaln = alignments.
abm_chkst = chkst.
leave.
end.
end.
end. /* process */
/* release locked files */
qreset = false.
do for co_filstatus while not qreset transaction:
find co_filstatus "ap_check" exclusive-lock no-wait.
if available co_filstatus then do:
fs_numexc = fs_numexc - 1.
qreset = true.
end.
end.
end. /* PROG */
 

Osborne

Active Member
PROCESS is a reserved word as in PROCESS EVENTS. If you name the block to something else you should be okay.
 
Top