|
May I add another caveat or two?I've been through situations as described here. The library (say, LIBA) may or may not, as Darrell said, exist in the library list. If it does exist, it may occupy any position in the library list (1-n). After deleting and adding it, though, it is blatantly in position numero uno.
This may not be a good thing later on. If this is a batch job, it *probably* doesn't matter. However, if it is an interactive job, it *may* be perilous. If LIBA was already in the list (say, #7 on your hit parade), leaving it at #1 *could* skew later jobs.
The original library list needs to be saved and, after you're through with LIBA (as #1), restore the original library list so that things are back where everyone is expecting them. Another way to do this for an interactive job is to simply issue the SIGNOFF command at the end of the job (if you can wait that long) since a new log in will set up the library list as intended.
Thanks. * Jerry C. Adams *IBM System i Programmer/Analyst B&W Wholesale Distributors, Inc.* * voice 615.995.7024 fax 615.995.1201 email jerry@xxxxxxxxxxxxxxx <mailto:jerry@xxxxxxxxxxxxxxx> Darrell A Martin wrote:
Hi:This requires another step. First *remove* the "target" library from the job library list, MONMSG, *then* add it, in first position, MONMSG.This avoids the trap of the target library already existing in the job library list. If an add to first position is attempted for a library already in the list, CPF2103 is issued and the library remains in the original position. If that position is lower in the list than another library that contains a copy of the command or program, that incorrect copy will be executed.Darrell Darrell A. Martin - 754-2187 Manager, Computer Operations dmartin@xxxxxxxxxxxxxThe other way to do it to simply add the library to the top of the library list, with a MONMSG in case it is already there, before calling the command. Then it finds the copy in that library first.This e-mail, including attachments, may contain information that is confidential and/or proprietary, and may only be used by the person to whom this email is addressed. If the recipient of this e-mail is not the intended recipient or an authorized agent, the reader is hereby notified that any dissemination, distribution, or copying of this e-mail is prohibited. If this e-mail has been delivered to you in error, please notify the sender by replying to this message and deleting this e-mail immediately.
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.