Unable to read an ascii file in unix
Moderators: chulett, rschirm, roy
Unable to read an ascii file in unix
Hi-
I have converted an EBCIDIC format file into ASCII format and i am able to view the file correctly in datastage, but not able to read correctly in unix.
for eg: X field Decimal(13) value in datastage : 023467890601 and i am getting some 4bvbP for that. this is the only field i am not able to read correctly.
can some one help me to solve this.
Thanks in advance
I have converted an EBCIDIC format file into ASCII format and i am able to view the file correctly in datastage, but not able to read correctly in unix.
for eg: X field Decimal(13) value in datastage : 023467890601 and i am getting some 4bvbP for that. this is the only field i am not able to read correctly.
can some one help me to solve this.
Thanks in advance
OK, now I'm officially confused. You said you're already handling it correctly in DataStage but that you were "not able to read correctly in unix" which makes sense as you'll see the packed version there.
So... what exactly is the problem that you have, a UNIX or a DataStage one?
So... what exactly is the problem that you have, a UNIX or a DataStage one?
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
Still confusing. This 'comparison' you need to do, is it not in a DataStage job? Why would you need to see this from the command line to do that?
Regardless, you won't be able to see the 'correct' value 'in UNIX' until you unpack the field and write the file out to a new location/name. And since you're already able to handle it (the COMP-3 field) correctly in DataStage, that should be simple.
Regardless, you won't be able to see the 'correct' value 'in UNIX' until you unpack the field and write the file out to a new location/name. And since you're already able to handle it (the COMP-3 field) correctly in DataStage, that should be simple.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
Because, as noted, DataStage is unpacking the value. You won't be able to do much in your script until you do something to unpack that field into display format - be it a DataStage job or some other tool. There's lots of utilities that can do that unpacking during the transfer from the mainframe that generated the file, convert EBCDIC to ASCII and unpack any packed fields. Or perhaps you can ask them to deliver it to you with that field unpacked.
"That's a huge comparision which cant be done in datastage"
I would beg to differ that it cannot be done. You may have already decided that you don't want to handle it there but that's a long way from can't.
"That's a huge comparision which cant be done in datastage"
I would beg to differ that it cannot be done. You may have already decided that you don't want to handle it there but that's a long way from can't.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
Craig is right --- there are lots of ways to do comparisons in DataStage....nevertheless, convert the column into a normal character field before writing it out. When you are looking at it in DS you are probably using "View Data" which unpacks it temporarily for your viewing....you need to write it out in that unpacked format.
Ernie
Ernie
Ernie Ostic
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>