RexxUtil for Regina Rexx, part II (Or, tales of conversion to Rexx for Windows)
Author |
Message |
John Wir #1 / 17
|
 RexxUtil for Regina Rexx, part II (Or, tales of conversion to Rexx for Windows)
OK, I've gotten past the lower case issue. RexxUtil by Patrick McPhee loads. (Load SysLoadFuncs as sysloadfuncs and use Regina.exe not Rexx.exe). Now to execute a 1500+ line program originally written in Rexx with RexxUtil for OS2 under Windows NT. The name of the program is savecrimereports.rexxx. (the OS2 program with the extension changed from .cmd to .rexx) Right out of the box, I get this: G:\CMD>notepad savecrimereports.rexx G:\CMD>savecrimereports.rexx g9tajb0.msg Error 14 running "G:\CMD\SaveCrimeReports.rexx", line 1532: Incomplete DO/SELECT/IF G:\CMD> The first 6 lines of the program are: ****************** /* SaveCrimeReports.cmd */ parse arg messagefile mode1 mode2 . trace ?R if length(messagefile)<15 then messagefile="g:\southsde\pmmail20\jwirt21.act\inbox.fld\"||messagefile mode1 mode2 exit ok=SysFileTree(messagefile,"filelist","F") if filelist.0=0 then do say "File not found." messagefile exit end ***************** I entered the first "exit" command to force the program to quit so I wouldn't get the error message. Still I get the error message, "Error on line 1532." How does the Regina interpreter get past the first Exit command? This savecrimereports.rexx works PERFECTLY (indeed, robustly) as savecrimereports.cmd under Rexx for OS2. So am I in for a big deal converting it to Regina Rexx? John
|
Fri, 29 Aug 2003 09:01:16 GMT |
|
 |
John Wir #2 / 17
|
 RexxUtil for Regina Rexx, part II (Or, tales of conversion to Rexx for Windows)
Sorry, here is my post again with some lines removed to make it intelligible.
OK, I've gotten past the lower case issue. RexxUtil by Patrick McPhee loads. (Load SysLoadFuncs as sysloadfuncs and use Regina.exe not Rexx.exe). Now to execute a 1500+ line program originally written in Rexx with RexxUtil for OS2 under Windows NT. The name of the program is savecrimereports.rexxx. (the OS2 program with the extension changed from .cmd to .rexx) Right out of the box, I get this: G:\CMD>savecrimereports.rexx g9tajb0.msg Error 14 running "G:\CMD\SaveCrimeReports.rexx", line 1532: Incomplete DO/SELECT/IF G:\CMD> The first 6 lines of the program are: ****************** /* SaveCrimeReports.cmd */ parse arg messagefile mode1 mode2 . trace ?R if length(messagefile)<15 then messagefile="g:\southsde\pmmail20\jwirt21.act\inbox.fld\"||messagefile exit ok=SysFileTree(messagefile,"filelist","F") if filelist.0=0 then do say "File not found." messagefile exit end ***************** I entered the first "exit" command to force the program to quit so I wouldn't get the error message. Still I get the error message, "Error on line 1532." How does the Regina interpreter get past the first Exit command? This savecrimereports.rexx works PERFECTLY (indeed, robustly) as savecrimereports.cmd under Rexx for OS2. So am I in for a big deal converting it to Regina Rexx? John
|
Fri, 29 Aug 2003 12:05:51 GMT |
|
 |
Patrick Mcph #3 / 17
|
 RexxUtil for Regina Rexx, part II (Or, tales of conversion to Rexx for Windows)
