Page 1 of 1

How to import cobol copybooks metadeta

Posted: Tue Oct 10, 2006 8:23 am
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.

Posted: Tue Oct 10, 2006 8:30 am
by ArndW
In the manager you can do Import -> Table Definitions -> Cobol File Definitions.

Posted: Tue Oct 10, 2006 8:37 am
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?

Posted: Tue Oct 10, 2006 8:39 am
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.

Posted: Tue Oct 10, 2006 8:46 am
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?

Posted: Tue Oct 10, 2006 8:55 am
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.

Posted: Tue Oct 10, 2006 2:26 pm
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

Posted: Tue Oct 10, 2006 2:39 pm
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 ???

Posted: Tue Oct 10, 2006 2:44 pm
by ray.wurlod
You asked that question, and it has been answered, here.

Posted: Wed Oct 11, 2006 1:03 am
by ArndW
Shree, the ".cfd" file type is actually just a normal text file with a specific extension.

Posted: Wed Oct 11, 2006 2:49 am
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.