Page 1 of 1
I need help to create a sequential file with metadata
Posted: Wed May 24, 2006 6:01 am
by abhishekmuradia
I need help in knowing how to create a sequential file that will contain the metadata definition of all the columns , like column name , data type , length [/b]
Posted: Wed May 24, 2006 6:59 am
by samba
Yes, in sequential file we have columns and also import metadata
Posted: Wed May 24, 2006 7:19 am
by ashwin141
Hi Abhisek
You can manually create the table definition, or load the imported table definition. Please be specific about what exactly you want to know, so that we can help.
Regards
Ashwin
Posted: Wed May 24, 2006 7:25 am
by kumar_s
Do you need to export the metadata into a Sequential file?
Posted: Wed May 24, 2006 10:22 pm
by abhishekmuradia
I need to know that like if i am giving the column name as item_id as an integer with the length of 20 and as a primary key , Then how can I display it into a sequential file like
column name length type key
Item_id 20 integer Yes
Posted: Wed May 24, 2006 10:43 pm
by ray.wurlod
There is nothing directly within DataStage for doing this. You can generate this information using the Reporting Assistant or "hacking" the repository (perhaps with a DataStage job). You would need to know what fields within DS_METADATA contain the information you require; this metadata is not in the public domain.
Years ago I posted here a job (job control routine) for dumping a table definition in one of a number of formats; perhaps you could search for it and adapt that code.
Re: I need help to create a sequential file with metadata
Posted: Thu May 25, 2006 11:33 am
by dhelsley
Go out to IBM and download the Universe documentation. This will help you learn to write a program in Universe Basic that will parse the data from the underlying Universe files. I'm an old Pick programmer so it was not too difficult for me.
Posted: Thu May 25, 2006 4:25 pm
by kduke
Greetings dhelsley. Old Pick programmers are always welcomed.
Ray's routine will extract the routines to XML. Why not export your routines as XML and hack that.
Some Hash Def to get you started ...
Posted: Thu Jun 08, 2006 6:50 am
by gauravb
Some Hash Def to get you started ...
DSArgumentMap
ProjectName
JobName
ContainerName
OutputFromStage
LinkName
RtnArgument
ArgumentMap
DSColumns
ProjectName
JobName
ContainerName
OutputFromStage
LinkOrTblDefnName
ColumnName
DataElementName
ColIsKey
ColSqlType
ColLength
ColScale
ColNullable
ColDisplaySize
Association
FieldPos
FieldType
IsGroupOn
AggSortPos
AggSortOrder
ColNLSMapName
ColNull
AllowCRLF
PadChar
PadNulls
DateMask
DependField
LevelNo
NativeType
Occurs
RedefinedField
SignIndicator
SignOption
SyncIndicator
Usage
DSDataElements
ProjectName
DataElementName
DECategory
DEShortDesc
DEBaseType
DESqlType
DEPrecision
DEScale
DENullable
DEDisplaySize
DEDateModified
DELastUpdated
DSJobParameters
ProjectName
JobName
ParamName
ParamPrompt
ParamType
ParamLength
ParamScale
Description
DSJobs
ProjectName
JobName
JobCategory
JobShortDesc
JobVersion
JobNLSMapName
TimeDate
Numeric
Currency
CType
Collate
JobDateModified
JobLastUpdated
CenturyBreakYear
CobolProgramName
CompileJCLName
DBMSSystemName
DBMSPassword
DBMSUserName
JobType
NextAliasID
ParameterFileDDName
ParameterFileName
PlatformType
ReservedWordCheck
RunJCLName
TransactionSize
CodeGenLocation
DSLinks
ProjectName
JobName
ContainerName
OutputFromStage
LinkName
InputToStage
LinkType
OutputFileSPName
InpTableFileSPName
EnforceSeqMetaData
UpdateAction
ClearFile
BackupFile
Normalize
TrxRejectRows
TrxRowLimit
PreLoad
ArraySize
LnkIsolation
TransactionSize
TXNBehaviour
Predicate
SQLStatement
TableName
PadChar
CountRecordsAffected
CountTransactions
DatabaseCategory
ConditionalExp
RoutineName
AggregateType
CreateFile
CreateOptions
EnableWriteCache
FTPTargetFileName
DSProjects
ProjectName
CharacterSet
ToolVersion
ServerName
NLSEnabled
PrjLastUpdated
DSTableDefinitions
ProjectName
TableDefnName
TDShortDesc
TDDataSourceName
TDDataSourceType
TDTableOrFileName
SupportsMVFields
NLSMapName
AllowColMapping
TDDateModified
TDLastUpdated
AccessType
ImportLocation
Owner
PlatformType
TDODBCQuoteChar
DSRoutines
ProjectName
RoutineName
RTNCategory
RTNShortDesc
RTNNumArgs
RTNType
RTNVendor
RTNAuthor
RTNVersion
RTNCopyright
RTNDateModified
RTNLastUpdated
RTNJobType
RTNLanguage
RTNLibraryPath
RTNPlatformType
RTNSkipOnNull
RTNExternalName
DSProperties
ProjectName
JobName
ContainerName
StageName
ObjOwnerName
ObjectName
ObjectType
LinkInpOutProp
PropName
LineNumber
PropValue
PropOrder
Posted: Thu Jun 08, 2006 3:44 pm
by ray.wurlod
How, precisely, do you think this will help?
It is not the structure of the Repository, it is the structure of only some of the tables in doc_tool.mdb and presupposes that the poster is using the Reporting Assistant, which has been deprecated since version 6.0. Nor have you show which of the columns are key columns, so the join paths are not obvious even if this approach were to be used - but, then, why would one not be creating custom reports directly within doc_tool.mdb in this case?