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



I go the route of storing my library lists in a physical file, and based on
the application that gets ran I load the library list. Note that there are
many modules underneath  the main CGI program that get called, and I
wouldn't want to have to code the below for each one of them when ever they
needed to access a file.  I let the library list dictate which file they are
going to access (I guess this works good for me because I sometimes have the
same file in multiple libraries but with different data).

If you were looking for a reason there you go :-)

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

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.