Hi all,
I have a fixed-width sequential file (say A.txt)
The data structure is:
columnname|length
----------------------
empno|2
empname|10
Value which I stored is:
01Ravindar**
02Vivek*****
I am using a sequential file stage to read this file.
My required output from the SF stage is a valid value for each column(means those *s should be truncated)
My question is:
How to do this in a sequential file stage?
Note:I know this can be done easily through a transformer.
Handling NULLs in fixed-width column sequential file
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
You want to Trim the "*" characters. Or you can convert them to "". In column derivation expressions in a Transformer stage use either of the following:
Code: Select all
Trim(InLink.empname, "*", "T")
Convert("*", "", InLink.empname)
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:
Again I have follwoing doubts in SF stage.
What is the need for Missed column action when I am going to use fixed-width sequential file.(I think u can't find whether a column is missing when reading a fixed-width column sequential file.
How the Default padding and default NULL string is working when I am trying to read a fixed-width sequential file.
Plz help me with an example so that I can check it in my job.
What is the need for Missed column action when I am going to use fixed-width sequential file.(I think u can't find whether a column is missing when reading a fixed-width column sequential file.
How the Default padding and default NULL string is working when I am trying to read a fixed-width sequential file.
Plz help me with an example so that I can check it in my job.
-
- Premium Member
- Posts: 892
- Joined: Thu Oct 16, 2003 5:18 am