On Wed, Jul 10, 2013 at 6:30 AM, John McKown <[email protected]>wrote:
> I am trying to look at how to use the PCRE from Ze'ev Atlas in a REXX > program in a "REXXish" way. PCRE is written in C and is basically > implemented as a bunch of subroutines. Being in C means this requires LE. I > could just write my code to be LE compliant and then invoke it from REXX > via a LINKPGM, or similar, method. I could pass the results back by having > my routine use IRXEXCOM to create specific REXX variables which could then > be used in the rest of the script. Yes, there are better ways, but I'm just > thinking out loud right now. > > I was also looking at using CEEPIPI somehow to establish an LE environment > which would last across calls to my PCRE functions. I have been reading the > books. But I can't find the answer to my first question. Which is: "If I > call an HLASM routine which: (1) is not LE compliant; (2) uses CEEPIPI > function "init_sub" to set up LE environment for calling subroutines; (3) > returns to REXX. Will the LE environment stay around? If it does, could it > cause problems with REXX or even TSO itself? Could it cause problems if the > user were to invoke an LE enabled main routine (written in C, COBOL, ...) > via a TSO CALL or ADDRESS LINK type invocation? If the user does invoke an > LE program, will that affect the CEEPIPI set up environment (as in > terminate it)? Instead of "init_sub", should I use "init_sub_dp"? It seems > to have some advantages, but is more restrictive. Mainly it seems to be a > way to avoid the possible "problems" of leaving an LE environment active. > CEEPIPI init sub creates an LE environment and returns a token to the same. The token is passed to the ceepipi call sub function along with other parms. The LE environment represented by the token is usable on that tcb until destroyed by using ceepipi term function. init sub dp allows you to create multiple LE independent environments under the same tcb. verify your need before using this. best performance in calling the subroutine is to use is to use call sub addr. This called the subroutine by address instead of name. if you are going rexx->pipi->subroutine in high volume, call sub addr is worthwhile. If you are going rexx->pipi->subroutine just once or twice then call sub is fine. init sub dp has other characteristics that are useful in a multi-tcb environment. > > Also, I am not totally sold on having an LE environment "hang around". I do > know that it saves on start up and shut down time. But I don't know if it > is worth the effort because I don't really have a handle on how many PCRE > invocations are going to be done in a single execution of a REXX program. > > -- > This is a test of the Emergency Broadcast System. If this had been an > actual emergency, do you really think we'd stick around to tell you? > > Maranatha! <>< > John McKown > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to [email protected] with the message: INFO IBM-MAIN > ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
