Focal Point
Data Conversion from MF to Web Question

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/8601067331

May 06, 2003, 10:19 PM
Tred
Data Conversion from MF to Web Question
What FIXFORM Format would be used to read in a field, that was Zoned on the MainFrame, that was a converted to a number with a leading sign (where the + is blank)?

Thanks.
May 07, 2003, 12:07 AM
Chris Boylan
That depends what you mean by "was converted to a number."

What platform is on now? What does it look like in a text editor? And how about in hex?

If you view it in a text editor and the number is readable (1234 looks like 1234, -1234 looks like -1234), then it's alpha (A). If this is the case, and the number is 9 characters long, then fixform it as A9. If the USAGE is I9 or P9 in the MFD of the DB you're loading it into, then FOCUS will convert it internally to the proper format in the load.

If you view it in a text editor and it's garbage characters, then we'd need to figure out how it's actually stored right now.

If you view it in hex, and the number 1234 appears as

F1 F2 F3 F4 (mainframe EBCDIC) or

31 32 33 34 (PC ASCII)

then it's also a good bet that it's alpha.

Let us know what platform and what the data looks like both in hex and in a text editor and I can give you a better idea how to define it.

-CB
May 07, 2003, 02:31 AM
Tred
Thanks Chris, we are going from EBCDIC on MVS to ASCII on NT. We converted the MVS Zoned fields to alpha with a character space in front of the number for the sign. So, on NT 1234 is Alpha as you surmised. Our original was FIXFORM Z8.2, so with what you are saying we should probably change the FIXFORM to A8 (we were trying F8.2 to no avail) and then the USAGE which i believe is P8.2 will take care of itself. Correct?
May 07, 2003, 03:22 AM
Chris Boylan
Correct. A8 would be the actual format of that field. And conversion of A8 to P8.2 will work fine in the load. FOCUS will store it in the db as a P4 ACTUAL internally.

So if your MFD has the field defined as P8.2, you should have no problems using A8 as the input format for the fixform.
May 07, 2003, 04:47 PM
Tred
When the FIXFORM Format is A8 and the USAGE in the MFD is P8.2 the Load disregards the implied decimal, and the value is loaded as a whole number. How can we get the load to honor the decimal?
Data -> b0200000 - where b is blank
comes in as -> 200000
not as -> 2000.00
May 07, 2003, 07:54 PM
Chris Boylan
Ah. I assumed you had a *real* decimal in the alpha field (e.g., -1234.56).

In your case, if you have and "implied" .2 decimal, you'll need to do a COMPUTE to divide the field by 100 before loading the field into the database.

Hope that helps.

-CB
May 07, 2003, 08:18 PM
FocWizard
Well, you can 'cheat' Big Grin . Since you're going to a 'P' format, and your data has an implied decimal point, use 'Z' format on the fixform. With 'Z' format, you can specify where the implied decimal point is. For example, if my data is '01234, and my FIXFORM declares the field as 'field/Z5.2', it'll be read in as 12.34.

Of course, this assumes there are no leading signs on your value.

Just out of curiosity, how did you get the leading sign, but lose the decimal point?

Art