Brian Dunning's FileMaker Custom Functions

ZonedDecToNumString ( numberIn ; decimalPlaces )

Converts zoned decimal strings to decimal number strings.

  Average rating: 4.1 (51 votes) Log in to vote

Jeff Hoffman   Jeff Hoffman
A Byte of Data
http://www.abyteofdata.com

Share on Facebook Share on Twitter

  Sample input:
ZonedDecToNumString ( "00004867M" ; 2 )

ZonedDecToNumString ( "00012792{" ; 2 )
  Sample output:
-0000486.74

0001279.20

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

EBCDIC was devised in 1963 and 1964 by IBM and was announced with the release of the IBM System/360 line of mainframe computers. It was created to extend the Binary-Coded Decimal encoding that existed at the time. It is an 8-bit character encoding, in contrast to, and developed separately from, the 7-bit ASCII encoding scheme. Interestingly, IBM was a chief proponent of the ASCII standardization committee. However, IBM did not have time to prepare ASCII peripherals (such as card punch machines) to ship with its System/360 computers, so the company settled on EBCDIC at the time. At the time it was devised, EBCDIC made it relatively easy to enter data into a computer with punch cards. Since punch cards are no longer used on mainframes, EBCDIC is used in modern mainframes solely for backwards compatibility. It has no real technical advantage over ASCII-based code pages, and there are some aspects of EBCDIC which make it much less pleasant to work with than ASCII (such as a non-contiguous alphabet). All IBM mainframe peripherals and operating systems (except Linux on zSeries or iSeries) use EBCDIC as their inherent encoding, so if you need to import data that was exported from an IBM mainframe system, you may need to convert zoned decimal numbers to ASCII so that it is usable by other systems. Modern mainframes (such as IBM zSeries) include processor instructions, at the hardware level, to accelerate translation between character sets.

 

Comments

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 20 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: