Problem reading a EBCDIC file using CFF Stage

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
krsriraman
Participant
Posts: 9
Joined: Thu Aug 25, 2005 11:33 pm

Problem reading a EBCDIC file using CFF Stage

Post by krsriraman »

Hi,

****THIS IS URGENT****

I am using a CFF Stage to read a EBCDIC file and then convert it to a ASCII file.

I have problem reading a particular column. Whe I do a 'view data', I get a '?' (question mark) as the value for that column.

The columns native type is CHARACTER and length is 1. (BIT (1) type ).
I get correct values for other columns, but except this.

I played around with all the properties and options, but still only a "?" shows up.

Please help. This is URGENT
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Welcome aboard! :D

If it's urgent, sign up with your support provider for premium support and learn how much "urgent" costs.

This is an all-volunteer site. People post as and when they can.
Last edited by ray.wurlod on Fri Aug 26, 2005 1:38 am, edited 1 time in total.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

krsriraman ,

I am sure that you would already have received answers, had you not specified URGENT twice in your e-mail.

While you are awaiting answers, perhaps you could use the search functionality on this site to see some answers.
ds_developer
Premium Member
Premium Member
Posts: 224
Joined: Tue Sep 24, 2002 7:32 am
Location: Denver, CO USA

Post by ds_developer »

What does the actual field look like in EBCDIC?
I would convert it to ASCII and write it to a sequential file then look at it. Was it converted correctly?

You might want to correct the View Data issue at some point, but right now you want to see if the data is being converted correctly.

John
crouse
Charter Member
Charter Member
Posts: 204
Joined: Sun Oct 05, 2003 12:59 pm
Contact:

Post by crouse »

If the particular column is part of a REDEFINES, you may be looking at some rows of data that don't use that column as defined and it may be packed?

Just a thought.
Craig Rouse
Griffin Resouces, Inc
www.griffinresources.com
krsriraman
Participant
Posts: 9
Joined: Thu Aug 25, 2005 11:33 pm

Post by krsriraman »

ArndW wrote:krsriraman ,

I am sure that you would already have received answers, had you not specified URGENT twice in your e-mail.

While you are awaiting answers, perhaps you could use the search functionality on this site to see some answers.
Before posting, I did search the site, and since I did not get an answer, I have posted the query.

When converted to ASCII, the sequential file just shows the ASCII equivalent of "?". Also, it is not packed.
chucksmith
Premium Member
Premium Member
Posts: 385
Joined: Wed Jun 16, 2004 12:43 pm
Location: Virginia, USA
Contact:

Post by chucksmith »

Perhaps my Create a hex/ascii dump of an ebcdic cobol file tool can give you a clue.

You will find it on the DataStage Tools page of www.anotheritco.com.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Hi Chuck,
But i guess, this tool facilitate us to just dump the layout with some randome data, am i rignt? :roll:
Iam too curious upon this topic, coz i too have this issue, i too get some '?' or '|' or some special character, later i was let known it is packed hex decimal....

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

Post by chucksmith »

This tool can dumps your entire dataset. Its primary input parameter is your logical record length.

I usually limit my job to a few rows when I first run it. Next, I try to identify fields in the logical record that I can use in constraints to filter the output without limiting the input rows. Add a constraint to the job, and run it again. Repeat the cycle until you have found the problem with your data or it description (copybook).
dls
Premium Member
Premium Member
Posts: 96
Joined: Tue Sep 09, 2003 5:15 pm

Post by dls »

If your EBCDIC file is the result of a utilility 'unload' of a DB2 table on the MF, then the ?s may be indicating null values in your source.

If that's the case, you can easily account for it in the CFF stage processing.
krsriraman
Participant
Posts: 9
Joined: Thu Aug 25, 2005 11:33 pm

Post by krsriraman »

dls wrote:If your EBCDIC file is the result of a utilility 'unload' of a DB2 table on the MF, then the ?s may be indicating null values in your source.

If that's the case, you can easily account for it in the CFF stage processing.
But I am getting the ?s only some fields. Not all. The other fields have NULL (or blank ) values in them.

Also,I heard that, If the CFF does not understand a character, then it shows a questionmark.
dls
Premium Member
Premium Member
Posts: 96
Joined: Tue Sep 09, 2003 5:15 pm

Post by dls »

Keep in mind the difference between a blank/space and a null value.

I'm suggesting the following scenarion. It may, or may not, be the case.

Your EBCDIC file is the result of an unload from a MF DB2 table. Some columns in the source table are defined as nullable. Whenever a null value exists in the source column, it results in a '?' value in your FF field.
Likewise, any column in your source table defined as CHAR/VCHAR can have a blank/space value, whether it's nullable or not. Like any other value, the blank/space value is carried over to your FF field.

Make sense?
Post Reply