ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Receive error "PASE for i already running in this job"

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Receive error "PASE for i already running in this job"

    We are receiving the following message when trying to call PHP - "PASE for i already running in this job."

    Earlier in the job we do use Java via Scott Kelment's JDBCR4 program. We use it to read data from a PostgreSQL database into RPG.

    Is there a way I can use Java and then turn around and call PHP without receiving this error? I saw one suggestion about using QSH. That's not how we typically call our PHP scripts and my users are accustomed to the QPRINT outputs that come along with QP2TERM.

    I am just trying to verify that QSH is my ONLY option here.

  • #2
    Once you start the Java Virtual Machine (JVM) in the job, it will remain loaded for the remainder of the job. Since all recent versions of the JVM run in the PASE environment, that means PASE will also remain loaded in the job.

    So your options are to either run the Java code in a different job, or to run the PHP application in a different job.

    This can also solve other problems... for example, the ILE STDIO on IBM i isn't threadsafe, so any time you run a multi-threaded PASE application, you really have to run it in a separate job and copy STDIO via pipes/sockets, or else it won't be threadsafe and you'll have all sorts of weird problems.

    QShell isn't the only solution. But, QShell makes this simple because it does all of the work for you of creating a background child job, connecting it with pipes, and forwarding the stdio over the pipes so your job can utilize it.

    You could, of course, use another tool that does these same functions. Or, even, write your own.

    I have one called UNIXCMD (link follows) that is designed to make it easy to integrate with RPG programs. If you have RPG talent available, you could write an RPG program that writes the stdout/stderr to QPRINT if you want.

    Comment

    Working...
    X