Not able to read from fixed width file

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
devidotcom
Participant
Posts: 247
Joined: Thu Apr 27, 2006 6:38 am
Location: Hyderabad

Not able to read from fixed width file

Post by devidotcom »

I am not able to read from the target fixed width file. I was able to do it few hours ago.The job runs successfully without warnings.


Get this message when try to view the data.

/u001/dev/Ascential/DataStage/PXEngine/etc/standalone.sh -APT_PMsetupFailedFlag /u001/dev/Ascential/DataStage/PXEngine/bin/osh -APT_PMsectionLeaderFlag edwdev2 10003 1 600 edwdev2-2 edwdev2-sw1a 1195538800.164417.72607c
/u001/dev/Ascential/DataStage/PXEngine/etc/standalone.sh -APT_PMsetupFailedFlag /u001/dev/Ascential/DataStage/PXEngine/bin/osh -APT_PMsectionLeaderFlag edwdev2 10003 2 600 edwdev2-3 edwdev2-sw2 1195538800.164417.72607c
/u001/dev/Ascential/DataStage/PXEngine/etc/standalone.sh -APT_PMsetupFailedFlag /u001/dev/Ascential/DataStage/PXEngine/bin/osh -APT_PMsectionLeaderFlag edwdev2 10003 3 600 edwdev2-4 edwdev2-sw2a 1195538800.164417.72607c
##I TUTL 000031 23:06:46(000) <node_edwdev2> The open files limit is 2000; raising to 2147483647.
##I TUTL 000031 23:06:46(000) <node_edwdev2-2> The open files limit is 2000; raising to 2147483647.
##I TUTL 000031 23:06:46(000) <node_edwdev2-3> The open files limit is 2000; raising to 2147483647.
##I TUTL 000031 23:06:46(000) <node_edwdev2-4> The open files limit is 2000; raising to 2147483647.
##W TOIX 000169 23:06:46(001) <Seq_CUSTID_FF,0> Short input record [impexp/grouprep.C:890]
##W TOIX 000154 23:06:46(002) <Seq_CUSTID_FF,0> Import warning at record 0. [new-impexp/file_import.C:3034]
##W TOIX 000018 23:06:46(003) <Seq_CUSTID_FF,0> Import unsuccessful at record 0. [new-impexp/file_import.C:3091]
##W TOIX 000169 23:06:46(004) <Seq_CUSTID_FF,0> Short input record [impexp/grouprep.C:890]
##W TOIX 000154 23:06:46(005) <Seq_CUSTID_FF,0> Import warning at record 1. [new-impexp/file_import.C:3034]
##W TOIX 000018 23:06:46(006) <Seq_CUSTID_FF,0> Import unsuccessful at record 1. [new-impexp/file_import.C:3091]
##W TOIX 000169 23:06:46(007) <Seq_CUSTID_FF,0> Short input record [impexp/grouprep.C:890]
##W TOIX 000154 23:06:46(008) <Seq_CUSTID_FF,0> Import warning at record 2. [new-impexp/file_import.C:3034]
##W TOIX 000018 23:06:46(009) <Seq_CUSTID_FF,0> Import unsuccessful at record 2. [new-impexp/file_import.C:3091]
##W TOIX 000169 23:06:46(010) <Seq_CUSTID_FF,0> Short input record [impexp/grouprep.C:890]
##W TOIX 000154 23:06:46(011) <Seq_CUSTID_FF,0> Import warning at record 3. [new-impexp/file_import.C:3034]
##W TOIX 000018 23:06:46(012) <Seq_CUSTID_FF,0> Import unsuccessful at record 3. [new-impexp/file_import.C:3091]
##W TOIX 000169 23:06:46(013) <Seq_CUSTID_FF,0> Short input record [impexp/grouprep.C:890]
##W TOIX 000154 23:06:46(014) <Seq_CUSTID_FF,0> Import warning at record 4. [new-impexp/file_import.C:3034]
##W TOIX 000018 23:06:46(015) <Seq_CUSTID_FF,0> Import unsuccessful at record 4. [new-impexp/file_import.C:3091]
##I TOIX 000193 23:06:46(016) <Seq_CUSTID_FF,0> No further reports will be generated from this partition until a successful import.
##I TOIX 000163 23:06:46(017) <Seq_CUSTID_FF,0> Import complete; 0 records imported successfully, 471 rejected.
devidotcom
Participant
Posts: 247
Joined: Thu Apr 27, 2006 6:38 am
Location: Hyderabad

Post by devidotcom »

Hi All,

The job is actually reading from a fixed width file with all the columns as char fields. I am able to read the file correctly. I have a transformer after that that adds 2 new columns with some constant values. Also convert the incoming columns to Varch fields so that I can extend the width of the incoming columns.

The job runs fine and creates the output file too which is fixed width again.
But I am not able to view the data.
But when I change the metadata of the output file to Char from VarChar it works and I am able to view the data.
Please help.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

"Short input record" indicates that the total widths of your Char data types exceeds the number of characters in the record. Hence the import failures.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
devidotcom
Participant
Posts: 247
Joined: Thu Apr 27, 2006 6:38 am
Location: Hyderabad

Post by devidotcom »

Thanks Ray for the reply.
So you say when we have the fixed width file we must not use VarChar to read or write rather use Char datatype
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

No that's not what I said. Please read my post again. I was simply interpreting the underlying cause of your error message.

Usually, though, I do prefer to use Char rather than VarChar, as it's better self-documentation. But DataStage itself can cope well with either. It's the Display (or Field Width) property that specifies the width of each field, not the SQL precision.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
devidotcom
Participant
Posts: 247
Joined: Thu Apr 27, 2006 6:38 am
Location: Hyderabad

Post by devidotcom »

But I have a requirement to create a fixed width file and for some output columns extend the field length.
How should i proceeed.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Make the field length longer or truncate the data.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply