From: <hp...@we...> - 2022-06-06 17:39:26
|
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/. 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. 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. 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? 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. 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. 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? 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). Enough for today... M. |