Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

Retrieving DDS field descriptions in RPG

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

  • Retrieving DDS field descriptions in RPG

    How about querying file QADBIFLD or one of its logicals ?

  • #2
    Retrieving DDS field descriptions in RPG

    There is. In fact, I wrote an article about this for Midrange Computing several years ago. I no longer have that article, but you can get the article and the working code/utility in the book:

    AS/400 Desktop Encyclopedia of Tips, Techniques and Programming Practices - http://www.mc-store.com/5027.html

    which you can get right on this website.

    This utility will retrieve the entire DDS for you and place it into the source member/file of your choice. Very handy for when you've lost DDS Source or you never had it in the first place.

    Comment


    • #3
      Retrieving DDS field descriptions in RPG

      Open two sessions, if use Client Access, then copy & paste as needed. Of course you'll have to make the required changes.

      Comment


      • #4
        Retrieving DDS field descriptions in RPG

        You can use the API QUSLFLD to retrieve all of a files field descriptions into a user space and then use QUSRTVUS to retrieve each of the fields details one by one from the user space until you reach the field you're interested in.

        Comment


        • #5
          Retrieving DDS field descriptions in RPG

          Here is an idea, use embeddes sql to do a select into a variable from Qys2/systable or syscoloumn files. It should be very do able. Malik

          Comment


          • #6
            Retrieving DDS field descriptions in RPG

            The attached file contains sources and setup instructions for utility programs which display windows showing 1. A physical file's dependent logicals, 2. A file's field descriptions. When in SEU, positioning the cursor on the F-spec and pressing F7 shows the database relations window, F8 shows the Field Descriptions window. If a logical is passed to the DBR program the based on physical is used. Entries in the windows can be selected to display a window containing 1. The key fields or 2. The select/omit definitions. Very handy when looking for an alternative logical. Both the DBR and FFD windows can also be called from a command line, passing the file name as a parameter. See Setup.txt for implementation instructions. Best regards, Stuart

            dbr.zip

            Comment


            • #7
              Retrieving DDS field descriptions in RPG

              Thanks for your help everyone I'm all set now.

              Comment


              • #8
                Retrieving DDS field descriptions in RPG

                Is there a way to retrieve the DDS field description (COLHDG or TEXT) value from a file that is defined on a F-spec in RPG? I have a program that I am writing where I would like to get the value of the TEXT paramter for the fields in a DDS file that I am using. Any feedback would be greatlty appreciated.

                Comment


                • #9
                  Retrieving DDS field descriptions in RPG

                  Here is another way to do it.. before you call your rpg program... have a cl run a query like the one below to create a file the query will actually read the member in your library spits it out in a pf. You can then simply read the PF with a RPG program or cl and find out what is the Colhdg. RUNQRY QRYFILE((mylib/qddssrc member)) mylib lets say QGPL member say file1 QDDSSRC is your source file for all your files.(just in case you are hazzy on this part) Happy programming.. Malik t_malik@bellsouth.net

                  Comment

                  Working...
                  X