Page 1 of 1

Input Data with Decimal Point

PostPosted: Mon Oct 12, 2009 7:40 am
by qz2s4m
Having difficulty processing input data that contains decimal points.

Data Ex:
----+----1----+----2----+----3----+----4----+----5----
********************************* Top of Data ********
P1800AA12    7EWA6K  7EWA6K7316EXTERNAL000000710.00000
P1800AH0C    EFVJBF  EFVJBF7316EXTERNAL000000016.45000


Trying to code
FILE COURIER FB(200 7400)
 ROOM          6    4 A. 
 RATE         40   12 N 2.


Will generate an A006 error. Though if the RATE field did not have decimal points (i.e. "00000071000"). Then a statement like RATE 40 11 N 2. works just fine. I haven't seen any examples in the manuals as of yet that show any reference to coding DEFINE statements for fields that have decimals in the input data.

Tried using masks, everything I read suggests this if for output of data not input.

Any insight appreciated.

Thanks
Duane

Re: Input Data with Decimal Point

PostPosted: Mon Oct 12, 2009 11:42 pm
by dick scherrer
Hello,

One way to do what you want is to define the input field as an array and process byte-by-byte.

I'm not aware of an Easytrieve "built-in" that does this. If your organization is licensed to use Easytrieve, CA Support could provide the answer (and maybe eve sample code).