I need help to create a sequential file with metadata

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
abhishekmuradia
Participant
Posts: 6
Joined: Tue May 23, 2006 10:25 pm
Location: Bangalore

I need help to create a sequential file with metadata

Post 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]
samba
Premium Member
Premium Member
Posts: 62
Joined: Wed Dec 07, 2005 11:44 am

Post by samba »

Yes, in sequential file we have columns and also import metadata
samba
ashwin141
Participant
Posts: 95
Joined: Wed Aug 24, 2005 2:26 am
Location: London, UK

Post 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
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Do you need to export the metadata into a Sequential file?
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
abhishekmuradia
Participant
Posts: 6
Joined: Tue May 23, 2006 10:25 pm
Location: Bangalore

Post 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
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
dhelsley
Participant
Posts: 9
Joined: Thu Jan 05, 2006 9:23 am

Re: I need help to create a sequential file with metadata

Post 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.
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post 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.
Mamu Kim
gauravb
Participant
Posts: 14
Joined: Tue Nov 30, 2004 7:25 am
Location: India
Contact:

Some Hash Def to get you started ...

Post by gauravb »

Some Hash Def to get you started ... 8)

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
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply