Mainframe low values

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
hsahay
Premium Member
Premium Member
Posts: 175
Joined: Wed Mar 21, 2007 9:35 am

Mainframe low values

Post by hsahay »

I have a text file in which we have some special/junk characters. the special charater is something like box whose ascii value is 255. When i checked, i came to know that the file is from mainframe and during coversion they have some mainframe low values left as is.

Now my problem is i want convert them to blanks.

I am not able to do that. i have searched the db and tried all the options told but they are not working.

I request you to help me in this regard. Thanks in advance
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Did you try convert?

Code: Select all

Convert(CHAR(255)," ",YourField)
-craig

"You can never have too many knives" -- Logan Nine Fingers
hsahay
Premium Member
Premium Member
Posts: 175
Joined: Wed Mar 21, 2007 9:35 am

Post by hsahay »

chulett wrote:Did you try convert?

Code: Select all

Convert(CHAR(255)," ",YourField)
Yes i tried that. I got that from one of the previous post. But it did not work.
FranklinE
Premium Member
Premium Member
Posts: 739
Joined: Tue Nov 25, 2008 2:19 pm
Location: Malvern, PA

Post by FranklinE »

There is an open question here: How is the text file from the mainframe being created?

If there is a separate download job/process that creates the file, then the easiest and most effective way to handle this is to make sure that process is doing the proper EBCDIC to ASCII conversions. It's possible you can configure it to convert extended-charset values to space during the download.

An alternative is to read the mainframe data from the mainframe with FTP Enterprise, if your environment supports it. This stage lets you define the input format for "COBOL" which provides the necessary defaults and lets DataStage handle the characterset incoming and for conversion to ASCII. I use that in jobs I'm developing right now.
Franklin Evans
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson

Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872
hsahay
Premium Member
Premium Member
Posts: 175
Joined: Wed Mar 21, 2007 9:35 am

Post by hsahay »

Franklin,

Thanks for the answer.

But we cannot do anything with the file now. client is not ready give new file or allow us use mainframe file.
hsahay
Premium Member
Premium Member
Posts: 175
Joined: Wed Mar 21, 2007 9:35 am

Post by hsahay »

Anyone please help me with this issue..
swapnilverma
Participant
Posts: 135
Joined: Tue Aug 14, 2007 4:27 am
Location: Mumbai

Post by swapnilverma »

plz try reading ur file in a server job instead of px and use same convert function ...

Convert(CHAR(255)," ",YourField)

let us knw if this resolve ?
Thanks
Swapnil

"Whenever you find whole world against you just turn around and Lead the world"
Mike
Premium Member
Premium Member
Posts: 1021
Joined: Sun Mar 03, 2002 6:01 pm
Location: Tampa, FL

Post by Mike »

How did you conclude that Char(255) is equivalent to COBOL LOW-VALUES?

LOW-VALUES has all zero bits... which would be Char(0)

Mike
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Mike wrote:How did you conclude that Char(255) is equivalent to COBOL LOW-VALUES?
I've been wondering the same thing all along but decided to stick with the assertion that they are 255s rather than "low values". :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
Mike
Premium Member
Premium Member
Posts: 1021
Joined: Sun Mar 03, 2002 6:01 pm
Location: Tampa, FL

Post by Mike »

Same reason I didn't chime in earlier... but since Convert of Char(255) doesn't work, the character must be something other then Char(255).

Mike
FranklinE
Premium Member
Premium Member
Posts: 739
Joined: Tue Nov 25, 2008 2:19 pm
Location: Malvern, PA

Post by FranklinE »

I assumed no problem with low-values because they are ASCII null.

I also wonder, from his replies so far, if his clients are tying his hands and expecting him to do handstands. :?
Franklin Evans
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson

Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872
Post Reply