I am having one requirement regarding reading of the fixed width file with Header, Tail and data information.
The file looks like :::
90 20071001 3
91 AED EMIRATS ARABES ARS 0.84563700 1.18254000 1 AE
91 AED EMIRATS ARABES AUD 0.33151200 3.01649000 1 AE
91 AED EMIRATS ARABES BDT 18.76790000 0.05328200 1 AE
91 AED EMIRATS ARABES BOB 2.15611000 0.46379800 1 AE
99 20071031 3
Where the first & last line consits of three columns (Header & tail data )
Block type definition : 90
Application date for company : 20071001
Type of currency ::: 3
And data consists of 9 columns .
The header information is not used in target side.
In my output file consists only columns from data rows.
Can anyone please tell me how to read such files.
thnks
venkat
reading of the fixed width file with Header and tail
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 94
- Joined: Fri Dec 14, 2007 3:22 am
Venkat - I am certain I responded to this query with a post yesterday, but I cannot see (or is this a duplicate thread?). Ah, yes - a duplicate identical question to this thread with a different userid
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Add a reject-handling link to the Sequential File stage. It will capture the header and trailer rows because they do not match the record schema of a detail rows. These captured rows can then be re-parsed using, for example, a Column Input stage.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 94
- Joined: Fri Dec 14, 2007 3:22 am
hi ArndW,
my problem is something Similarly
But here my case tail data is their and my onsite people said that read the data with varchar datatype.
then write shell program to remove those head and tail meta data and call in the trm stage.
seq_file -> tfm stage
( call shell program)
thnks
venkat
my problem is something Similarly
But here my case tail data is their and my onsite people said that read the data with varchar datatype.
then write shell program to remove those head and tail meta data and call in the trm stage.
seq_file -> tfm stage
( call shell program)
i don't have the idea of call shell program in tfm stage. pls give me how to do that and if possible pls give me code of shell program.seq. file is fixed width file
thnks
venkat
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
You would not call the shell program from the Transformer stage. You would more likely call it from a before-job subroutine, using ExecSH. But, as I indicated earlier, it is not necessary to incur the overhead of starting another shell.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: