|
On 10 Feb 2017, at 23:52, Henrik Rützou <hr@xxxxxxxxxxxx> wrote:
Arrh I was setting it for the job but submittet the QSH job afterwards
It works if I set it at *SYS but that may be a bad idea
On Sat, Feb 11, 2017 at 12:40 AM, Kevin Turner <kevin.turner@xxxxxxxxxxxxxx>
wrote:
.....but it works for me in QSH too once I set the environment variable.
Are you sure you are setting the environment variable for the job that is
running the node app?
-----Original Message-----
From: WEB400 [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Kevin
Turner
Sent: 10 February 2017 23:37
To: Web Enabling the IBM i (AS/400 and iSeries) <web400@xxxxxxxxxxxx>
Subject: Re: [WEB400] SQL7908 error when trying to acces DB2 from node
Yes I can replicate that in QSH.
Works fine in a QP2TERM session
-----Original Message-----
From: WEB400 [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Henrik
Rützou
Sent: 10 February 2017 23:31
To: Web Enabling the IBM i (AS/400 and iSeries) <web400@xxxxxxxxxxxx>
Subject: Re: [WEB400] SQL7908 error when trying to acces DB2 from node
But it is not the node.js job that fails even though it cause it fail but
it is the SQL job that fails first.
On Sat, Feb 11, 2017 at 12:28 AM, Henrik Rützou <hr@xxxxxxxxxxxx> wrote:wrote:
I already have QIBM_MULTI_THREADED 'Y'
On Sat, Feb 11, 2017 at 12:25 AM, Kevin Turner <
kevin.turner@xxxxxxxxxxxxxx> wrote:
Actually the latter might not work - you probably have to set the
environment variable before initiating QSH
You will also only ever be able to achieve 1021 connections unless
you increase the pool size - i.e
POOLSIZE=65000 node blah.js
-----Original Message-----
From: Kevin Turner
Sent: 10 February 2017 23:24
To: Web Enabling the IBM i (AS/400 and iSeries) <web400@xxxxxxxxxxxx>
Subject: RE: [WEB400] SQL7908 error when trying to acces DB2 from
node
Do this before running in QSH
ADDENVVAR ENVVAR(QIBM_MULTI_THREADED) VALUE('Y') REPLACE(*YES)
Or run your app like this
QIBM_MULTI_THREADED=Y node blah.js
-----Original Message-----
From: WEB400 [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Henrik
Rützou
Sent: 10 February 2017 23:16
To: Web Enabling the IBM i (AS/400 and iSeries) <web400@xxxxxxxxxxxx>
Subject: Re: [WEB400] SQL7908 error when trying to acces DB2 from
node
I also gets this error when i start (submit) node.js under SQH but
dosn't seems to matter:
node[547]: pthread_create: Resource temporarily unavailable
On Sat, Feb 11, 2017 at 12:13 AM, Henrik Rützou <hr@xxxxxxxxxxxx>
mode
it's node version 6.9.1PGM
On Sat, Feb 11, 2017 at 12:11 AM, Kevin Turner <
kevin.turner@xxxxxxxxxxxxxx> wrote:
What node version?
[https://www.netcracker.com/assets/img/netcracker-social-final.png
] ƕ -----Original Message-----
From: WEB400 [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of
Henrik Rützou
Sent: 10 February 2017 23:03
To: Web Enabling the AS400 / iSeries <web400@xxxxxxxxxxxx>
Subject: [WEB400] SQL7908 error when trying to acces DB2 from node
Hi, I'm getting the following error when trying to run the above
code in node.js
SEV DATE TIME FROM PGM LIBRARY INST TO
QSQCLILIBRARY
00 10-02-17 23:40:46,758703 QSQROUTS QSYS *STMT
QSYS
From module . . . . . . . . : QSQSRVRC
From procedure . . . . . . : SQSERVER
Statement . . . . . . . . . : 8224
To module . . . . . . . . . : SQLCON
To procedure . . . . . . . : SQLConnect
Statement . . . . . . . . . : 13395
Message . . . . : Job 005884/QUSER/QSQSRVR used for SQL server
thethe
processing.
Årsag . . . . . : A Structured Query Language (SQL) statement
was executed
while running in SQL server mode. SQL statements for this
connection or
thread will be processed in job 005884/QUSER/QSQSRVR. Teknisk
beskrivelse .
. . . . . . . : SQL server mode was requested by either setting
SQL
server mode job attribute, or by setting the server mode
environment
attribute via the SQL Call Level Interface. When running in
this mode, SQL
statements are processed by a separate job, which runs under the
user
profile specified for the connection. The thread identifier is 2
and the
connection is to Relational Database C602082A. If the
Relational Database
name is *N, this means that all connections for the thread will
use the same
job.
The node.js server i started by a submittet job and tries to run
this
code:
// Input from DB2
var db =
require('/QOpenSys/QIBM/ProdData/OPS/Node6/os400/db2i/lib/
db2a');
var sql = "SELECT STATE,LSTNAM FROM QIWS.QCUSTCDT";
var dbconn = new db.dbconn(); // Create a connection object.
dbconn.conn("*LOCAL"); // Connect to a database.
var stmt = new db.dbstmt(dbconn); // Create a statement object of
web400.connection.
stmt.exec(sql, function(result) {
console.log("Result: %s", JSON.stringify(result)); var fieldNum =
stmt.numFields(); console.log("There are %d fields in each row.",
fieldNum); console.log("Name | Length | Type | Precise | Scale |
Null"); for(var i = 0; i < fieldNum; i++) { console.log("%s | %d |
%d
| %d | %d | %d", stmt.fieldName(i), stmt.fieldWidth(i),
stmt.fieldType(i), stmt.fieldPrecise(i), stmt.fieldScale(i),
stmt.fieldNullable(i)); };
delete stmt; // Clean up the statement object.
dbconn.disconn(); // Disconnect from the database.
delete dbconn; // Clean up the connection object.
});
Any guess?
--
Regards,
Henrik Rützou
http://powerEXT.com <http://powerext.com/>
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400)
mailing list To post a message email: WEB400@xxxxxxxxxxxx To
subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx Before posting, please take
a moment to review the archives at http://archive.midrange.com/
from any computer.
________________________________
The information transmitted herein is intended only for the person
or entity to which it is addressed and may contain confidential,
proprietary and/or privileged material. Any review,
retransmission, dissemination or other use of, or taking of any
action in reliance upon, this information by persons or entities
other than the intended recipient is prohibited. If you received
this in error, please contact the sender and delete the material
web400.--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400)
mailing list To post a message email: WEB400@xxxxxxxxxxxx To
subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx Before posting, please take
a moment to review the archives at http://archive.midrange.com/
--
Regards,
Henrik Rützou
http://powerEXT.com <http://powerext.com/>
--
Regards,
Henrik Rützou
http://powerEXT.com <http://powerext.com/>
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400)
mailing list To post a message email: WEB400@xxxxxxxxxxxx To
subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at http://archive.midrange.com/web400.
________________________________
The information transmitted herein is intended only for the person or
entity to which it is addressed and may contain confidential,
proprietary and/or privileged material. Any review, retransmission,
dissemination or other use of, or taking of any action in reliance
upon, this information by persons or entities other than the intended
recipient is prohibited. If you received this in error, please
contact the sender and delete the material from any computer.
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400)
mailing list To post a message email: WEB400@xxxxxxxxxxxx To
subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at http://archive.midrange.com/web400.
--
Regards,
Henrik Rützou
http://powerEXT.com <http://powerext.com/>
--
Regards,
Henrik Rützou
http://powerEXT.com <http://powerext.com/>
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
list To post a message email: WEB400@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/web400.
________________________________
The information transmitted herein is intended only for the person or
entity to which it is addressed and may contain confidential, proprietary
and/or privileged material. Any review, retransmission, dissemination or
other use of, or taking of any action in reliance upon, this information by
persons or entities other than the intended recipient is prohibited. If you
received this in error, please contact the sender and delete the material
from any computer.
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
list To post a message email: WEB400@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/web400.
________________________________
The information transmitted herein is intended only for the person or
entity to which it is addressed and may contain confidential, proprietary
and/or privileged material. Any review, retransmission, dissemination or
other use of, or taking of any action in reliance upon, this information by
persons or entities other than the intended recipient is prohibited. If you
received this in error, please contact the sender and delete the material
from any computer.
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.
--
Regards,
Henrik Rützou
http://powerEXT.com <http://powerext.com/>
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.
As an Amazon Associate we earn from qualifying purchases.
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.