× 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.



That’s just an example. My use case calls for completely replacing the library list, run the application and then if interactive, put it back.

Jim Oberholtzer
Agile Technology Architects



On Aug 30, 2021, at 4:39 PM, Don Brown via MIDRANGE-L <midrange-l@xxxxxxxxxxxxxxxxxx> wrote:

Just my 2 pennies but;

That seems like a lot of work for either a simple CL or RPG solution.

CL

PGM
RMVLIBLE TOYSTORE
MONMSG CPF2104 // Library not in library list

ADDLIBLE TOYSTORE

ENDPGM



RPG

...
cmd = ' RMVLIBLE TOYSTORE';
monitor;
qcmdexec(cmd : len(cmd));
endmon;

cmd = ' ADDLIBLE TOYSTORE';
qcmdexec(cmd : len(cmd));
...

Cheers

Don






From: <midrangel@xxxxxxxxxxxxxxxxx>
To: "'Midrange Systems Technical Discussion'"
<midrange-l@xxxxxxxxxxxxxxxxxx>
Date: 31/08/2021 12:54 AM
Subject: RE: Finding QUSRJOBI information on IBM's web site.
Sent by: "MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxxxxxxxx>



I was just looking at an example Simon Hutchinson put on his website
(rpgpgm.com) using SQL.

The problem (if it really is one) is that putting SQL into RPG is a new
level of complexity that, well for those of us that have not kept up, is
somewhat daunting. The actual EXEC statements not hard, but proper error
handling is. I lost my RPG card long ago (Jon and Susan rather
non-ceremonially removed it, with valid reason I might add), and only now
really starting to use it again.

This example is as close as I can get, the work management items you cite
do
not report the library list:

-- category: IBM i Services
-- description: Librarian - Library list

--
-- Description: Ensure that the TOYSTORE library is the first library
-- in the user portion of the library list
BEGIN
DECLARE V_ROW_NUM INTEGER;
WITH CTE1(SCHEMA_NAME, ROW_NUM) AS (
SELECT SCHEMA_NAME, ROW_NUMBER() OVER (ORDER BY ORDINAL_POSITION) AS
ROW_NUM
FROM QSYS2.LIBRARY_LIST_INFO WHERE TYPE = 'USER'
) SELECT ROW_NUM INTO V_ROW_NUM FROM CTE1 WHERE SCHEMA_NAME = 'TOYSTORE';

IF (V_ROW_NUM IS NULL) THEN
CALL QSYS2.QCMDEXC('ADDLIBLE TOYSTORE');
ELSEIF (V_ROW_NUM > 1) THEN
BEGIN
CALL QSYS2.QCMDEXC('RMVLIBLE TOYSTORE');
CALL QSYS2.QCMDEXC('ADDLIBLE TOYSTORE');
END;
END IF;
END;

Now to code this into an RPG program with valid error handling. That will
be somewhat more challenging.



--
Jim Oberholtzer
Agile Technology Architects

-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Rob
Berendt
Sent: Monday, August 30, 2021 9:34 AM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: RE: Finding QUSRJOBI information on IBM's web site.

If you start out here:
https://www.ibm.com/docs/en/i/7.4
And enter QUSRJOBI in the box with "Search in IBM i 7.4" you should get
exactly to what you want.

Now for my Rob moment...
IBM's hiding of "IBM i Services" under "Performance and Query
Optimization"
may have been a good idea at some time in the past, but really?
And why not use one of these instead of QUSRJOBI?
https://www.ibm.com/docs/en/i/7.4?topic=services-work-management


Rob Berendt
--
IBM Certified System Administrator - IBM i 6.1 Group Dekko Dept 1600 Mail
to: 7310 Innovation Blvd, Suite 104
Ft. Wayne, IN 46818
Ship to: 7310 Innovation Blvd, Dock 9C
Ft. Wayne, IN 46818
http://www.dekko.com


-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of
midrangel@xxxxxxxxxxxxxxxxx
Sent: Monday, August 30, 2021 10:26 AM
To: 'Midrange Systems Technical Discussion'
<midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: Finding QUSRJOBI information on IBM's web site.

CAUTION: This email originated from outside of the organization. Do not
click links or open attachments unless you recognize the sender and know
the
content is safe.


It's there no doubt, but how come IBM has to give it to me in every
language
except US English? My browser does not hide the fact that I am in the
Midwest in the US, (not all that far from Rochester MN.) so it's not like
they don't know where I am. IBMs web sites are a mess, most links don't
work, they don't fix them when you point that out, and the search in them
is
worse than ever. Makes me long for the PC based software library. It was
awful and not updated very often, but it worked. Particularly for an API
that's been around since almost before API's...



Anyone else having similar issues?

--

Jim Oberholtzer

Agile Technology Architects



--
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@xxxxxxxxxxxxxxxxxxxx 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@xxxxxxxxxxxxxxxxxxxx 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@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.

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




--
This email has been scanned for computer viruses. Although MSD has taken reasonable precautions to ensure no viruses are present in this email, MSD cannot accept responsibility for any loss or damage arising from the use of this email or attachments..
--
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@xxxxxxxxxxxxxxxxxxxx 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.