How can I import Cobol EBCDIC file definitions?
Moderators: chulett, rschirm, roy
How can I import Cobol EBCDIC file definitions?
Hello,
I've no experience with Cobol EBCDIC files/file definitions.
The only thing I know is that cobol used packed fields
How can I import Cobol EBCDIC file definitions in DataStage?
How can I transform the EBCDIC file in an ASCII file, that you can read?
Thanxs,
Erik
I've no experience with Cobol EBCDIC files/file definitions.
The only thing I know is that cobol used packed fields
How can I import Cobol EBCDIC file definitions in DataStage?
How can I transform the EBCDIC file in an ASCII file, that you can read?
Thanxs,
Erik
Hi,
well as far as I remember you need the dictionary files to obtain the schemes you need.
theese are files with the structure of the data you use and looks like:
and so on
as for ebcdic transforming to ascii you have the ascii() function, if memory serves me.
By the way did you read the 390 course book if not been to the course?
IHTH
well as far as I remember you need the dictionary files to obtain the schemes you need.
theese are files with the structure of the data you use and looks like:
Code: Select all
01 ....
03 ....
05 .... PIC ...
as for ebcdic transforming to ascii you have the ascii() function, if memory serves me.
By the way did you read the 390 course book if not been to the course?
IHTH
Roy R.
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
-
- Premium Member
- Posts: 385
- Joined: Tue Oct 07, 2003 4:55 am
Hi there,
You import copy members not the data ....
You have to bring the copy book to the datastage server (by using file transfer or what ever method you use )
Then in the DS manager you have to import the copy book, there is an option in the import manu. Your copy must have a 01 level.
If you want to convert ebcidic to ascii, it depends on the platform you use for the trarget data. The projects I've been involved with usually use a shared disc (like HDS ) so the protocol is responsible for the translation.
Other option is to use a cobol routine in the MF or you have a DS routine in the open env. If you load your data to a RDBMS (either DB2 or Teradata) , the database will do it for you.
HTH,
Amos
You import copy members not the data ....
You have to bring the copy book to the datastage server (by using file transfer or what ever method you use )
Then in the DS manager you have to import the copy book, there is an option in the import manu. Your copy must have a 01 level.
If you want to convert ebcidic to ascii, it depends on the platform you use for the trarget data. The projects I've been involved with usually use a shared disc (like HDS ) so the protocol is responsible for the translation.
Other option is to use a cobol routine in the MF or you have a DS routine in the open env. If you load your data to a RDBMS (either DB2 or Teradata) , the database will do it for you.
HTH,
Amos
Roy,
No, I didn't read the 390 course book. Do you know where I find this? Is this book online available?
Regards,
Erik
No, I didn't read the 390 course book. Do you know where I find this? Is this book online available?
Regards,
Erik
roy wrote:Hi,
well as far as I remember you need the dictionary files to obtain the schemes you need.
theese are files with the structure of the data you use and looks like:and so onCode: Select all
01 .... 03 .... 05 .... PIC ...
as for ebcdic transforming to ascii you have the ascii() function, if memory serves me.
By the way did you read the 390 course book if not been to the course?
IHTH
Importing copybook to an Orch schema is not difficult in PX, but OCCURS get converted to an array of subrecords, with a size field added before the array. And REDEFINES must be handled as variable record format.
Converting EBCDIC text to ASCII is easy. But numbers and dates are not text. Packed numbers are stored as 2 nibbles per byte, with the upper nibble of the last byte reserved for information relating to the sign, etc.
Dates, depending on the format, are split bitwise into components.
And floats (floats, why did it have to be floats!) are represented by mantissa, exponent, and sign fields, split along bit boundaries.
I have not used the 390 product, but I hope it handles these issues nicely.
Carter shore
Converting EBCDIC text to ASCII is easy. But numbers and dates are not text. Packed numbers are stored as 2 nibbles per byte, with the upper nibble of the last byte reserved for information relating to the sign, etc.
Dates, depending on the format, are split bitwise into components.
And floats (floats, why did it have to be floats!) are represented by mantissa, exponent, and sign fields, split along bit boundaries.
I have not used the 390 product, but I hope it handles these issues nicely.
Carter shore
-
- Participant
- Posts: 47
- Joined: Wed Apr 12, 2006 12:13 pm
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
You must specify the column in which the 01 level item begins. By default it's set to column number 8. This is not the case with your FD.
Etiquette Note
It would have been better to start a new thread than to resurrect this very old one, even though the topic is accurate for your problem.
Etiquette Note
It would have been better to start a new thread than to resurrect this very old one, even though the topic is accurate for your problem.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 47
- Joined: Wed Apr 12, 2006 12:13 pm
ISTR a condition where the length of the element declaration was too long for the DataStage import job to handle, and so it missed the terminating period '.'.
In my case it was a particular problem with length of REDEFINES, as you have, try splitting the REDEFINES statement onto two lines instead of one, or delete leading whitespaces.
If that doesn't work, try shortening the 01 level identifier name.
Carter
In my case it was a particular problem with length of REDEFINES, as you have, try splitting the REDEFINES statement onto two lines instead of one, or delete leading whitespaces.
If that doesn't work, try shortening the 01 level identifier name.
Carter