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



You are correct. It is just we use addlible as we run some CL and ovrdbf
to mbrs as well inside a CGI that also exist on the same lib. So for use
to run:

Addlible X
Open
Chain
Call CL1 parm(A B C)
Ovrdbf (x) (y) mbr(date0305)
write
Close 
Rmvlible x

Works for us better as we use some things back from CL call to submit
jobs to batch to run reports and email reports.
If that works for you it is just the same.  We just got in the habit of
having a subroutine that does the add and the rmv and we just call it as
needed. 


 

-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx]
On Behalf Of web400@xxxxxxxxxxxxxxxx
Sent: Tuesday, April 12, 2005 3:12 PM
To: Web Enabling the AS400 / iSeries
Subject: RE: [WEB400] Library List question...

Hi again,

> It can be passed as a  parm, gotten from a file, data area anything.
> Does not have to be hard coded.

Okay. You're suggesting doing the following, right?

      FCUSTMAS   IF   E           K DISK    USROPN

      D QCMDEXC         PR                  ExtPgm('QCMDEXC')
      D   command                  32702A   const options(*varsize)
      D   length                      15P 5 const
      D   igc                          3A   const options(*nopass)

      D cmd             s             30A   varying

      c     *Entry        plist
      c                   parm                    Library          10

      c                   eval      cmd = 'ADDLIBLE ' + Library
      c                   callp     QCMDEXC(cmd: %len(cmd))

      c                   open      CUSTMAS

      c                   eval      cmd = 'RMVLIBLE ' + Library
      c                   callp     QCMDEXC(cmd: %len(cmd))


My question is, why would you do that?  The following code works just as
well. It gives you all of the same advantages (and disadvantages) as
your library list solution, but is simpler code, performs better, and
doesn't need to muck with the library list at all?


      FCUSTMAS   IF   E           K DISK    USROPN
      F                                     EXTFILE(FileName)

      D FileName        s             21A

      c     *Entry        plist
      c                   parm                    Library          10

      c                   eval      FileName = %trimr(Library) +
'/CUSTMAS'
      c                   open      CUSTMAS

I'm trying to understand what the advantage of using a library list is?
If the program has to be aware of the library (regardless of whether it
gets this info from a constant in the program or whether it reads it
from a file, data area, parameter, etc) then why not just specify the
libraries explictly when opening the file?  What good is the library
list?

-- 
This is the Web Enabling the AS400 / 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 thread ...

Follow-Ups:

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.