From: Marc R. <re...@gm...> - 2022-10-22 13:50:18
|
Hi Jeff, a NetRexx program returns the value specified by an 'exit' clause when run. The translator returns any of the following : EXIT_OK =int 0 -- Exit values EXIT_WARN =int 1 -- Exit values EXIT_ERROR =int 2 -- Exit values I've reproduced your issue, this 'RC=16' comes from the run method in specj. Above this method, there is the comment 'The run method of specs should never get called' Not being familiar with pipelines, I don't know why this method is not be called, nor why it is called when having a local class generated without package statement. To fix your issue and test your new specj stage, leave the package statement as is and rebuild the NetRexxC/F.jar ('ant' from netrexx-code directory) to have the specj class properly 'packaged' ; $ pipe 'literal one two three | specj word -2 1 | console' two Marc On 10/22/22 04:27, Jeff Hennick wrote: > [cross post with ne...@gr... previously] > > I am working on the NetRexx Pipelines *spec* stage, fixing a bug and adding functionality (FIELDS, etc.). > > But I am running into a NetRexx roadblock. > > I have checked out the source for the working stage, *spec.nrx*, and for testing modified it in only two ways: changed both the file name and the class name to *specj*. > > This I can compile using the *pipc* utility. But when I use this stage in a pipe, I get an error message that the class was found, but with the wrong full name. So I commented out the *package* statement (as I have done for testing many stages) and recompiled. > > Now running the pipe, it immediately returns with *RC=16*. I have added *trace results*, and nothing is executed before the RC=16. > > I can find no list or reference of NetRexx Standard Return Codes. Is there one? Knowing the history of NetRexx, I looked for Rexx Standard Return Codes. That says 16 is *Label not found*. Is that its meaning in NetRexx? Is there anyway of learning what label might have not been found? > > For the record, specj,and spec, uses the less straightforward stageExit method, where the stage processes the options then on the fly builds a new, simpler, sub-stage to read the records. I have successfully divided it into the two halves: the new options are processed and the sub-stage is created and instead of being immediately run it is put out. I can compile that and successfully use it in a pipe. I just can't get it to all work together. > > In adding FIELDS, I have enhanced the SEPARATOR for fields and words from CMS's single character to a full string. This will be useful for the character pairs CRLF, or COMMA+SPACE for examples. > > Thank you for any help you can give on this. > > Jeff Hennick > > > _._,_._,_ > > > _______________________________________________ > netrexx-pipelines mailing list > net...@li... > https://lists.sourceforge.net/lists/listinfo/netrexx-pipelines |