Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

IBM zoned, packed what the ... is this?

IBM zoned, packed what the ... is this?

IBM zoned, packed what the ... is this?

I am getting a file from a client which I assume is coming from a mainframe and is being transfered over to a unix box. I am running the file through sql-loader to populate an Oracle table. The field I am having a problem with is being moved to fields depending on which code it is. The position of the field is:

tbelec position(027:033) "nvl(:tbelec ,'0')" ,
The problem is the input from the ftp'd transfer file has an ascii character and I cannot for the life of me figure out how to make Cobol get rid of it. Here is what some of the fields look like. It does not always have acharacter at the end.

Any ideas on how to fix this? Thank you!

RE: IBM zoned, packed what the ... is this?

That looks like a ASCII sign representation of a negative value, but not from a mainframe, but rather another system.
Ascii negative numbers go from p (-0) to y (-9)

as you are using SQL*Loader you just need to use the correct load options and column definitions to have it load the numbers correctly

You need to see exacly what is the source of that file, what is the record definition and map it correctly on your CTL file


Frederico Fonseca
SysSoft Integrated Ltd

FAQ219-2884: How Do I Get Great Answers To my Tek-Tips Questions?
FAQ181-2886: How can I maximize my chances of getting an answer?

RE: IBM zoned, packed what the ... is this?

FWIW - those numbers are neither mainframe packed-decimal not mainframe zoned-decimal.

They do look like the zoned-decimal values we used with MicroFocus COBOL on UNIX.

If you want the sending program to produce more "friendly" numbers the code can be changed to use an edit mask to present numbers like

instead of


A picture of 9999999- should preserve the leading zeros and generate the minus sign for negative values in the output. The input would be defined as pic s9(7).

RE: IBM zoned, packed what the ... is this?

As already stated this is an Ascii Cobol, with the negative sign included in the last digit.

20p = -200
20q = -201
20r = -202
20y = -209

Currently the field is defined as s9999999,
You could ask for the format to be changed e.g. -9999999 would give you -0000200 instead of 000020p
or decipher it your self.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close