OPS/MVS

 View Only
  • 1.  RDF column names and column attirbutes.

    Posted Jan 18, 2022 09:28 AM
    Edited by Christian Gonzalez Jan 18, 2022 09:40 AM
    Is there a way to obtain the column names of an RDF table without knowing them? Also would like to know the attributes as well.

    I am trying to figure out the column names for the system table "table" that stores all the information of the RDF tables stored.


  • 2.  RE: RDF column names and column attirbutes.
    Best Answer

    Posted Jan 18, 2022 10:19 PM
    You can simply SQL SELECT from the COLUMN table as you do any other RDF table:

    address SQL
    "Select NAME TABLE_NAME from COLUMN WHERE TABLE_NAME NOT IN",
    "('TABLE','COLUMN')"
    do t = 1 to name.0
     say 'Column 'name.t' in Table 'table_name.t
    end

    Above will dump the columns and table names from the COLUMN table. You can add where clause (if know the table) as needed. DATA_TYPE can be dumped to, but you'll need to know how to interpret these values to determine the character type. I used to have this info, but no longer do. I'm sure support can supply the values if you really need this info. What are needing to do? The fact that you are asking for column attributes, I'm guessing you are trying to copy/create some table? If so use the supplied ASOTEAPI OPS/REXX pgm to do that. You can do all the same actions you do manually from the table editor. Think there is a section in documentation on using it. Also, some samples in the sample OPS/REXX libraries you can refer to...


  • 3.  RE: RDF column names and column attirbutes.

    Posted Jan 19, 2022 02:40 PM
    Edited by Christian Gonzalez Jan 19, 2022 02:40 PM
    Thanks I also didn't realize I was able to browse through the "table" and "column" table  from the RDF table editor.