Page 1 of 1

How to get the table definition infomayion from command line

Posted: Thu Dec 16, 2010 9:45 am
by datisaq
I have saved the table definition in datastage and it got saved in the repository.

I want to list the column names present in the table definition from the command line. Is there any command which lists the field names of the table definition from the command line like dsjob ??

Please provide your inputs..

Posted: Thu Dec 16, 2010 3:38 pm
by ray.wurlod
Table defintiions in the local repository are stored in a hashed file, so you need a database query to retrieve them.

Code: Select all

SELECT DSRID FMT '32L',EVAL "@RECORD<12>" FMT '32L' COL.HDG 'Column Names' 
FROM DS_METADATA 
WHERE @ID NOT LIKE '\%' DBL.SPC;


From the command line you can execute this query from the dssh command provided you have first executed the dsenv script.