% Now to execute a 1500+ line program originally written in Rexx with RexxUtil % for OS2 under Windows NT. % % The name of the program is savecrimereports.rexxx. (the OS2 program with % the extension changed from .cmd to .rexx) Right out of the box, I get % this: % % G:\CMD>savecrimereports.rexx g9tajb0.msg % Error 14 running "G:\CMD\SaveCrimeReports.rexx", line 1532: Incomplete % DO/SELECT/IF % G:\CMD> One difference between Regina and OS/2 Classic Rexx is that Regina performs a full parse before executing, where Classic Rexx defers the parse. As I understand it, Object Rexx has the same problem, and probably most others. Assuming there is a syntax error at line 1532, how big the problem is depends on how many such errors there are, and why they're there. If there's data being read using sourceline, you could try putting it in a comment. (if there isn't really a syntax error, then I guess you have a big problem ...) -- Patrick TJ McPhee Knightsbridge SW7
|
Sat, 30 Aug 2003 02:25:06 GMT |
|
 |
Brian {Hamilton Kell #4 / 17
|
 RexxUtil for Regina Rexx, part II (Or, tales of conversion to Rexx for Windows)
Quote: > The name of the program is savecrimereports.rexxx. (the OS2 program with > the extension changed from .cmd to .rexx) Right out of the box, I get this: > G:\CMD>notepad savecrimereports.rexx > G:\CMD>savecrimereports.rexx g9tajb0.msg > Error 14 running "G:\CMD\SaveCrimeReports.rexx", line 1532: Incomplete > DO/SELECT/IF > G:\CMD> [snip] > This savecrimereports.rexx works PERFECTLY (indeed, robustly) as > savecrimereports.cmd under Rexx for OS2.
I sounds to me as if perhaps there have always been syntactic errors present in your OS/2 program, but they never showed up at run-time because that particular bit of code wasn't invoked. Perhaps Regina is like the Object Rexx interpreter: it performs a proper syntax check before starting interpretation, rather than fail when it comes upon the error later. If you still have access to OS/2, and have either Warp 4 or can download the Object Rexx that comes for free, then invoke SWITCHRX.CMD and reboot your OS/2 system, and then see if you get the self-same errors with savecrimereports.cmd --- I suspect that you will. This concept (of ensuring that the entire program is syntactically correct before running any of it) catches a lot of silly mistakes made by slip-shod programmers, that might, under different program flow conditions, cause much greater problems in debugging if they were found on-the-fly. It's one of the reasons why some people have complained that ORexx won't run their programs, when the true cause is their own poor attention to detail: the authors of Regina are to be applauded for incorporating this detection phase. --
"We have gone from a world of concentrated knowledge and wisdom to one of distributed ignorance. And we know and understand less while being incr- easingly capable." Prof. Peter Cochrane, BT Labs
|
Fri, 29 Aug 2003 18:42:13 GMT |
|
 |
Jason Stefanovic #5 / 17
|
 RexxUtil for Regina Rexx, part II (Or, tales of conversion to Rexx for Windows)
<snip> This concept (of ensuring that the entire program is syntactically Quote: > correct before running any of it) catches a lot of silly mistakes made by > slip-shod programmers, that might, under different program flow > conditions, cause much greater problems in debugging if they were found > on-the-fly. It's one of the reasons why some people have complained that > ORexx won't run their programs, when the true cause is their own poor > attention to detail: the authors of Regina are to be applauded for > incorporating this detection phase.
Everybody makes mistakes and it's often difficult to find these errors if you don't have the tools. That's the reason I use ORexx even when coding classic rexx. That doesn't mean that people are slipshod because they missed an error, it just means they're human.
|
Sat, 30 Aug 2003 22:50:09 GMT |
|
 |
John Wir #6 / 17
|
 RexxUtil for Regina Rexx, part II (Or, tales of conversion to Rexx for Windows)
Line 1532 is the last line of the program.
Quote:
> % Now to execute a 1500+ line program originally written in Rexx with RexxUtil > % for OS2 under Windows NT. > % > % The name of the program is savecrimereports.rexxx. (the OS2 program with > % the extension changed from .cmd to .rexx) Right out of the box, I get > % this: > % > % G:\CMD>savecrimereports.rexx g9tajb0.msg > % Error 14 running "G:\CMD\SaveCrimeReports.rexx", line 1532: Incomplete > % DO/SELECT/IF > % G:\CMD> > One difference between Regina and OS/2 Classic Rexx is that Regina performs a > full parse before executing, where Classic Rexx defers the parse. As I understand > it, Object Rexx has the same problem, and probably most others. Assuming there is > a syntax error at line 1532, how big the problem is depends on how many such > errors there are, and why they're there. If there's data being read using > sourceline, you could try putting it in a comment. > (if there isn't really a syntax error, then I guess you have a big problem ...) > -- > Patrick TJ McPhee > Knightsbridge SW7
|
Sun, 31 Aug 2003 09:54:24 GMT |
|
 |
John Wir #7 / 17
|
 RexxUtil for Regina Rexx, part II (Or, tales of conversion to Rexx for Windows)
Okay, Object Rexx here I come. Let you know how it turns out. Thanks Jason and BRian and Patrick.
Quote:
> <snip> > This concept (of ensuring that the entire program is syntactically > > correct before running any of it) catches a lot of silly mistakes made by > > slip-shod programmers, that might, under different program flow > > conditions, cause much greater problems in debugging if they were found > > on-the-fly. It's one of the reasons why some people have complained that > > ORexx won't run their programs, when the true cause is their own poor > > attention to detail: the authors of Regina are to be applauded for > > incorporating this detection phase. > Everybody makes mistakes and it's often difficult to find these errors if you > don't have the tools. That's the reason I use ORexx even when coding > classic rexx. That doesn't mean that people are slipshod because they missed > an error, it just means they're human.
|
Sun, 31 Aug 2003 09:53:41 GMT |
|
 |
Michael Luec #8 / 17
|
 RexxUtil for Regina Rexx, part II (Or, tales of conversion to Rexx for Windows)
Quote:
> Line 1532 is the last line of the program.
Sounds like you have a very seldom used branch on an if or select statement. I have configured Visual SlickEdit to have hot keys between the do/end and select/end pairs. Then I just hit the hot key to jump between them, and eventually I find the one short the end. I you've never seen Slick working with Rexx, come to the RexxLA Symposium and I'll have it in action! -- Michael Lueck Lueck Data Systems Remove the upper case letters NOSPAM to contact me directly.
|
Sun, 31 Aug 2003 10:08:58 GMT |
|
 |
John Wir #9 / 17
|
 RexxUtil for Regina Rexx, part II (Or, tales of conversion to Rexx for Windows)
Well I'd like to but LA is a long way from DC!
Quote:
> > Line 1532 is the last line of the program. > Sounds like you have a very seldom used branch on an if or select statement. > I have configured Visual SlickEdit to have hot keys between the do/end and > select/end pairs. Then I just hit the hot key to jump between them, and > eventually I find the one short the end. I you've never seen Slick working with > Rexx, come to the RexxLA Symposium and I'll have it in action! > -- > Michael Lueck > Lueck Data Systems > Remove the upper case letters NOSPAM to contact me directly.
|
Mon, 01 Sep 2003 09:31:08 GMT |
|
 |
l.. #10 / 17
|
 RexxUtil for Regina Rexx, part II (Or, tales of conversion to Rexx for Windows)
An if you traveled from LA to DC, you'd still be several hundred miles from the Symposium.. It's at RTP near Raleigh, NC. So far, we have registrants from at least 3 foreign countries, plus several of the Mid-West & Western states. Sure wish you could come. Every symposium I've attended has been good - this one is shaping up to be the best in a long time. Lee On Wed, 14 Mar 2001 20:31:08 -0500, "John Wirt" Quote:
>Well I'd like to but LA is a long way from DC!
>> > Line 1532 is the last line of the program. >> Sounds like you have a very seldom used branch on an if or select >statement. >> I have configured Visual SlickEdit to have hot keys between the do/end and >> select/end pairs. Then I just hit the hot key to jump between them, and >> eventually I find the one short the end. I you've never seen Slick working >with >> Rexx, come to the RexxLA Symposium and I'll have it in action! >> -- >> Michael Lueck >> Lueck Data Systems >> Remove the upper case letters NOSPAM to contact me directly.
|
Tue, 02 Sep 2003 03:11:25 GMT |
|
|
Page 1 of 2
|
[ 17 post ] |
|
Go to page:
[1]
[2] |
|