EBCDIC to ASCII and back

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
santosh
Premium Member
Premium Member
Posts: 28
Joined: Tue Jan 11, 2005 1:09 am
Location: London

EBCDIC to ASCII and back

Post by santosh »

PROBLEM:
We have to develop job which will read Source EBCDIC files as per COBOL copybook layout, do transformations on some fields and then create an output EBCDIC file. We are using DataStage on UNIX to do this.

MANDATORY CRITERIA:
We will be getting EBCDIC files from source and have to push target EBCDIC files to target.

OUR SOLUTION:
We are planning to read EBCDIC files using sequential file stage in datasets, apply transformations on required columns and create target EBCDIC files.

SUGGESTIONS:
Requesting suggestions on possible different architecture to achive my objective.

Regards,
Santosh
chucksmith
Premium Member
Premium Member
Posts: 385
Joined: Wed Jun 16, 2004 12:43 pm
Location: Virginia, USA
Contact:

Post by chucksmith »

Have you looked at the Complex Flat File stage?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Do you want to do this using a parallel job (you specified parallel as the job type) or a server job (you posted on the server job forum)?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
santosh
Premium Member
Premium Member
Posts: 28
Joined: Tue Jan 11, 2005 1:09 am
Location: London

EBCDIC to ASCII and back

Post by santosh »

thanks for your reply.
I tried to do this with complex flat file stage but I was unable to change the format according to different record types. I posted the query in server as sequential and parallel file stage is present in both edition.

Wanted to know if the architecture we are using is fine for converting data from EBCDIC to UNICODE in datastage and back to EBCDIC. I believe datastage coverts it to UNICODE while reading.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

You can do it in the transform stage itself. ie; convert it from EBCIDI to ASCII.
ds_developer
Premium Member
Premium Member
Posts: 224
Joined: Tue Sep 24, 2002 7:32 am
Location: Denver, CO USA

Post by ds_developer »

The CFF stage works as a source stage, but not a target. I am writing EBCDIC files in copybook format using the sequential file stage. It is not easy to handle 'depending on' clauses. I ended up using a static layout. DataStage does not have a routine to convert an ASCII number to COMP3. If you have long numbers (like a credit card account number) watch for conversion issues for ASCII numbers longer than 15.
Hope this helps,
John
mkeevil
Participant
Posts: 59
Joined: Mon Jul 14, 2003 12:59 pm
Location: USA

Post by mkeevil »

We currently do that in the transform stage, the code looks something like this:

Trim(DataTypeEbcdicToAscii(Recovery1ODBC.DataLine[60,1]))
mhester
Participant
Posts: 622
Joined: Tue Mar 04, 2003 5:26 am
Location: Phoenix, AZ
Contact:

Post by mhester »

Another possible solution might be to push this logic back to the source system by requesting that these transformations be applied at the source via a COBOL program. This could work if

A) the resources exist to do the work
B) the logic is not dependant on anything external to source system

Just a thought and a method I have used with a few customers who had mainframe data and requirements similar to yours.
Post Reply