ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

File System Name for Member List

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • File System Name for Member List

    Hello everybody

    how is called the system file or I can find the name of the members of a source file of a given library ?

    Thanks You

  • #2
    Re: File System Name for Member List

    Hi Jackd:

    To get a list of all of your files within a library key in on a command line:
    Code:
                                                          
     DSPFD FILE(MYLIB/*ALL) TYPE(*BASATR) OUTPUT(*OUTFILE) FILEATR(*PF) OU
    LE(QTEMP/JUNKO)
    There is now a file in library qtemp with a file description for each file in your library. The file name is JUNKO.

    Select the field ATFTYP containing 'S' that will give you a list of source files in your library.

    For each source file found key on a command line:
    Code:
                                                             
     DSPFD FILE(mylib/mysource) TYPE(*MBRLIST) OUTPUT(*OUTFILE) OUTFILE(QTEMP/JUNKO2) [COLOR="Blue"]OUTMBR(*FIRST *ADD) [/COLOR]
    When the first source file completes run the second, third etc.

    When all source files have been listed you will have a file called junko2 in qtemp containing the names of all your source code members.

    By the way you can output to a printer as well

    Best of Luck
    GLS
    The problem with quotes on the internet is that it is hard to verify their authenticity.....Abraham Lincoln

    Comment


    • #3
      Re: File System Name for Member List

      ok thanks GLS400, but i have a problem, there is lot of library on my system.
      how then I to know if a library belongs to the word généric *ALLUSR ?
      Thanks for your response

      Comment


      • #4
        Re: File System Name for Member List

        *allusr libs are those created by you....the most common practice is to not
        prefix your created libraries with the letter "Q" as IBM does.
        so it may be safe in your situation to:

        if %subst(mylib:1:1) <> 'Q';

        endif;
        All my answers were extracted from the "Big Dummy's Guide to the As400"
        and I take no responsibility for any of them.

        www.code400.com

        Comment


        • #5
          Re: File System Name for Member List

          thanks you very much Jamief

          Comment


          • #6
            Re: File System Name for Member List

            Hi Jackd:

            This code will show you all the "user" libraries on your system:
            Code:
            DSPOBJD OBJ[COLOR="Red"](*ALLUSR)[/COLOR] OBJTYPE(*LIB) OUTPUT(*OUTFILE) OUTFILE(QTEMP/JUNK)
            So now at the end of all of this you should have junk, junko, and junko2 files in your qtemp.

            Sounds like a lot of junk to me......


            Best of luck
            GLS
            The problem with quotes on the internet is that it is hard to verify their authenticity.....Abraham Lincoln

            Comment


            • #7
              Re: File System Name for Member List

              And is there a systeme file in QSYS who have the library of my liblist ? because i have
              lot of Products in my system et and i have
              SELECT count(*) FROM QADBXREF WHERE DBXTYP='S'
              and substr(dbxlib , 1 , 1)<> 'Q' = 1340 SRCFILE !!!

              Comment


              • #8
                Re: File System Name for Member List

                Select * from QSYS2.SYSTABLES
                "Time passes, but sometimes it beats the <crap> out of you as it goes."

                Comment


                • #9
                  Re: File System Name for Member List

                  I have written a tool that finds source members by name it is here


                  jamie
                  All my answers were extracted from the "Big Dummy's Guide to the As400"
                  and I take no responsibility for any of them.

                  www.code400.com

                  Comment

                  Working...
                  X