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



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?


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.