Issue with reading a EBCDIC Cobol file - Complex file stage

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

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

Post by devidotcom »

The parameter already has a space assigned to it.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

WMM_CROSS_RFRN_ACCT_NR is probably a COMP-3 field and the error means that your metadata doesn't match the data. There is no easy way to solve this, you need to match the metadata with the data column by column to find out where the difference occurs. Assume the OCCURS didn't work correctly as a starter.
devidotcom
Participant
Posts: 247
Joined: Thu Apr 27, 2006 6:38 am
Location: Hyderabad

Post by devidotcom »

No that column is not Comp-3 column
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Ok, that means the error has occurred before that column. You will still need to put in some time and effort in locating the cause.
Aruna Gutti
Premium Member
Premium Member
Posts: 145
Joined: Fri Sep 21, 2007 9:35 am
Location: Boston

Post by Aruna Gutti »

Where is your data coming from ? Did you checked whether your data is actually in binary format ?

Usually I get this kind of error when I ftp the data in ASCII format instead of binary by mistake.

Regards,

Aruna.
Aruna Gutti
Premium Member
Premium Member
Posts: 145
Joined: Fri Sep 21, 2007 9:35 am
Location: Boston

Post by Aruna Gutti »

Where is your data coming from ? Did you checked whether your data is actually in binary format ?

Usually I get this kind of error when I ftp the data in ASCII format instead of binary by mistake.

Regards,

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

Post by devidotcom »

Yes its in binary format only. I was told its a EBCDIC file.
devidotcom
Participant
Posts: 247
Joined: Thu Apr 27, 2006 6:38 am
Location: Hyderabad

Post by devidotcom »

I put default values for each column manually and was able to read the records.
But the job yet aborts with the error

Complex_Flat_File_0,0: Short read encountered on import; this most likely indicates one of the following possibilities:
1) the import schema you specified is incorrect
2) invalid data (the schema is correct, but there is an error in the data). [new-impexp/file_import.C:3227]

So should I assume that the data is wrong but the schema is right?
Aruna Gutti
Premium Member
Premium Member
Posts: 145
Joined: Fri Sep 21, 2007 9:35 am
Location: Boston

Post by Aruna Gutti »

Looks like data problem to me. Did you tried viewing your data in some kind of editor like UltraEdit to determine the validity. I struggled initially with this problem when I tried my CFF to work. Once I did the binary ftp properly it worked.
devidotcom
Participant
Posts: 247
Joined: Thu Apr 27, 2006 6:38 am
Location: Hyderabad

Post by devidotcom »

Yes I guess its the issue with the data. As AndW mentioned. I will check and update on the same
devidotcom
Participant
Posts: 247
Joined: Thu Apr 27, 2006 6:38 am
Location: Hyderabad

Post by devidotcom »

Hi I am trying to analyze the binary data using Ultraedit...
I am new to using Ultraedit tool. I find mhy records to be like following. I am not sure if it has junk data. Can anyone explain.

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You might have a whole lot of "@" characters, you may have a whole lot of NUL characters (0x00). Switch to hex mode to determine which it is.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

It may mean that your conversion from EBCDIC to ASCII was not done correctly. You don't convert binary (COMP) columns, for example.
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 »

I just use the option from File->Conversion->EBCDIC to ASCII in the Ultra edit and to the convert.

How do I convert COMP columns? Please advice
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

You cannot convert COMP-3 columns in that manner within the editor. Do you have ANY columns in your COBOL that are "COMP" or "COMP-3" or "COMP-2"?
Post Reply