-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Itoolkit's iPgm - Library setup #45
Comments
@ThePrez |
What if you ran CHGLIBL prior to calling your program? What version of |
@abmusse Library List of submitted Job (Node Jobs) is having the library list properly. but it internally submitting another PRESTART job with QUSER QSQSRVR QUSER 267369 PJ ACTIVE This prestart job's library list is taken from Prestart JobD (QDFTSVR/QGPL ) which I can't change because the same prestart job might be using for different purpose. |
One more question here,, If we do not specify library Name in iPGM options, from which library list it tries to find the program.? Is it from current library list.? |
Yes it should try to use your library list first. Below is an example changing your library list using const { iConn, iCmd, xmlToJson } = require('itoolkit');
const conn = new iConn('*LOCAL', process.env.USER, process.env.PASSWORD);
conn.add(iCmd("RTVJOBA USRLIBL(?) SYSLIBL(?)"));
conn.add(iCmd("CHGLIBL LIBL(QXMLSERV)"));
conn.add(iCmd("RTVJOBA USRLIBL(?) SYSLIBL(?)"));
conn.run((xmlOut) => {
const output = xmlToJson(xmlOut);
for (let command of output) {
console.log(command);
}
}); Output: {
type: 'cmd',
success: true,
cmd: 'RTVJOBA USRLIBL(?) SYSLIBL(?)',
data: [
{
name: 'USRLIBL',
value: 'QGPL QTEMP QDEVELOP QBLDSYS QBLDSYSR'
},
{
name: 'SYSLIBL',
value: 'QSYS QSYS2 QHLPSYS QUSRSYS'
}
]
}
{ type: 'cmd', success: true, cmd: 'CHGLIBL LIBL(QXMLSERV)' }
{
type: 'cmd',
success: true,
cmd: 'RTVJOBA USRLIBL(?) SYSLIBL(?)',
data: [
{ name: 'USRLIBL', value: 'QXMLSERV' },
{
name: 'SYSLIBL',
value: 'QSYS QSYS2 QHLPSYS QUSRSYS'
}
]
} |
@abmusse Thanks for your answer. |
Why do you need to retrieve it? Just set it exactly how you want it. |
@kadler I would like to use Library list from a JOBD, so to get the library list, I need to retrieve the library list from a particular JOBD and set it. |
Ok, gotcha. |
You may also be able to specify the I believe this will result in the XMLService jobs being submitted to batch under the given *JOBD. Of course, there will be more overhead associated with submitting those batch jobs, but you can mitigate some of that with prestarted jobs and/or using the ipc parameter. |
Hi @ThePrez var conn = new xt.iConn("*LOCAL","USER01","XXXXX",ctl:'*sbmjob(QGPL/NEWUIJOBD/NODE_JB)',ipc:'/tmp/pdeepak/'}); I see it is submitting a job with NODE_JB with specified JOBD (NEWUIJOBD) but still library list for the job is User's JOBD library list. |
I found this old doc on library list in XMLSERVICE: http://yips.idevcloud.com/wiki/index.php/XMLService/XMLSERVICELibl It generates the SBMJOB command like this: Lines 1410 to 1445 in 491b0d3
There is a way to alter it, but it's a compile-time option: xmlservice/src/plugconf_h.rpgle Lines 139 to 148 in 9b9fa7d
|
This sounds like a reasonable enhancement request to be routed to XMLService team for consideration. According to this comment: xmlservice/src/plugconf_h.rpgle Line 137 in 9b9fa7d
Version 1.7.3 predates git control, so tracing history with certainty is impossible. However, I strongly suspect the "Alan" is @alanseiden. I will reach out to him to see if he remembers the reasoning behind that change (besides some obvious ones). |
@ThePrez With the PHP toolkit, most users did not hand-craft a *SBMJOB string. To do so was rare, perhaps not even possible at first, and definitely more obscure than with the Node toolkit instantiation code I see discussed here. Users typically accepted the defaults (the Zend JOBD) and expected their user profile's library list to hold sway. They complained when their user profile's library list seemed to have no effect. |
@alanseiden |
Listed some examples below.. if none is the case, can I get detailed explanation on the usage to get clear about what xmlservice expected to do?
Just a command to write as you wish.. describe your libl in the command
|
FWIW I always control my library list with the ODBC connection string DBQ parameter and don't try to have a JOBD manage it. It appears that the *SBMJOB inherits it in my quick and dirty testing. |
iToolkit's iPgm is taking Library List from User's JOBD library list.
Any way to give the library list in run time.?
I tried submitting the job with a JOBD which has a set of libraries but no use. When I console the result after run( ). I see below XML.
\n \n XML Toolkit 1.9.9\n \n 1100016\n \n \n \n \n 10000 05\n \n \n \n \n 1100016\n \n \n \n \n *NA\n FFFFFFFF\n< jobname>QSQSRVR \n QUSER\n 266967\n *ACTIVE\n USER01\n 37\n 37\n 819\n ENU\n US\n QSYSWRK\n QSYS\n \n QSYS QSYS2 QHLPSYS QUSRSYS\n QTEMP LIBRARY1 LIBRARY2\n see log scan, not error list \n \n \nundefinedThe text was updated successfully, but these errors were encountered: