reading sequential file as a single field
Moderators: chulett, rschirm, roy
reading sequential file as a single field
hi all...
in my last post i asked one question...as per the post i approached the solution but now i m facing a problem
while reading the whole sequential file as a single field as am facing a problem.an error message is showing there.my file has some rows as blank and some rows have data in it.i need to read the whole file as one field.
my file looks like this
name of the company
*******************
*blank spaces here*
generation date :12/10/2006
*blank spaces here*
1256~name1~account_no~ aghik@yahoo.com~12/15/2005
1562~name2~account_no~ aghik@yahoo.com~12/15/2005
1563~name3~account_no~ aghik@yahoo.com~12/15/2005
generation date :12/10/2006
*blank spaces here*
1256~name1~account_no~ aghik@yahoo.com~12/15/2005
1562~name2~account_no~ aghik@yahoo.com~12/15/2005
1563~name3~account_no~ aghik@yahoo.com~12/15/2005
i have choosen the fixed width type and terminator to yes...and also reading it as char and nullable is set to yes.
plz help me how to read the file
in my last post i asked one question...as per the post i approached the solution but now i m facing a problem
while reading the whole sequential file as a single field as am facing a problem.an error message is showing there.my file has some rows as blank and some rows have data in it.i need to read the whole file as one field.
my file looks like this
name of the company
*******************
*blank spaces here*
generation date :12/10/2006
*blank spaces here*
1256~name1~account_no~ aghik@yahoo.com~12/15/2005
1562~name2~account_no~ aghik@yahoo.com~12/15/2005
1563~name3~account_no~ aghik@yahoo.com~12/15/2005
generation date :12/10/2006
*blank spaces here*
1256~name1~account_no~ aghik@yahoo.com~12/15/2005
1562~name2~account_no~ aghik@yahoo.com~12/15/2005
1563~name3~account_no~ aghik@yahoo.com~12/15/2005
i have choosen the fixed width type and terminator to yes...and also reading it as char and nullable is set to yes.
plz help me how to read the file
-
- Participant
- Posts: 34
- Joined: Fri Sep 22, 2006 10:59 pm
- Location: India
-
- Participant
- Posts: 34
- Joined: Fri Sep 22, 2006 10:59 pm
- Location: India
Hi,
Try with Field Function.
This will give you only the date part, so you can store it in a table.
Hope this will help you.
Try with Field Function.
Code: Select all
Field(i/p_col_name,~,4)
Hope this will help you.
Regards,
Balaji.
Balaji.
Not to discourage you from asking questions....dr46014 wrote:can u plz explan wat that code means..
You need to do a little of searchon the forum for your answers.
If you don't find solutions, then ask for it.
Narasimha Kade
Finding answers is simple, all you need to do is come up with the correct questions.
Finding answers is simple, all you need to do is come up with the correct questions.
-
- Premium Member
- Posts: 1255
- Joined: Wed Feb 02, 2005 11:54 am
- Location: United States of America
You can also find more information about the DataStage functions/transforms/routines in the DataStage Help Menu.
u, plz, wat, ur, etc., don't belong to english language. It is always advisable to write your posts using words the right way.
Thanks,
Whale.
A piece of advice.dr46014 wrote: can u plz explan wat
u, plz, wat, ur, etc., don't belong to english language. It is always advisable to write your posts using words the right way.
Thanks,
Whale.
Anything that won't sell, I don't want to invent. Its sale is proof of utility, and utility is success.
Author: Thomas A. Edison 1847-1931, American Inventor, Entrepreneur, Founder of GE
Author: Thomas A. Edison 1847-1931, American Inventor, Entrepreneur, Founder of GE
I thought i gave you the solution in your other post. You will have blank lines in your target file but then stick another transformer next to it and put a constraint as i specified in my post in the link i provided. That will work. Whats not working there ?dr46014 wrote:one more help...i need that i should read the date field and pass it as a stage variable to load it into the table..
i want to read only the records not the company name,the ********s and the blank line...
how should i do that
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
-
- Participant
- Posts: 147
- Joined: Sat Apr 30, 2005 1:23 am
- Location: Bangalore,India