Micro Focus PIC S9 (12) Issue

Hi,

I am trying to convert a Micro Focus C-ISAM file and am having issues with a field labelled as PIC S9 (12) COMP SYNC. I have specified the field as being a COMP field of size 8. I am sure that I am reading the field on a word boundary and the value does appear correctly in the Data Browser. However, when i try to extract the data from the file I recieve the following error:-

"Possible loss of precision from data type mapping in RunButtonClicked(dparser.bas) (25020)"

I have tried to determine what is causing this issue and noticed that if i split the field into two separate fields of COMP field size 2 and COMP field size 6 then I no longer receive the error message. Obviously for small values this will be fine, as the correct value will be stored in the second field but if the values use the most significant digits then this will not produce the desired result.

Thank you,

Andrew Sweeting

RE: Micro Focus PIC S9 (12) Issue

Hi Andrew,

The "possible loss of precision..." message usually occurs if the data type and/or one or more of the data type properties is not set correctly for a field. I am not familiar with the PIC S9 (12) COMP SYNC data type...sorry. You may need to experiment with each of the "comp" data types and with the data type properties for each until you find the right "combination" that works for this specific data field. Remember, the data type properties "Signed", "Decimals", and "Scale" affect the total number of bytes that are stored in the field.

Please let me know if this helps resolve the problem, or not.

- Jo

Reply

Hi,

Thank you for getting back to me so soon. I have determined that in the circumstance I have specified, the data is stored in 8 bytes, however the information is actually only contained in the last 6 bytes (due to the sync clause), so i can just use a filler and read the last 6 bytes.

However, if the field had been any larger then this would not have worked.

i.e.

0000 0000 0000 0000 0000 0000 001B 0058 Has a value of 7000

If i read this as Comp 2 and then Comp 6 then i can extract the data to a file.

If i read this as Comp 1 and then Comp 7 or as Comp 8, then the correct data is displayed in the Data Browser, but I cannot extract the information to a file.

Regards,

Andrew

RE: Reply

Hi Andrew,

We're happy to know there is a way to handle the data in this file, and appreciate you posting the details about using Comp-2 and Comp-6 to define the field(s).

- Jo