I tried both Sequencial and Complex Flat File stage to transform EBCDIC file into ASCII file. It works well for transforming char. But it will always get import error when transforming packed decimal.
For example, the packed decimal 27 0f in the EBCDIC file is supposed to be transformed into decimal 270 in ASCII. But I got the log below:
Field "col1" has import error and no default value; data: {' 0f}, at offset: 0
Is there something wrong when importing the file? (' is the ASCII character for 27). I have already set the character set to EBCDIC.
How to transform EBCDIC packed decimal into ASCII?
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 7
- Joined: Mon Dec 17, 2007 1:37 am
- Location: Boston, MA
Packed is packed and is neither ASCII nor EBCDIC. So while you do indeed need to convert character data as you've noted, packed fields need no such thing, and any 'conversion' will destroy them. You simply need to 'unpack' them.
Now, I haven't used the CFF stage so can't you specific advice there but I'm sure others can. I know in Server there are sdk routines that unpack the various flavors of packed fields, not sure about PX though. So while I don't have alot of help for you here, mostly just wanted to make sure you knew what approach you needed to take.
Now, I haven't used the CFF stage so can't you specific advice there but I'm sure others can. I know in Server there are sdk routines that unpack the various flavors of packed fields, not sure about PX though. So while I don't have alot of help for you here, mostly just wanted to make sure you knew what approach you needed to take.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Premium Member
- Posts: 145
- Joined: Fri Sep 21, 2007 9:35 am
- Location: Boston
There have been other postings about converting EBCDIC to ASCII, and how to deal with numeric data.
Here are a couple of topics to look at:
How to convert the signed decimal
Mainframe MVS File to SF/CFF stage. Values Incorrect
Hope this helps.
Brad.
Here are a couple of topics to look at:
How to convert the signed decimal
Mainframe MVS File to SF/CFF stage. Values Incorrect
Hope this helps.
Brad.