Hi,
How can i open a sequential file with the variable column lengths.
TIA
SequentialFile
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Are the columns delimited by some character? If so specify that information when importing the table definition, and use a Sequential File stage.
Otherwise, provided there's a small number of variations, the Complex Flat File stage may be more appropriate.
Otherwise, provided there's a small number of variations, the Complex Flat File stage may be more appropriate.
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.
I have a sequential file with the single column with the length of 250.So, In my seq_file stage i have mentioned a single column Col1 ----char(250),it works fine for me.
with the same job i have to open sequential file with single column and length of 100.
When i tried to do so ,i got error like unexpectedly ended by EOR.
How can i achieve this?
TIA
with the same job i have to open sequential file with single column and length of 100.
When i tried to do so ,i got error like unexpectedly ended by EOR.
How can i achieve this?
TIA
ray.wurlod wrote:Are the columns delimited by some character? If so specify that information when importing the table definition, and use a Sequential File stage.
Otherwise, provided there's a small number of variations, the Complex Flat File stage may be more appropriate.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Scroll to the right in the columns grid to find out where to handle incomplete records.
Specify the original read as VarChar(250). When you need the first 100 characters, use substring techniques - there's no need to re-read the file.
Specify the original read as VarChar(250). When you need the first 100 characters, use substring techniques - there's no need to re-read the file.
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.