From: René J. <rvj...@xs...> - 2022-06-06 20:04:08
|
> On 6 Jun 2022, at 19:32, hp...@we... wrote: > > I don't like to be stuck, so I tried this and that in the hope to > find a way out. Result: few more questions -- and another hurdle > overcome. > > Am 04.06.2022 um 16:20 schrieb ((me, myself and I)): >> [...] >> >>> /* ooRexx */ >>> nrh = value("NETREXX_HOME", , "ENVIRONMENT") >>> ripe = '@java -cp "'nrh'\lib\NetRexxF.jar;%CLASSPATH%"', >>> 'org.netrexx.njpipes.pipes.runner' >>> fn = vilma.ini >>> ripe '"<' fn '|term"' >> Works. So the BAT file is obsolete for this project. > > Taking a closer look to this I was not sure if %CLASSPATH% is > resolved as it should. TRACE '?I' shows, it is not. In addition, > the a. m. procedure returns 'RC=13' (w/o quotes). So I correct: > >> /* ooRexx */ trace '?I' >> ripe = '@java -cp "', >> || value("NETREXX_HOME", , "ENVIRONMENT"), >> || '\lib\NetRexxF.jar;', >> || value("CLASSPATH", , "ENVIRONMENT"), >> || '"' 'org.netrexx.njpipes.pipes.runner' >> fn = vilma.ini >> ripe '"<' fn '|term"' > > Result: RC=13 > Eagerly searched 'Pipelines Guide and Reference' what RC=13 stands > for, alas... it's not referenced in this /Reference/. You have a good point and we looked at that earlier. It is a bit of work to round these up from the codebase. I noted it down. Glad you found the debug option. I am apt to put a trace in the code and build a new jar in these cases. > Question: how may I get the information, which stage caused the > trouble and if it's a problem of the specification parser while > scanning my teeny two-stage pipe or later while executing it? > Answer: Found option 'debug' in Chapter 17 'The Pipes Runner'. > With option 'debug 63' I get: > >> Starting pipe p6c85b5c p6c85b5c@34ab52cb >> Starting diskr_1 p6c85b5c@34ab52cb >> Preparing to stop diskr_1 p6c85b5c@34ab52cb 13 1 >> Autocommitting diskr_1 p6c85b5c@34ab52cb to -1 >> Starting term_2 p6c85b5c@34ab52cb >> Ending Pipe p6c85b5c p6c85b5c@34ab52cb 320 13 >> RC=13 >> Preparing to stop term_2 p6c85b5c@34ab52cb 0 2 >> Autocommitting term_2 p6c85b5c@34ab52cb to -1 > > I found in 'Pipelines Guide and Reference' neither an explanation > for the numeric argument of option debug nor something about the > message of this output. Taking the term "reference" in the title > as a promise I'm slightly disappointed. And rightly so. Another note made. > > At least I found my mistake: if I run this test in the subdir > where the file to read, VilMA.INI, is located -- then it works. > Yes, always safest to specify full paths and make sure where you are with relative paths > Next issue, a new one. Since I try to have NetRexx Pipelines in > coexistence with OS/2 Pipelines I'd like to be sure about which > one I run to avoid all interference (on my part). With the a. m. > correction of setting variable 'ripe' to respect also CLASSPATH I > see currently no problem to run a NetRexx pipe from ooRexx (while > 'run' does not include access to all possible sources and sinks > analogue CMS Pipelines). But for tests I'd like to use NRWS too. > > From within NRWS I have no access to RIPE.BAT (PIPE.BAT renamed) > located in subdir bin. Instead I have to use PIPE. So I have to be > very attentive: from the command line of a cmd window 'PIPE' > involves OS/2 Pipelines, while from NRWS it runs NetRexx Pipelines. > Question: is it possible to change that? Nrws has the )sys command to run an outside program/script - you might try that. Under macOS I cannot get a pipeline to run though ( I have those commands as aliases ) but your mileage may vary with Windows. The syntax is slightly different though - one of the things to clear up still. > > Next, PIPE within NRWS does not like options. From VM/CMS running > with codepage 273 I am used to use the exclamation point as stage > separator. So I did: > >> NWRS> pipe (sep !) < vilma.ini!term initial 4 >> 50 +++ _s_1 = (sep() >> +++ ^^^ >> +++ Error: The method 'sep()' cannot be found in class 'p38d9569' or a super >> class >> Throwable:java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 > > Pleas advice. > Nrws is to run pipes with no name and no options, quickly, for the moment. What needs to be done is: harmonise the pipes compiler from file (.njp) to the command line and the nrws version. These are small differences but a lot of work. > Next, it is said to be simple to develop DIY filters, according to > chapter 5 'Write your own Filters' in 'Pipelines Guide and > Reference'. So I made my first steps with an idea 'varload' could > look like in some future. No chance, a total fail: NetRexx > Pipelines refuses to run my filter. > > So I tested what is described in 'Pipelines Guide and Reference'. > Again an annoying pitfall, the first example on page 13 > >> pipe ”literal abcd | bagvendt | console” > > can not be transferred by edid-copy/edit-paste from Adobe Acrobat > to the cmd window since the double quotes are double byte chars. Fixed in 4.04. > Nonetheless, correcting this I get > >> 59 +++ _s_2 = bagvendt() >> +++ ^^^^^^^^ >> +++ Error: The method 'bagvendt()' cannot be found in class 'p78187b2' or a >> superclass >> Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 0, Size: >> 0 >> at java.util.ArrayList.rangeCheck(Unknown Source) >> at java.util.ArrayList.get(Unknown Source) >> at org.netrexx.process.NetRexxC.clgMain(NetRexxC.java:220) >> at org.netrexx.njpipes.pipes.compiler.compile(compiler.java:1260) >> at org.netrexx.njpipes.pipes.compiler.<init>(compiler.java:1357) >> at org.netrexx.njpipes.pipes.runner.executePipe(runner.java:143) >> at org.netrexx.njpipes.pipes.runner.main(runner.java:100) > > Same from NRWS but a less detailed error message. > > One phrase on p. 13 makes me nosy: "The resulting .class file > needs to be on the CLASSPATH environment variable." How may I > check this is done? Isn't the dot on CLASSPATH sufficient to > include also the current subdir? The resulting .class file -- was > it really prepared, and if yes where actually? Could it work if I > compile -- ah, no, /translate/ -- it first and run the result? It … well, in this case, translated twice (from ‘pipe' to netrexx, from netrexx to java, and then compiled by either javac or ecj).When you run with the runner, all files including the class file stay in memory; the compiled pipe needs to find your stage, and it can only do that if it is compiled to a .class file. > > Well, guess what -- it works. Reading again carefully 'Pipelines > Guide and Reference', chapter 5 'Write your own Filters', p. 13, I > begin to wonder about that phase "Because the source uses pipe > idioms, the regular NetREXX compiler cannot understand everything, > and we need to uses the pipes compiler pipc to compile this > source." Me, mainframe dinosaur I am, slowly start to grasp, this > was an advice or in fact an order to translate it in advance. I > hope there is no drawback when I used not PIPC but NRC as shown in > the postage-stamp-sized figure 10 on p. 14 (set zoom to 300% and > it is instantly visible). > Yes, as you found out, a stage can be compiled by the ’normal’ NetRexx compiler, as there are no pipes in it. > Enough for today... > M. > Excellent progress though, and again valuable pointers for improvement of the docs. Thank you. René. > > _______________________________________________ > netrexx-pipelines mailing list > net...@li... > https://lists.sourceforge.net/lists/listinfo/netrexx-pipelines |