|
-
Jul 8th, 2004, 01:46 PM
#1
Thread Starter
Fanatic Member
Decimal Implied?
I got some specs for a new project and can't get a hold of the person who wrote them. Basically creating a file for an EDI project. One field I need to insert into the file is a currency field, the specs say "decimal implied". What does that mean? I take it that means I need to remove the decimal point from the dollar amount and insert it as $$$$$$$$$$¢¢ ? Does anyone know if that's right?
-
Jul 8th, 2004, 02:05 PM
#2
Frenzied Member
Well, in COBOL, a picture clause of PIC 9(6)V99 represents an 8 digit number with 2 of the digits following the decimal place, i.e.: 123456.78. The 'V' represents the position of the impiled decimal point.
Do you know if the data was created by a COBOL program? Do you know where the decimal place should be located? If it is output from COBOL, the data can be treated like a string unless the picture clause is followed by some form of COMPUTATIONAL (COMP or COMP-3) in which case it will be in binary or packed decimal. Ex. PIC 9(6)V99 COMP[UTATIONAL].
Edit:
Sorry, just reread your post and saw that you will be creating the file. In this case, assuming that the file will be read by a COBOL app, you should be able to just write out the value as a string. I don't think you want to include the $ in the string. That formatting clause is usually used for printed output. But then, without seeing the specs, I could be way off base.
Last edited by ccoder; Jul 8th, 2004 at 02:11 PM.
-
Jul 8th, 2004, 02:23 PM
#3
Thread Starter
Fanatic Member
I think that's about right. I can't really tell. The specs are pretty vague. Ah well. I forgot programmers are supposed to be mind readers as well.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|