Hi All,
I'm in desperate need for a copy of NetRexx 1.02 (25 Jun 1997). Does any one have this? Thanks in advance -- --- Saludos / Kind regards. David Requena _______________________________________________ Ibm-netrexx mailing list [hidden email] |
I certainly have the runtime package of this date. Is that enough?
best regards, René. On 6 mei 2010, at 17:44, David Requena wrote:
_______________________________________________ Ibm-netrexx mailing list [hidden email] |
René,
Given the nature of the environment I'm putting together I think I might get away with just the runtime. Please, send it my way when you have a spare moment. Thanks! --- Saludos / Kind regards. David Requena El 06/05/2010 19:16, René Jansen escribió: I certainly have the runtime package of this date. Is that enough? _______________________________________________ Ibm-netrexx mailing list [hidden email] |
I know this is going to look like some idiot making a stab at coding in netrexx, and it indeed is. trace all options binary MyA=String[4] MyQ=String[4] line = Rexx line = 'This is the default value for this variable' infile=File('TandF.txt') instream=FileInputStream(infile) inhandle=BufferedReader(InputStreamReader(instream)) say 'Processing' infile'...' loop linenum = 0 by 1 line = Rexx inhandle.readLine -- get next line [as Rexx string] if line = null then leave linenum -- normal end of file parse line 'A).' MyA[linenum] 'Q).' MyQ[linenum] -- process the line say '# processing ended' end linenum if inhandle \= null then inhandle.close loop i = 0 to 3 say MyA[i] MyQ[i] end i exit NetRexx portable processor, version 2.05 Copyright (c) IBM Corporation, 2005. All rights reserved. Program LoadTab.nrx 14 +++ parse line 'A).' MyA[linenum] 'Q).' MyQ[linenum] -- process the line +++ ^^^^ +++ Error: Cannot convert value of type 'netrexx.lang.Rexx' for assignment to variable of type 'java.lang.String[]' 11 +++ loop linenum = 0 by 1 +++ ^^^^^^^ +++ Warning: Variable is set but not used Compilation of 'LoadTab.nrx' failed [one error, one warning] I've been thru lots of manuals but there seems to be a quantum leap from syntax and clause definitions to how this really works. Any help appreciated. Kenneth Klein Systems Specialist 502-868-3644 859-750-5179 (Cell) 502-868-2298 (Fax) [hidden email] _______________________________________________ Ibm-netrexx mailing list [hidden email] |
Don't define MyA as a string but as Rexx. _______________________________________________ Ibm-netrexx mailing list [hidden email] |
In reply to this post by kenner
Basically, NetRexx will not automatically convert a Rexx
string to the Java String type (perhaps it should, but that's a separate
question). Hence the message. The simplest fix is to
just delete the declarations; i.e., delete the lines:
MyA=String[4]
MyQ=String[4] line = Rexx That way MyA and MyQ will end up type
Rexx.
(I think -- haven't tried it.)
Mike
_______________________________________________ Ibm-netrexx mailing list [hidden email] |
In reply to this post by kenner
loop linenum = 0 to MyA.length-1 line = Rexx inhandle.readLine -- get next line [as Rexx string] if line = null then leave linenum -- normal end of file parse line 'A).' A 'Q).' Q -- process the line MyA[linenum]=A.toString MyQ[linenum]=Q.toString say '# processing ended' end linenum [hidden email] wrote:
_______________________________________________ Ibm-netrexx mailing list [hidden email] |
In reply to this post by kenner
Hi Kenneth,
as far as I do know the PARSE-statement does *NOT* support *subscriped variables as the targets of the Parse (which classic rexx dooes). The easieat way to overcome this restriction is to use temporary Variabloes in the parse statement and assign them to the target subscripted variables immmediately following the parse. In you case, I would suggest: parse line 'A).' $a 'Q).' $q MyA[linenum]=$a MyQ[linenum]=$q This should work. By the way, the classic Rexx converter (www.Rexx2Nrx.com) and my Rey Compiler do do this automatically for you. hope this helps to solve your issue in question. kind regards, Thomas Schneider. =============================================================================== Am 12.05.2010 15:49, schrieb [hidden email]
--
Thomas Schneider Projects ReyC & LOGOS on www.KENAI.com _______________________________________________ Ibm-netrexx mailing list [hidden email]
Tom. (ths@db-123.com)
|
Thanks, all. Very good tips. I have it working now. Next I want to work it into the Button.nrx sample and have the questions show up in the pop-ups title bar and show True and False for button options. Processing TandF.txt... # processing ended # processing ended # processing ended # processing ended T It is important to smell the aroma of a sample as soon as it is poured. F The head judge has the sole responsibility to fill out the slight summary sheets. F The competition organizer may not judge beers even if he has no knowledge of competitor's entries. T Wooden pencils and erasers should be avoided to prevent introducing off aromas in the judging area. trace all options binary MyA=Rexx[4] MyQ=rexx[4] infile=File('TandF.txt') instream=FileInputStream(infile) inhandle=BufferedReader(InputStreamReader(instream)) say 'Processing' infile'...' loop linenum = 0 by 1 line = Rexx inhandle.readLine -- get next line [as Rexx string] if line = null then leave linenum -- normal end of file parse line 'A).' $A 'Q).' $Q -- process the line MyA[linenum] = $A MyQ[linenum] = $Q say '# processing ended' end linenum if inhandle \= null then inhandle.close loop i = 0 to 3 say MyA[i] MyQ[i] end i exit Kenneth Klein Systems Specialist 502-868-3644 859-750-5179 (Cell) 502-868-2298 (Fax) [hidden email]
Hi Kenneth, as far as I do know the PARSE-statement does *NOT* support *subscriped variables as the targets of the Parse (which classic rexx dooes). The easieat way to overcome this restriction is to use temporary Variabloes in the parse statement and assign them to the target subscripted variables immmediately following the parse. In you case, I would suggest: parse line 'A).' $a 'Q).' $q MyA[linenum]=$a MyQ[linenum]=$q This should work. By the way, the classic Rexx converter (www.Rexx2Nrx.com) and my Rey Compiler do do this automatically for you. hope this helps to solve your issue in question. kind regards, Thomas Schneider. =============================================================================== Am 12.05.2010 15:49, schrieb kenneth.klein@...: I know this is going to look like some idiot making a stab at coding in netrexx, and it indeed is. trace all options binary MyA=String[4] MyQ=String[4] line = Rexx line = 'This is the default value for this variable' infile=File('TandF.txt') instream=FileInputStream(infile) inhandle=BufferedReader(InputStreamReader(instream)) say 'Processing' infile'...' loop linenum = 0 by 1 line = Rexx inhandle.readLine -- get next line [as Rexx string] if line = null then leave linenum -- normal end of file parse line 'A).' MyA[linenum] 'Q).' MyQ[linenum] -- process the line say '# processing ended' end linenum if inhandle \= null then inhandle.close loop i = 0 to 3 say MyA[i] MyQ[i] end i exit NetRexx portable processor, version 2.05 Copyright (c) IBM Corporation, 2005. All rights reserved. Program LoadTab.nrx 14 +++ parse line 'A).' MyA[linenum] 'Q).' MyQ[linenum] -- process the line +++ ^^^^ +++ Error: Cannot convert value of type 'netrexx.lang.Rexx' for assignment to variable of type 'java.lang.String[]' 11 +++ loop linenum = 0 by 1 +++ ^^^^^^^ +++ Warning: Variable is set but not used Compilation of 'LoadTab.nrx' failed [one error, one warning] I've been thru lots of manuals but there seems to be a quantum leap from syntax and clause definitions to how this really works. Any help appreciated. Kenneth Klein Systems Specialist 502-868-3644 859-750-5179 (Cell) 502-868-2298 (Fax) kenneth.klein@... _______________________________________________ Ibm-netrexx mailing list [hidden email] -- Thomas Schneider Projects ReyC & LOGOS on www.KENAI.com_______________________________________________ Ibm-netrexx mailing list [hidden email] _______________________________________________ Ibm-netrexx mailing list [hidden email] |
Some of the tips are not so good. For a target in a
parse you can put anything that is allowed on the left of the '=' in an
assignment, just as in classic Rexx, so foobar[i] is fine. And you
do not need the declarations (e.g., MyA=Rexx[4]) at the top. And you don't
need to use ugly names like '$A' in any NetRexx program (in fact, NetRexx has to
use $ in names to work with Java, so recommends you avoid that character in
symbol names; it is only allowed because some Java classes require that you use
names with $ in them).
Mike
_______________________________________________ Ibm-netrexx mailing list [hidden email] |
Thanks, Mike. I was just happy it worked. Now I want to make it elegant as well as understand what going on. Unfortunately trying to use the indexed variable is failing in the parse statement. NetRexx portable processor, version 2.05 Copyright (c) IBM Corporation, 2005. All rights reserved. Program LoadTab.nrx 11 +++ parse line 'A).' MyA[linenum] 'Q).' MyQ[linenum] -- process the line +++ ^ +++ Error: Unexpected token in parsing template 19 +++ say MyA[i] MyQ[i] +++ ^^^ +++ Error: Variable or type expected 8 +++ loop linenum = 0 by 1 +++ ^^^^^^^ +++ Warning: Variable is set but not used Compilation of 'LoadTab.nrx' failed [2 errors, one warning] Kenneth Klein Systems Specialist 502-868-3644 859-750-5179 (Cell) 502-868-2298 (Fax) [hidden email]
Some of the tips are not so good. For a target in a parse you can put anything that is allowed on the left of the '=' in an assignment, just as in classic Rexx, so foobar[i] is fine. And you do not need the declarations (e.g., MyA=Rexx[4]) at the top. And you don't need to use ugly names like '$A' in any NetRexx program (in fact, NetRexx has to use $ in names to work with Java, so recommends you avoid that character in symbol names; it is only allowed because some Java classes require that you use names with $ in them). Mike From: [hidden email] [mailto:[hidden email]] On Behalf Of [hidden email] Sent: 12 May 2010 18:43 To: [hidden email]; IBM Netrexx Subject: Re: [Ibm-netrexx] Struggling newbe Thanks, all. Very good tips. I have it working now. Next I want to work it into the Button.nrx sample and have the questions show up in the pop-ups title bar and show True and False for button options. Processing TandF.txt... # processing ended # processing ended # processing ended # processing ended T It is important to smell the aroma of a sample as soon as it is poured. F The head judge has the sole responsibility to fill out the slight summary sheets. F The competition organizer may not judge beers even if he has no knowledge of competitor's entries. T Wooden pencils and erasers should be avoided to prevent introducing off aromas in the judging area. trace all options binary MyA=Rexx[4] MyQ=rexx[4] infile=File('TandF.txt') instream=FileInputStream(infile) inhandle=BufferedReader(InputStreamReader(instream)) say 'Processing' infile'...' loop linenum = 0 by 1 line = Rexx inhandle.readLine -- get next line [as Rexx string] if line = null then leave linenum -- normal end of file parse line 'A).' $A 'Q).' $Q -- process the line MyA[linenum] = $A MyQ[linenum] = $Q say '# processing ended' end linenum if inhandle \= null then inhandle.close loop i = 0 to 3 say MyA[i] MyQ[i] end i exit Kenneth Klein Systems Specialist 502-868-3644 859-750-5179 (Cell) 502-868-2298 (Fax) [hidden email]
Hi Kenneth, as far as I do know the PARSE-statement does *NOT* support *subscriped variables as the targets of the Parse (which classic rexx dooes). The easieat way to overcome this restriction is to use temporary Variabloes in the parse statement and assign them to the target subscripted variables immmediately following the parse. In you case, I would suggest: parse line 'A).' $a 'Q).' $q MyA[linenum]=$a MyQ[linenum]=$q This should work. By the way, the classic Rexx converter (www.Rexx2Nrx.com) and my Rey Compiler do do this automatically for you. hope this helps to solve your issue in question. kind regards, Thomas Schneider. =============================================================================== Am 12.05.2010 15:49, schrieb kenneth.klein@...: I know this is going to look like some idiot making a stab at coding in netrexx, and it indeed is. trace all options binary MyA=String[4] MyQ=String[4] line = Rexx line = 'This is the default value for this variable' infile=File('TandF.txt') instream=FileInputStream(infile) inhandle=BufferedReader(InputStreamReader(instream)) say 'Processing' infile'...' loop linenum = 0 by 1 line = Rexx inhandle.readLine -- get next line [as Rexx string] if line = null then leave linenum -- normal end of file parse line 'A).' MyA[linenum] 'Q).' MyQ[linenum] -- process the line say '# processing ended' end linenum if inhandle \= null then inhandle.close loop i = 0 to 3 say MyA[i] MyQ[i] end i exit NetRexx portable processor, version 2.05 Copyright (c) IBM Corporation, 2005. All rights reserved. Program LoadTab.nrx 14 +++ parse line 'A).' MyA[linenum] 'Q).' MyQ[linenum] -- process the line +++ ^^^^ +++ Error: Cannot convert value of type 'netrexx.lang.Rexx' for assignment to variable of type 'java.lang.String[]' 11 +++ loop linenum = 0 by 1 +++ ^^^^^^^ +++ Warning: Variable is set but not used Compilation of 'LoadTab.nrx' failed [one error, one warning] I've been thru lots of manuals but there seems to be a quantum leap from syntax and clause definitions to how this really works. Any help appreciated. Kenneth Klein Systems Specialist 502-868-3644 859-750-5179 (Cell) 502-868-2298 (Fax) kenneth.klein@... _______________________________________________ Ibm-netrexx mailing list [hidden email] -- Thomas Schneider Projects ReyC & LOGOS on www.KENAI.com_______________________________________________ Ibm-netrexx mailing list [hidden email] _______________________________________________ Ibm-netrexx mailing list [hidden email] _______________________________________________ Ibm-netrexx mailing list [hidden email] |
Ah yes, I should have read my own book -- sorry.
Just a symbol allowed as a name of a variable in parse. I think that
was probably to keep parse clauses reasonably clean to look at [but maybe
a possible area of extension!].
So perhaps something like:
parse line 'A).' answer 'Q).' question -- process
the line
myq[linenum]=question
mya[linenum]=answer
etc ...
Mike
_______________________________________________ Ibm-netrexx mailing list [hidden email] |
On Wed, May 12, 2010 at 3:55 PM, Mike Cowlishaw <[hidden email]> wrote:
An extension that was already added to ooRexx. Definitely a feature that resulted in cleaner, easier to use code rather than the reverse. Rick
_______________________________________________ Ibm-netrexx mailing list [hidden email] |
In reply to this post by Mike Cowlishaw
OK. I have it working now. I did have to declare the types of MyA and MyQ. Without that I got errors about it not being defined. I have the "Creating java aps using Netrexx", the redbook from 9/97 and the NetRexxD documentation package with Mike's users guide from August 2000 and Language definition from 1997. Is there anything more current. There are a few other presentations out there but mostly pretty old. Does Netrexx run under OMVS? I see that Java works in this shop under OMVS (z/os 1.10). I'm looking for an example close to combining my LoadTab.nrx with a GUI interface that would prompt with the question and accept a button click on True or False. Output: Processing TandF.txt... 0 A). T Q). It is important to smell the aroma of a sample as soon as it is poured. 1 A). F Q). The head judge has the sole responsibility to fill out the slight summary sheets. 2 A). F Q). The competition organizer may not judge beers even if he has no knowledge of competitor's entries. 3 A). T Q). Wooden pencils and erasers should be avoided to prevent introducing off aromas in the judging area. 4 # processing ended T It is important to smell the aroma of a sample as soon as it is poured. F The head judge has the sole responsibility to fill out the slight summary sheets. F The competition organizer may not judge beers even if he has no knowledge of competitor's entries. T Wooden pencils and erasers should be avoided to prevent introducing off aromas in the judging area. Source: trace all options binary MyA = rexx[4] MyQ = rexx[4] infile=File('TandF.txt') instream=FileInputStream(infile) inhandle=BufferedReader(InputStreamReader(instream)) say 'Processing' infile'...' loop thisline = 0 by 1 say thisline lineread = Rexx inhandle.readLine -- get next line [as Rexx string] say lineread if lineread = null then leave thisline -- normal end of file parse lineread 'A).' answer 'Q).' question -- process the line MyA[thisline] = answer MyQ[thisline] = question end thisline say '# processing ended' if inhandle \= null then inhandle.close loop i = 0 to 3 say MyA[i] MyQ[i] end i exit Kenneth Klein Systems Specialist 502-868-3644 859-750-5179 (Cell) 502-868-2298 (Fax) [hidden email]
Ah yes, I should have read my own book -- sorry. Just a symbol allowed as a name of a variable in parse. I think that was probably to keep parse clauses reasonably clean to look at [but maybe a possible area of extension!]. So perhaps something like: parse line 'A).' answer 'Q).' question -- process the line myq[linenum]=question mya[linenum]=answer etc ... Mike From: [hidden email] [mailto:[hidden email]] On Behalf Of [hidden email] Sent: 12 May 2010 20:15 To: IBM Netrexx Subject: RE: [Ibm-netrexx] Struggling newbe Thanks, Mike. I was just happy it worked. Now I want to make it elegant as well as understand what going on. Unfortunately trying to use the indexed variable is failing in the parse statement. NetRexx portable processor, version 2.05 Copyright (c) IBM Corporation, 2005. All rights reserved. Program LoadTab.nrx 11 +++ parse line 'A).' MyA[linenum] 'Q).' MyQ[linenum] -- process the line +++ ^ +++ Error: Unexpected token in parsing template 19 +++ say MyA[i] MyQ[i] +++ ^^^ +++ Error: Variable or type expected 8 +++ loop linenum = 0 by 1 +++ ^^^^^^^ +++ Warning: Variable is set but not used Compilation of 'LoadTab.nrx' failed [2 errors, one warning] Kenneth Klein Systems Specialist 502-868-3644 859-750-5179 (Cell) 502-868-2298 (Fax) [hidden email]
Some of the tips are not so good. For a target in a parse you can put anything that is allowed on the left of the '=' in an assignment, just as in classic Rexx, so foobar[i] is fine. And you do not need the declarations (e.g., MyA=Rexx[4]) at the top. And you don't need to use ugly names like '$A' in any NetRexx program (in fact, NetRexx has to use $ in names to work with Java, so recommends you avoid that character in symbol names; it is only allowed because some Java classes require that you use names with $ in them). Mike From: [hidden email] [mailto:[hidden email]] On Behalf Of [hidden email] Sent: 12 May 2010 18:43 To: [hidden email]; IBM Netrexx Subject: Re: [Ibm-netrexx] Struggling newbe Thanks, all. Very good tips. I have it working now. Next I want to work it into the Button.nrx sample and have the questions show up in the pop-ups title bar and show True and False for button options. Processing TandF.txt... # processing ended # processing ended # processing ended # processing ended T It is important to smell the aroma of a sample as soon as it is poured. F The head judge has the sole responsibility to fill out the slight summary sheets. F The competition organizer may not judge beers even if he has no knowledge of competitor's entries. T Wooden pencils and erasers should be avoided to prevent introducing off aromas in the judging area. trace all options binary MyA=Rexx[4] MyQ=rexx[4] infile=File('TandF.txt') instream=FileInputStream(infile) inhandle=BufferedReader(InputStreamReader(instream)) say 'Processing' infile'...' loop linenum = 0 by 1 line = Rexx inhandle.readLine -- get next line [as Rexx string] if line = null then leave linenum -- normal end of file parse line 'A).' $A 'Q).' $Q -- process the line MyA[linenum] = $A MyQ[linenum] = $Q say '# processing ended' end linenum if inhandle \= null then inhandle.close loop i = 0 to 3 say MyA[i] MyQ[i] end i exit Kenneth Klein Systems Specialist 502-868-3644 859-750-5179 (Cell) 502-868-2298 (Fax) [hidden email]
Hi Kenneth, as far as I do know the PARSE-statement does *NOT* support *subscriped variables as the targets of the Parse (which classic rexx dooes). The easieat way to overcome this restriction is to use temporary Variabloes in the parse statement and assign them to the target subscripted variables immmediately following the parse. In you case, I would suggest: parse line 'A).' $a 'Q).' $q MyA[linenum]=$a MyQ[linenum]=$q This should work. By the way, the classic Rexx converter (www.Rexx2Nrx.com) and my Rey Compiler do do this automatically for you. hope this helps to solve your issue in question. kind regards, Thomas Schneider. =============================================================================== Am 12.05.2010 15:49, schrieb kenneth.klein@...: I know this is going to look like some idiot making a stab at coding in netrexx, and it indeed is. trace all options binary MyA=String[4] MyQ=String[4] line = Rexx line = 'This is the default value for this variable' infile=File('TandF.txt') instream=FileInputStream(infile) inhandle=BufferedReader(InputStreamReader(instream)) say 'Processing' infile'...' loop linenum = 0 by 1 line = Rexx inhandle.readLine -- get next line [as Rexx string] if line = null then leave linenum -- normal end of file parse line 'A).' MyA[linenum] 'Q).' MyQ[linenum] -- process the line say '# processing ended' end linenum if inhandle \= null then inhandle.close loop i = 0 to 3 say MyA[i] MyQ[i] end i exit NetRexx portable processor, version 2.05 Copyright (c) IBM Corporation, 2005. All rights reserved. Program LoadTab.nrx 14 +++ parse line 'A).' MyA[linenum] 'Q).' MyQ[linenum] -- process the line +++ ^^^^ +++ Error: Cannot convert value of type 'netrexx.lang.Rexx' for assignment to variable of type 'java.lang.String[]' 11 +++ loop linenum = 0 by 1 +++ ^^^^^^^ +++ Warning: Variable is set but not used Compilation of 'LoadTab.nrx' failed [one error, one warning] I've been thru lots of manuals but there seems to be a quantum leap from syntax and clause definitions to how this really works. Any help appreciated. Kenneth Klein Systems Specialist 502-868-3644 859-750-5179 (Cell) 502-868-2298 (Fax) kenneth.klein@... _______________________________________________ Ibm-netrexx mailing list [hidden email] -- Thomas Schneider Projects ReyC & LOGOS on www.KENAI.com_______________________________________________ Ibm-netrexx mailing list [hidden email] _______________________________________________ Ibm-netrexx mailing list [hidden email] _______________________________________________ Ibm-netrexx mailing list [hidden email] _______________________________________________ Ibm-netrexx mailing list [hidden email] |
In reply to this post by Mike Cowlishaw
Just found the NexRexx 2 pdf from May 2009. Kenneth Klein Systems Specialist 502-868-3644 859-750-5179 (Cell) 502-868-2298 (Fax) [hidden email] _______________________________________________ Ibm-netrexx mailing list [hidden email] |
In reply to this post by kenner
as far as I do know: NetRexx *runs* on *all platforms having *java installed*. The major advantage (for me, for instance) is, that I only have to COMPILE the *source NetRexx Module* (for instance on my *ancient Windows XP machines*, execute my *tailor made* (in German: *MaßGeSchneiderTes*) BUILD, building the *delivery JAR-file*, and then ..... EveryBody, from an ANDROID Handy User (I do have an Austrian RedBullMobile Handy, produced by HUAWAI, which is *identical to the upcoming *Google Phone* up to a IBM zOS user) .... .... can use those (already compiled) Java Classes, when all class-Path enhancements are correct. I'm currently building up a Java Install utility for ReyC (The Rey Compiler). It does work like InstallShield, but: (again big advantage) will work on *all platforms*. Sincerely, yours: Thomas Schneider (Massa Tom) from Vienna, Austria. PS: Please join Project 'ReyC' and 'LOGOS' there on www.Kenai.com when interested.... Tom. =================================================================================== Am 13.05.2010 15:09, schrieb [hidden email]
--
Thomas Schneider Projects ReyC & LOGOS on www.KENAI.com _______________________________________________ Ibm-netrexx mailing list [hidden email]
Tom. (ths@db-123.com)
|
In reply to this post by kenner
Kenneth, yes NetRexx runs under OMVS, but….in order to
have a GUI you need Websphere or something similar. If you’d like I can privately email you some good
documents, like Rene’s presentation on Parse. I also have an example Netrexx servlet in case you decide to go
the Websphere route. From:
[hidden email]
[mailto:[hidden email]] On Behalf Of [hidden email]
From: [hidden email]
[mailto:[hidden email]] On Behalf Of [hidden email]
From:
[hidden email]
[mailto:[hidden email]] On Behalf Of [hidden email]
_______________________________________________ Ibm-netrexx mailing list [hidden email] |
Thanks MM, I'd gladly take a look at any documentation you might have. Not sure if this shop has Websphere up and running. I know there are some web pages getting served, but I'm not clear yet on how they have that set up. Can I compile netrexx .nrx files into .class files on omvs?? Do I need another package for that? Kenneth Klein Systems Specialist 502-868-3644 859-750-5179 (Cell) 502-868-2298 (Fax) [hidden email]
Kenneth, yes NetRexx runs under OMVS, but….in order to have a GUI you need Websphere or something similar. If you’d like I can privately email you some good documents, like Rene’s presentation on Parse. I also have an example Netrexx servlet in case you decide to go the Websphere route. From: [hidden email] [mailto:[hidden email]] On Behalf Of [hidden email] Sent: Thursday, May 13, 2010 8:10 AM To: IBM Netrexx Subject: RE: [Ibm-netrexx] Struggling newbe OK. I have it working now. I did have to declare the types of MyA and MyQ. Without that I got errors about it not being defined. I have the "Creating java aps using Netrexx", the redbook from 9/97 and the NetRexxD documentation package with Mike's users guide from August 2000 and Language definition from 1997. Is there anything more current. There are a few other presentations out there but mostly pretty old. Does Netrexx run under OMVS? I see that Java works in this shop under OMVS (z/os 1.10). I'm looking for an example close to combining my LoadTab.nrx with a GUI interface that would prompt with the question and accept a button click on True or False. Output: Processing TandF.txt... 0 A). T Q). It is important to smell the aroma of a sample as soon as it is poured. 1 A). F Q). The head judge has the sole responsibility to fill out the slight summary sheets. 2 A). F Q). The competition organizer may not judge beers even if he has no knowledge of competitor's entries. 3 A). T Q). Wooden pencils and erasers should be avoided to prevent introducing off aromas in the judging area. 4 # processing ended T It is important to smell the aroma of a sample as soon as it is poured. F The head judge has the sole responsibility to fill out the slight summary sheets. F The competition organizer may not judge beers even if he has no knowledge of competitor's entries. T Wooden pencils and erasers should be avoided to prevent introducing off aromas in the judging area. Source: trace all options binary MyA = rexx[4] MyQ = rexx[4] infile=File('TandF.txt') instream=FileInputStream(infile) inhandle=BufferedReader(InputStreamReader(instream)) say 'Processing' infile'...' loop thisline = 0 by 1 say thisline lineread = Rexx inhandle.readLine -- get next line [as Rexx string] say lineread if lineread = null then leave thisline -- normal end of file parse lineread 'A).' answer 'Q).' question -- process the line MyA[thisline] = answer MyQ[thisline] = question end thisline say '# processing ended' if inhandle \= null then inhandle.close loop i = 0 to 3 say MyA[i] MyQ[i] end i exit Kenneth Klein Systems Specialist 502-868-3644 859-750-5179 (Cell) 502-868-2298 (Fax) [hidden email]
Ah yes, I should have read my own book -- sorry. Just a symbol allowed as a name of a variable in parse. I think that was probably to keep parse clauses reasonably clean to look at [but maybe a possible area of extension!]. So perhaps something like: parse line 'A).' answer 'Q).' question -- process the line myq[linenum]=question mya[linenum]=answer etc ... Mike From: [hidden email] [mailto:[hidden email]] On Behalf Of [hidden email] Sent: 12 May 2010 20:15 To: IBM Netrexx Subject: RE: [Ibm-netrexx] Struggling newbe Thanks, Mike. I was just happy it worked. Now I want to make it elegant as well as understand what going on. Unfortunately trying to use the indexed variable is failing in the parse statement. NetRexx portable processor, version 2.05 Copyright (c) IBM Corporation, 2005. All rights reserved. Program LoadTab.nrx 11 +++ parse line 'A).' MyA[linenum] 'Q).' MyQ[linenum] -- process the line +++ ^ +++ Error: Unexpected token in parsing template 19 +++ say MyA[i] MyQ[i] +++ ^^^ +++ Error: Variable or type expected 8 +++ loop linenum = 0 by 1 +++ ^^^^^^^ +++ Warning: Variable is set but not used Compilation of 'LoadTab.nrx' failed [2 errors, one warning] Kenneth Klein Systems Specialist 502-868-3644 859-750-5179 (Cell) 502-868-2298 (Fax) [hidden email]
Some of the tips are not so good. For a target in a parse you can put anything that is allowed on the left of the '=' in an assignment, just as in classic Rexx, so foobar[i] is fine. And you do not need the declarations (e.g., MyA=Rexx[4]) at the top. And you don't need to use ugly names like '$A' in any NetRexx program (in fact, NetRexx has to use $ in names to work with Java, so recommends you avoid that character in symbol names; it is only allowed because some Java classes require that you use names with $ in them). Mike From: [hidden email] [mailto:[hidden email]] On Behalf Of [hidden email] Sent: 12 May 2010 18:43 To: [hidden email]; IBM Netrexx Subject: Re: [Ibm-netrexx] Struggling newbe Thanks, all. Very good tips. I have it working now. Next I want to work it into the Button.nrx sample and have the questions show up in the pop-ups title bar and show True and False for button options. Processing TandF.txt... # processing ended # processing ended # processing ended # processing ended T It is important to smell the aroma of a sample as soon as it is poured. F The head judge has the sole responsibility to fill out the slight summary sheets. F The competition organizer may not judge beers even if he has no knowledge of competitor's entries. T Wooden pencils and erasers should be avoided to prevent introducing off aromas in the judging area. trace all options binary MyA=Rexx[4] MyQ=rexx[4] infile=File('TandF.txt') instream=FileInputStream(infile) inhandle=BufferedReader(InputStreamReader(instream)) say 'Processing' infile'...' loop linenum = 0 by 1 line = Rexx inhandle.readLine -- get next line [as Rexx string] if line = null then leave linenum -- normal end of file parse line 'A).' $A 'Q).' $Q -- process the line MyA[linenum] = $A MyQ[linenum] = $Q say '# processing ended' end linenum if inhandle \= null then inhandle.close loop i = 0 to 3 say MyA[i] MyQ[i] end i exit Kenneth Klein Systems Specialist 502-868-3644 859-750-5179 (Cell) 502-868-2298 (Fax) [hidden email]
Hi Kenneth, as far as I do know the PARSE-statement does *NOT* support *subscriped variables as the targets of the Parse (which classic rexx dooes). The easieat way to overcome this restriction is to use temporary Variabloes in the parse statement and assign them to the target subscripted variables immmediately following the parse. In you case, I would suggest: parse line 'A).' $a 'Q).' $q MyA[linenum]=$a MyQ[linenum]=$q This should work. By the way, the classic Rexx converter (www.Rexx2Nrx.com) and my Rey Compiler do do this automatically for you. hope this helps to solve your issue in question. kind regards, Thomas Schneider. =============================================================================== Am 12.05.2010 15:49, schrieb kenneth.klein@...: I know this is going to look like some idiot making a stab at coding in netrexx, and it indeed is. trace all options binary MyA=String[4] MyQ=String[4] line = Rexx line = 'This is the default value for this variable' infile=File('TandF.txt') instream=FileInputStream(infile) inhandle=BufferedReader(InputStreamReader(instream)) say 'Processing' infile'...' loop linenum = 0 by 1 line = Rexx inhandle.readLine -- get next line [as Rexx string] if line = null then leave linenum -- normal end of file parse line 'A).' MyA[linenum] 'Q).' MyQ[linenum] -- process the line say '# processing ended' end linenum if inhandle \= null then inhandle.close loop i = 0 to 3 say MyA[i] MyQ[i] end i exit NetRexx portable processor, version 2.05 Copyright (c) IBM Corporation, 2005. All rights reserved. Program LoadTab.nrx 14 +++ parse line 'A).' MyA[linenum] 'Q).' MyQ[linenum] -- process the line +++ ^^^^ +++ Error: Cannot convert value of type 'netrexx.lang.Rexx' for assignment to variable of type 'java.lang.String[]' 11 +++ loop linenum = 0 by 1 +++ ^^^^^^^ +++ Warning: Variable is set but not used Compilation of 'LoadTab.nrx' failed [one error, one warning] I've been thru lots of manuals but there seems to be a quantum leap from syntax and clause definitions to how this really works. Any help appreciated. Kenneth Klein Systems Specialist 502-868-3644 859-750-5179 (Cell) 502-868-2298 (Fax) kenneth.klein@... _______________________________________________ Ibm-netrexx mailing list [hidden email] -- Thomas Schneider Projects ReyC & LOGOS on www.KENAI.com_______________________________________________ Ibm-netrexx mailing list [hidden email] _______________________________________________ Ibm-netrexx mailing list [hidden email] _______________________________________________ Ibm-netrexx mailing list [hidden email] _______________________________________________ Ibm-netrexx mailing list [hidden email] _______________________________________________ Ibm-netrexx mailing list [hidden email] |
First; an appeal to everyone on the list: please use some netiquette on this list. Stop "top-posting" (and yes, this is a "top-post") and trim messages to contain only the relevant part of the post you're replying to. This particular thread is quickly approaching megabyte size. Soon my mail engine will begin rejecting the message. (I feel for anyone receiving the list in digest mode.)
On 13 May 2010 09:57, <[hidden email]> wrote: -- how they have that set up. Second; The NetRexx compiler works just fine in z/OS. The best way to drive it though is from a terminal emulator like pUTTY rather than from TSO. Alan. Needs more cow-bell! _______________________________________________ Ibm-netrexx mailing list [hidden email]
Alan
-- Needs more cowbell. |
Alan,
I've never seen top-posting or bottom posting covered as a rule in any netiquette list. I have seen groups express one of the other as desired in their particular list. I know that many people have strong feelings one way or the other. I myself prefer top posting, as I believe I can get through my mail faster. It keeps me from having to scroll to the bottom of every message to find out what was said. Trim, a must. Also when you change the subject, change the subject line. Bruce On May 13, 2010, at 10:27 AM, Alan Sampson wrote: > First; an appeal to everyone on the list: please use some netiquette > on this list. Stop "top-posting" (and yes, this is a "top-post") > and trim messages to contain only the relevant part of the post > you're replying to. This particular thread is quickly approaching > megabyte size. Soon my mail engine will begin rejecting the > message. (I feel for anyone receiving the list in digest mode.) _______________________________________________ Ibm-netrexx mailing list [hidden email] |
Free forum by Nabble | Edit this page |