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


  • Subject: RE: library list variables
  • From: "Richard Casey" <casey_r@xxxxxxxxxxxxxxxx>
  • Date: Wed, 2 May 2001 10:41:56 -0400
  • Importance: Normal

Brooks,

You're correct that CHGLIBL doesn't like a 250 *char variable. However, you
can do the same thing if you create the CHGLIBL command as a big *char
variable and call QCMDEXC. Here a little CL program that illustrates what
you can do.

   PGM
   DCL        VAR(&USRLIBL) TYPE(*CHAR) LEN(275)
   DCL        VAR(&CHGCMD)  TYPE(*CHAR) LEN(300)

/* Save current library list
   RTVJOBA    USRLIBL(&USRLIBL)

/* Do "whatever"

/* Restore original library list
   CHGVAR     VAR(&CHGCMD) VALUE('CHGLIBL LIBL(' *TCAT +
                &USRLIBL *TCAT ')')
   CALL       PGM(QCMDEXC) PARM(&CHGCMD 300)

   ENDPGM

This only affects the user portion of the library list. You could also
save/restore the user's current library as well.

Keep in mind that if the "whatever" section of the above CL program has
problems, you'll need to make sure that the "Restore" section still gets
executed. See the discussion on "Cleanup after program failure" for ideas.

Hope this helps!
Richard

-----Original Message-----
From: owner-midrange-l@midrange.com
[mailto:owner-midrange-l@midrange.com]On Behalf Of Brooks Roach
Sent: Wednesday, May 02, 2001 9:11 AM
To: MIDRANGE-L@midrange.com
Subject: library list variables


Anyone know of a way to save the current library list, change it for an
application and then restore the original list?  I've tried saving to a 250
*char variable and then using CHGLIBL after the application, but the command
doesn't understand the variable.

I think I've seen this done a few years ago in DCMS, a package written by
Kurt Salmon Associates in Atlanta, but I'm not certain now.

Thanks,
Brooks Roach


+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator:
david@midrange.com
+---


+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.