Martin,

"the data input was manual into..." means that someone actually typed the data into a field. The data is unedited and may contain mistakes. The data can not be trusted.


In this case, he needs a complete edit process either before are during the convert-to-packed process.

Tony Thigpen

Martin Truebner wrote on 10/18/2016 02:47 AM:
Greg,

the data input was manual into a 20 byte character field including $
signs, commas, and periods (ex. $13,532,908.01)

i do not understand the word "manual" in this sentence (english is not
my native language) - I assume a meaning of "prepared"
"edited", "printed into", "manual entered with verification of format"
- something that made sure it is the way it must be.

If this is really the case then

.... convert to pack decimal for additional reporting

could be easy accomplished with this

first we eliminate the leading $ sign
    TR   SOURCE,TR_KILL_DOLLAR
    MVC  FIELD15,PATTERN
    TR   FIELD15,SOURCE-1
    PACK PACKED,FIELD15

PATTERN   DC   AL1(1,3,4,5,7,8,9,11,12,13,15,16,17,19,20)
FIELD15   DS   CL15  field without dollar,comma and no period
PACKED    DS   PL8

TR_KILL_DOLLAR   DC  256AL1(*-TR_KILL_DOLLAR)
           ORG    TR_KILL_DOLLAR+C'$'
           DC     C' '
           ORG

will prepare the data from the field SOURCE as packed decimal with
two decimals in fields PACKED.

----------------------------------
even with extra overhead for a TR, I do believe it is the fastest
solution.


Reply via email to