How to import cobol copybooks metadeta

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
Shree0410
Participant
Posts: 70
Joined: Tue Nov 29, 2005 7:25 pm

How to import cobol copybooks metadeta

Post by Shree0410 »

Hi guys,

I worked with Server jobs before with source files coming out of SAP BW and also extracted files from mainframe using ftp.

Now, I am on a new assignment to use the cobol copybook's structure.
Can anyone tell me how to import the cobol copybooks metadata(column structure) on to the datastage??
If the number of columns are less, i can easily type the column structure, but I have copybooks that are more than 100 columns.

thanks for the time.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

In the manager you can do Import -> Table Definitions -> Cobol File Definitions.
Shree0410
Participant
Posts: 70
Joined: Tue Nov 29, 2005 7:25 pm

Post by Shree0410 »

Thanks ArndW, but sorry that I forgot to mention that I have tried Import -> Table Definitions -> Cobol File Definitions, but in the copybooks, there are comments for every version release/change and also the mainframe user-id's in the 72 to 80 columns numbers to identify who did the change to the copybook. how do we eliminate all this unwanted stuff when we import the metadata?
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Columns 72-80 are considered comments in Cobol (historically you had line numbers there). If column 7 has a * then the line is also considered a comment and is ignored.
Shree0410
Participant
Posts: 70
Joined: Tue Nov 29, 2005 7:25 pm

Post by Shree0410 »

Thanks ArndW.

So, if any change happens to the copybooks on the mainframe, does that mean the metadata has to be reimported from Manager.

Is there a way this can be automated, like read the copybook as a sequential file and create the metadata, so even if there is a change to the copybook, the DS jon should be able to take care of the change?
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

You can either re-import the copybook (recommended) or manually make the changes in the manager to the definitions when your metadata changes.

Unfortunately there is no automated import mechanism for metadata along the lines you are talking about.
Shree0410
Participant
Posts: 70
Joined: Tue Nov 29, 2005 7:25 pm

Post by Shree0410 »

If we try to get the metadata of the cobol copybooks using DS manager->
Import -> Table Definitions -> Cobol File Definitions
does it expect .cfd files, if yes, how to obtain the .cfd files. All I have is the copybooks in .txt format
vijayrc
Participant
Posts: 197
Joined: Sun Apr 02, 2006 10:31 am
Location: NJ

Post by vijayrc »

Shree0410 wrote:If we try to get the metadata of the cobol copybooks using DS manager->
Import -> Table Definitions -> Cobol File Definitions
does it expect .cfd files, if yes, how to obtain the .cfd files. All I have is the copybooks in .txt format
I am interested too in knowing this...If there's a change to Metadata, and updates are being done thru DS Manager, how does that change be propagated to all Stages/Jobs that use this metadata ???
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You asked that question, and it has been answered, here.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Shree, the ".cfd" file type is actually just a normal text file with a specific extension.
vmcburney
Participant
Posts: 3593
Joined: Thu Jan 23, 2003 5:25 pm
Location: Australia, Melbourne
Contact:

Post by vmcburney »

Manual changes to imported copybook definitions are quite difficult because with the fixed width definitions you may find most of your column start and end points need to be changed. Always best to reimport them. Consider giving imported copybooks version numbers against the name. That way you can use impact analysis on your jobs to see which jobs are using the old copybook definition and which are using the new one.

Last time I tried importing copybooks I had to manually make a few changes to it to get it to import. Changing levels and removing some comments.
Post Reply