× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



How do you feel about writing the whole thing in SPL?

CREATE PROCEDURE PROCESS_JOBS
LANGUAGE SQL MODIFIES SQL DATA
P1: BEGIN
DECLARE COMMAND CHAR(200); -- Ensure this is large enough.
DECLARE JOB_COUNT INT DEFAULT 0;

SELECT COUNT(*) into job_count
FROM TABLE(QSYS2.JOB_INFO(
JOB_SUBSYSTEM_FILTER => 'QHTTPSVR',
JOB_USER_FILTER => '*ALL',
JOB_STATUS_FILTER => '*ACTIVE',
JOB_TYPE_FILTER => '*BATCH'
)) J;
IF job_count>0
SET COMMAND = 'ENDTCPSVR SERVER(*HTTP) HTTPSVR(BRCWEBLIVE)';
CALL QSYS2.QCMDEXC(COMMAND);
WHILE job_count > 0 DO
SET COMMAND = 'DLYJOB DLY(80)';
CALL QSYS2.QCMDEXC(COMMAND);
SELECT COUNT(*) into job_count
FROM TABLE(QSYS2.JOB_INFO(
JOB_SUBSYSTEM_FILTER => 'QHTTPSVR',
JOB_USER_FILTER => '*ALL',
JOB_STATUS_FILTER => '*ACTIVE',
JOB_TYPE_FILTER => '*BATCH'
)) J;
END WHILE;
End if;
SET COMMAND = 'STRTCPSVR SERVER(*HTTP) HTTPSVR(BRCWEBLIVE)';
CALL QSYS2.QCMDEXC(COMMAND);
END P1
;

-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Nathan Andelin
Sent: Wednesday, February 13, 2019 2:40 PM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: ENDTCPSVR SERVER(*HTTP) HTTPSVR(BRCWEBLIVE) issue - instance jobs not ending

We tend to run each HTTP server instances in its own subsystem, and pair STRTCPSVR and ENDTCPSVR commands with corresponding STRSBS and ENDSBS commands.

On Wed, Feb 13, 2019 at 9:02 AM Steinmetz, Paul via MIDRANGE-L < midrange-l@xxxxxxxxxxxxxxxxxx> wrote:

I have an AJS scheduled job that recycles an HTTP instance once a week.
Runs every Monday morning, 3:30 AM.

Seq Command

10 ENDTCPSVR SERVER(*HTTP) HTTPSVR(BRCWEBLIVE)
20 DLYJOB DLY(80)
30 STRTCPSVR SERVER(*HTTP) HTTPSVR(BRCWEBLIVE)

Since we upgraded/migrated from P7-8205 to P9-9009, this process is
failing.
The ENDTCPSVR for the instance is not ending the instance jobs,
immediately.
Most are still running a minute later, so when the STRTCPSVR runs,
STRTCPWVR fails with a TCP7410.

Message . . . . : HTTP Server instance BRCWEBLIVE is already active.

Cause . . . . . : The server is trying to use an instance file that is
already in use.

What's interesting, following the STRTCPSVR, all the instance jobs
then do end immediately, all within one second.
IBM support thinks the STRTCPSVR is calling a background job that
forces the end of the instance jobs.
No proof of this as of yet.

Another variable to this is the length of time the instance jobs are
running.
When I tested the process with the instance running for 24 or 48
hours, everything works fine.

V7R3, latest cum, 2 months back on groups.
No errors found in any logs.
I have an open PMR with IBM.

Any thoughts from the group.

Thank You
_____
Paul Steinmetz
IBM i Systems Administrator

Pencor Services, Inc.
462 Delaware Ave
Palmerton Pa 18071

610-826-9117 work
610-826-9188 fax
610-349-0913 cell
610-377-6012 home

psteinmetz@xxxxxxxxxx
http://www.pencor.com/


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx To
subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link: https://amazon.midrange.com

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.