I am using CFF stage for reading a multiformat file.
File type is binary.
Char set is EBCDIC as FTPd from mainframe.
I need to unpack data of a packed decimal field from a binary file.
The field takes 5bytes. I have used data-type as DECIMAL(9) in CFF stage and I can see it's cobol format shows as PIC 9(9) COMP-3 and it takes 5byes only.
When I try to view data it is giving me below error.
##I IIS-DSEE-TFSC-00001 14:46:16(013) <main_program> APT configuration file: /applications/IBM/InformationServer/Server/Configurations/default.apt
##W IIS-DSEE-TFIG-00201 14:46:16(000) <Complex_Flat_File_7,0> Field "C01KTO" has import error and no default value; data: {01 00 & Q 00 80}, at offset: 45
##W IIS-DSEE-TOIX-00154 14:46:16(001) <Complex_Flat_File_7,0> Import warning at record 0.
##W IIS-DSEE-TOIX-00018 14:46:16(002) <Complex_Flat_File_7,0> Import unsuccessful at record 0.
##W IIS-DSEE-TFIG-00201 14:46:16(003) <Complex_Flat_File_7,0> Field "C01KTO" has import error and no default value; data: {01 07 1 3 00 20}, at offset: 45
##W IIS-DSEE-TOIX-00154 14:46:16(004) <Complex_Flat_File_7,0> Import warning at record 1.
##W IIS-DSEE-TOIX-00018 14:46:16(005) <Complex_Flat_File_7,0> Import unsuccessful at record 1.
##W IIS-DSEE-TFIG-00201 14:46:16(006) <Complex_Flat_File_7,0> Field "C01KTO" has import error and no default value; data: {01 08 & 9 00 @}, at offset: 45
##W IIS-DSEE-TOIX-00154 14:46:16(007) <Complex_Flat_File_7,0> Import warning at record 2.
##W IIS-DSEE-TOIX-00018 14:46:16(008) <Complex_Flat_File_7,0> Import unsuccessful at record 2.
##W IIS-DSEE-TFIG-00201 14:46:16(009) <Complex_Flat_File_7,0> Field "C01KTO" has import error and no default value; data: {01 08 & 9 00 @}, at offset: 45
##W IIS-DSEE-TOIX-00154 14:46:16(010) <Complex_Flat_File_7,0> Import warning at record 3.
##W IIS-DSEE-TOIX-00018 14:46:16(011) <Complex_Flat_File_7,0> Import unsuccessful at record 3.
##W IIS-DSEE-TFIG-00201 14:46:16(012) <Complex_Flat_File_7,0> Field "C01KTO" has import error and no default value; data: {01 08 p 7 00 02}, at offset: 45
When I check the file on unix machine in hex format i can see the values like:
0100265100
0107313300
and so on.
I see the same value on mainframe. Except on the mainframe PIC 9(9) comp-3 is stored in 5 bytes packed but there is no sign at the end.
I checked the forum and found that possibility of mainframe decimals are stored without sign (overpunched)
![Sad :(](./images/smilies/icon_sad.gif)
Please let me know how can I handle packed data without sign nibble. Or do we need to use some external routine.
any suggestion would be of great help.
Thanks,
sachin