DSXchange: DataStage and IBM Websphere Data Integration Forum
View next topic
View previous topic
Add To Favorites
Author Message
admin
Site Admin



Joined: 12 Jan 2003
Posts: 8720

Points: 10

Post Posted: Wed Feb 04, 2004 10:22 pm Reply with quote    Back to top    

of course you could just do a quick awk/sed on your descriptor file and
then import.

Bob Barnett - PA wrote:

>Question :
>
>In attempting to import column names from a text file to create colm names
>in a tanle definition, in DS manager.
>
>
>
>Desired result :
>
>Get extensive number of column names for a large file into DS Manager Table
>Definitions so it can be downloaded to an input file in a DS job.
>
>without having to manipulate the text file to delete spaces and descriptive
>verbage next to the filed names.
>
>Question :
>
>What's the best, or workable method?
>
>
>
>
>
>We did find out that there must be 1 data row in a file w column names as
>the first row to import, in order to create column names for a table def.
>
>BUT
>
>We still have some files w up to 300 field names.
>
>That's a lot of typing and manipulating our control files.
>
>
>
>We have control text files like this :
>
> (AMOUNT DECIMAL EXTERNAL,
>
> AMOUNT_POC DECIMAL EXTERNAL,
>
> APPLICATION# DECIMAL EXTERNAL,
>
> BUYER DECIMAL EXTERNAL,
>
> ......
>
> --------
>
> etc.
>
>
>
>So we'd have to manually edit it, deleting spaces and descriptive data to
>look like this :
>
>AMOUNT,AMOUNT_POC,APPLICATION_NUM,BUYER,...... etc
>
>
>
>Then add a row of data so the final result that gets imported is this :
>
>
>
>
>
>AMOUNT,AMOUNT_POC,APPLICATION_NUM,BUYER,...... etc
>
>0,0,1201039,0,1,1,Loan Origination Fee, .... etc
>
>
>
>Unfortunately we will not have reliable related tables that we can more
>easily load column names from.
>
>Data stage seems to require a row of data under the column title row in the
>imported file, so it can be accessed w the first row is column names
>function.
>
>
>
>It seems there must be a way in DS to import the field names in the format
>at the top here, without having to edit out the descriptive data.
>
>Help appreciated.
>
>
>
>bob
>
>
>
>
>
>_______________________________________________
>datastage-users mailing list
>datastage-users@oliver.com
>http://www.oliver.com/mailman/listinfo/datastage-users
>
>
>


_______________________________________________
datastage-users mailing list
datastage-users@oliver.com
http://www.oliver.com/mailman/listinfo/datastage-users

_________________
PLEASE READ
Do not contact admin unless you have technical support or account questions. Do not send email or Private Messages about discussion topics to ADMIN. Contact the webmaster concerning abusive or offensive posts.
Rate this response:  
Not yet rated
admin
Site Admin



Joined: 12 Jan 2003
Posts: 8720

Points: 10

Post Posted: Thu Mar 04, 2004 9:23 am Reply with quote    Back to top    

Question :

In attempting to import column names from a text file to create colm names
in a tanle definition, in DS manager.



Desired result :

Get extensive number of column names for a large file into DS Manager Table
Definitions so it can be downloaded to an input file in a DS job.

without having to manipulate the text file to delete spaces and descriptive
verbage next to the filed names.

Question :

What's the best, or workable method?





We did find out that there must be 1 data row in a file w column names as
the first row to import, in order to create column names for a table def.

BUT

We still have some files w up to 300 field names.

That's a lot of typing and manipulating our control files.



We have control text files like this :

(AMOUNT DECIMAL EXTERNAL,

AMOUNT_POC DECIMAL EXTERNAL,

APPLICATION# DECIMAL EXTERNAL,

BUYER DECIMAL EXTERNAL,

......

--------

etc.



So we'd have to manually edit it, deleting spaces and descriptive data to
look like this :

AMOUNT,AMOUNT_POC,APPLICATION_NUM,BUYER,...... etc



Then add a row of data so the final result that gets imported is this :





AMOUNT,AMOUNT_POC,APPLICATION_NUM,BUYER,...... etc

0,0,1201039,0,1,1,Loan Origination Fee, .... etc



Unfortunately we will not have reliable related tables that we can more
easily load column names from.

Data stage seems to require a row of data under the column title row in the
imported file, so it can be accessed w the first row is column names
function.



It seems there must be a way in DS to import the field names in the format
at the top here, without having to edit out the descriptive data.

Help appreciated.



bob





_______________________________________________
datastage-users mailing list
datastage-users@oliver.com
http://www.oliver.com/mailman/listinfo/datastage-users

_________________
PLEASE READ
Do not contact admin unless you have technical support or account questions. Do not send email or Private Messages about discussion topics to ADMIN. Contact the webmaster concerning abusive or offensive posts.
admin
Site Admin



Joined: 12 Jan 2003
Posts: 8720

Points: 10

Post Posted: Thu Mar 04, 2004 9:48 am Reply with quote    Back to top    

One possibility, amongst many....

- Copy just the field labels to a text file.
- Create a DataStage Job (you could use QualityStage if you reallllllllly
wanted) that
would replace any occurrence of spaces and other invalid characters to a
character of your
choice.
- Copy from the new text file the new field labels and paste them over the
labels in the
original text file.

Another possibility....

- Copy the field labels to a text file.
- Create a DataStage Basic Routine that would replace any occurrence of
spaces and other
invalid characters to a character of your choice.
- Copy from the new text file the new field labels and paste them over the
labels in the
original text file.

Another possibility....

- Create a DataStage Basic Routine that would read the labels from the text
file, replace any
occurrence of spaces and other invalid characters to a character of your
choice, writing the
new values to a new text file.
- Copy from the new text file the new field labels and paste them over the
labels in the
original text file.


And there are plenty more that I am sure you will hear about from other
members of this listserver.

Thanks,

Lester

Lester F. Callif | Manager | BearingPoint, Inc. | Centennial, Colorado
Mobile 303.596.8422 | Fax 707.988.0160



-----Original Message-----
From: datastage-users-bounces@oliver.com
[mailto:datastage-users-bounces@oliver.com]On Behalf Of Bob Barnett - PA
Sent: Thursday, March 04, 2004 9:23 AM
To: 'datastage-users@oliver.com'
Cc: Pavithra Ramamurthy - PA
Subject: How to import files w out editing, for tbl defs


Question :

In attempting to import column names from a text file to create colm names
in a tanle definition, in DS manager.



Desired result :

Get extensive number of column names for a large file into DS Manager Table
Definitions so it can be downloaded to an input file in a DS job.

without having to manipulate the text file to delete spaces and descriptive
verbage next to the filed names.

Question :

What's the best, or workable method?





We did find out that there must be 1 data row in a file w column names as
the first row to import, in order to create column names for a table def.

BUT

We still have some files w up to 300 field names.

That's a lot of typing and manipulating our control files.



We have control text files like this :

(AMOUNT DECIMAL EXTERNAL,

AMOUNT_POC DECIMAL EXTERNAL,

APPLICATION# DECIMAL EXTERNAL,

BUYER DECIMAL EXTERNAL,

......

--------

etc.



So we'd have to manually edit it, deleting spaces and descriptive data to
look like this :

AMOUNT,AMOUNT_POC,APPLICATION_NUM,BUYER,...... etc



Then add a row of data so the final result that gets imported is this :





AMOUNT,AMOUNT_POC,APPLICATION_NUM,BUYER,...... etc

0,0,1201039,0,1,1,Loan Origination Fee, .... etc



Unfortunately we will not have reliable related tables that we can more
easily load column names from.

Data stage seems to require a row of data under the column title row in the
imported file, so it can be accessed w the first row is column names
function.



It seems there must be a way in DS to import the field names in the format
at the top here, without having to edit out the descriptive data.

Help appreciated.



bob





_______________________________________________
datastage-users mailing list
datastage-users@oliver.com
http://www.oliver.com/mailman/listinfo/datastage-users



******************************************************************************
The information in this email is confidential and may be legally
privileged. Access to this email by anyone other than the
intended addressee is unauthorized. If you are not the intended
recipient of this message, any review, disclosure, copying,
distribution, retention, or any action taken or omitted to be taken
in reliance on it is prohibited and may be unlawful. If you are not
the intended recipient, please reply to or forward a copy of this
message to the sender and delete the message, any attachments,
and any copies thereof from your system.
******************************************************************************

_______________________________________________
datastage-users mailing list
datastage-users@oliver.com
http://www.oliver.com/mailman/listinfo/datastage-users

_________________
PLEASE READ
Do not contact admin unless you have technical support or account questions. Do not send email or Private Messages about discussion topics to ADMIN. Contact the webmaster concerning abusive or offensive posts.
Rate this response:  
Not yet rated
Display posts from previous:       

Add To Favorites
View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2002 phpBB Group
Theme & Graphics by Daz :: Portal by Smartor
All times are GMT - 6 Hours