issac1029 Intermediate

Joined: 10 Dec 2005 Posts: 159 Topics: 75
|
Posted: Thu Apr 16, 2009 10:44 pm Post subject: Can I convert customer format edit(TTTTT.TTT) back to PD? |
|
|
As subject.
I am now doing
first to removed decimal point, by match byte by byte
then use to convert ZD to PD.
input:
Code: | 123456789111.88;123456789111.77;123456789111.66;123456789111.55;.......... |
Code: | INREC FIELDS=(1,46,47,13,61,3,64,13,78,3,81,13,95,3,98,13,112,3,
115,13,129,3,132,13,146,3,149,13,163,3,166,13,
180,3,183,13,197,3,200,13,214,3,217,13,231,3,234,13,
248,3,251,13,265,3,268,13,282,3,285,13,299,3,302,13,
316,3,319,13,333,3,336,8,345,6)
OUTREC FIELDS=(1,3,ZD,TO=BI,LENGTH=1,5,2,8,4,13,4,18,2,21,8,30,8,
39,1,41,5,
47,15,ZD,TO=PD,63,15,ZD,TO=PD,
79,15,ZD,TO=PD,95,15,ZD,TO=PD,
111,15,ZD,TO=PD,127,15,ZD,TO=PD,
143,15,ZD,TO=PD,159,15,ZD,TO=PD,
175,15,ZD,TO=PD,191,15,ZD,TO=PD,
207,15,ZD,TO=PD,223,15,ZD,TO=PD,
239,15,ZD,TO=PD,255,15,ZD,TO=PD,
271,15,ZD,TO=PD,287,15,ZD,TO=PD
303,15,ZD,TO=PD,319,14) |
For example:
64,13+ '.' + 2 decimal = TTTTTTTTTTTTT.TT
Is there any better choice to do this? |
|