Page 1 of 3

Issue with reading a EBCDIC Cobol file - Complex file stage

Posted: Mon Feb 25, 2008 2:41 am
by devidotcom
Hi All,

I am trying to read a EBCIDIC file using a CFF stage. I get the following 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]

Also some more details before this fatal error
Complex_Flat_File_0,0: Field "WMM_CROSS_RFRN_ACCT_NR" has import error and no default value; data: {0c 00 0c 00 0c L 00 00 0c @ @ @ @ @ @ @}, at offset: 33 [impexp/group_comp.C:7679]

Following are the options set

Record type: Fixed
Byte-order: Native-Endian
character set: EBCDIC
Data format: Binary
Record delimiter:
Separator: Project default

I renamed the copied the copybook as .cfd and imported the same as As Is.

Could any one help to find out the reason please

Thanks
Devi

Posted: Mon Feb 25, 2008 2:54 am
by ArndW
Your imported copybook metadata does not match that in the file. Did you get any warnings or error while importing the copybook? At the moment your metadata is longer than the actual data.

Posted: Mon Feb 25, 2008 3:03 am
by devidotcom
Thank you for reply. No I did not get any warnign with importing the metadata.

How can I check if the file is data is shorter than the metadata? If it is then I can remove the extra columns from the metadata.

Posted: Mon Feb 25, 2008 3:10 am
by ArndW
Unfortunately this often ends up being an iterative process. With big copybooks I will delete all but the first 20 columns or so, replacing it with a big VarChar filler field then check with "view data" to see if the columns are parsed correctly. When that is fixed, I will make a copy of the original and use the first 40 columns to check the next 20 for validity, and so on.

Often the errors come from COMP-3 columns not being interpreted correctly, or OCCURS being flattened incorrectly. Do you have either of these in your copybook?

Posted: Mon Feb 25, 2008 3:14 am
by devidotcom
Yes I do have many Comp-3 columns.

Posted: Mon Feb 25, 2008 3:17 am
by devidotcom
Should I try using the flattened pattern option instead of As Is option. This could be a reason right?

Posted: Mon Feb 25, 2008 3:22 am
by ArndW
Does it ask you about flattening?

Posted: Mon Feb 25, 2008 3:25 am
by devidotcom
Yes it does when I import the metadata into the stage. What do I choose there. Flatten selective arrays or Flatten all arrays?

Posted: Mon Feb 25, 2008 3:32 am
by ArndW
Flatten all would be best. Do you have arrays ("OCCURS" or "OCCURS DEPENDING ON") or just group level, i.e. "10 SUB-GROUP." with no pictures?

Posted: Mon Feb 25, 2008 3:36 am
by devidotcom
I have " OCCURS 2 TIMES" mentioned in the copy book. I really dont understand about the other terms you asked for. What is the difference when I say flatten all arrays?

Posted: Mon Feb 25, 2008 3:36 am
by devidotcom
I have " OCCURS 2 TIMES" mentioned in the copy book. I really dont understand about the other terms you asked for. What is the difference when I say flatten all arrays?

Posted: Mon Feb 25, 2008 3:41 am
by ArndW
Flatten all arrays. the OCCURS 2 times will be flattened.

Posted: Mon Feb 25, 2008 3:49 am
by devidotcom
No it did not work.
Our my settings set correctly?

Posted: Mon Feb 25, 2008 4:09 am
by devidotcom
When I flatten the arrays. The nubmer of warning I got was few. But the job aborted due to the same reason.

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]

Also I receive the same warnings as below before I get this fatal error:
Complex_Flat_File_0,0: Field "WMM_CROSS_RFRN_ACCT_NR" has import error and no default value; data: {@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @}, at offset: 33 [impexp/group_comp.C:7679]

Posted: Mon Feb 25, 2008 4:17 am
by ray.wurlod
Try setting APT_STRING_PADCHAR to a single space, rather than its default 0x00, which is usually displayed as ^@.