ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Count of fields from physical file using Query..

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Count of fields from physical file using Query..

    How to retrive the no.of fields/columns from physical file using the DB2/400 quey

  • #2
    Re: Count of fields from physical file using Query..

    DSPFFD on the file to an outfile then use QRY/400 on that file. or use a real tool to do the job...
    I'm not anti-social, I just don't like people -Tommy Holden

    Comment


    • #3
      Re: Count of fields from physical file using Query..

      Hi,

      you may access the catalog view SYSCOLUMNS (which also can be used with Query/400)

      Code:
      Select Count(*) from syscolumns
      Where System_Table_Name = 'MYFILE' and System_Table_Schema = 'MYLIB'
      Birgitta

      Comment


      • #4
        Re: Count of fields from physical file using Query..

        Originally posted by B.Hauser View Post
        Hi,

        you may access the catalog view SYSCOLUMNS (which also can be used with Query/400)

        Code:
        Select Count(*) from syscolumns
        Where System_Table_Name = 'MYFILE' and System_Table_Schema = 'MYLIB'
        Birgitta

        Thank You....

        Comment

        Working...
        X