× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Chuck Lewis <CLEWIS@IQUEST.NET> wrote:

>            05    CNVH-EXTDSALESTAX                PIC    9 (5) V99
>      5 numeric with 2 deciimals
>           05    CNVH-EXTFTOTALORDER           PIC    9 (5) V99
>      5 numeric with 2 decimals

 <snip>

>                    EXTDSALESTAX as numeric 7,2
>                    EXTFTOTALORDER as numeric 7,2
>
>Note the only differences are the last 2. I TRIED making them 5 with 2
>but when I bring it up in Excel to do the "mask" they are CLEARY 7 in
>length and if I do the transfer to the AS/400 it works.
>
>My question is, how do YOU interpret the last 2 fields from Unix/Cobol
>(?) to the AS/400 PF field designation ?

Chuck,

It's nothing to with Unix per se, it's bog standard COBOL. In a PIC(TURE)
clause, count the number of 9s to find the number of numeric positions. The
V indicates the position of the implied decimal point. 9(5)V99 is shorthand
for 99999V99, so there are 5 digits before the (implied) decimal point and
2 after it - 7 digits in all.

Excel is right and the erk who annotated the code is wrong.

Doesn't this exercise make you more appreciative of the brevity of RPG?
:-)

Dave Kahn, ABB Steward Ltd.


+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.