Solved

%DEC fucntion in FREE format getting error

Posted on 2010-08-18
10
633 Views
Last Modified: 2013-12-06
I'm getting a size error and don't see why it is happening.  

Thank you for you help.

-dec-error.doc
0
Comment
Question by:lynn_harris
  • 5
  • 5
10 Comments
 
LVL 27

Expert Comment

by:tliotta
ID: 33471100
Since you haven't supplied any source example, we can't see why either.

We need to see the failing instruction (all of it), as well as the definitions of any variables used in the entire instruction. The actual error message (including the message identifier) might also be needed.

Tom
0
 

Author Comment

by:lynn_harris
ID: 33471139
Hi Tom.  All the information is in the attachment.  Thanks
0
 
LVL 27

Expert Comment

by:tliotta
ID: 33471155
Ah! Now I see the attachment -- it's just not in a format that I can use at the moment. A Word .DOC with embedded images wasn't expected. Just a minute...

Tom
0
 

Author Comment

by:lynn_harris
ID: 33471172
Thanks, Tom.   For next time.  What would be a better format?  Lynn
0
 
LVL 27

Expert Comment

by:tliotta
ID: 33471249
Simple answer is that WKPCT can only hold a maximum value of 9.9999. It can't hold 1000, which is what you have in PAPCT.

Just for a debug test, change the value of PAPCT to be '00001' just before the problem instruction fails. WKPCT should result in 1.0000 after the instruction. Then try PAPCT='0.100'; WKPCT should become 0.1000.

The precision and decimal-position values are not used in parsing the character string; they are used in providing the result value. The character string is parsed for exactly what characters are in the string. The definition says that a decimal point is optional in the string -- if one isn't supplied, the value will be an integer value.

Try WKPCT = %dec(PAPCT:5:0)/10000 ;

Tom
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 27

Accepted Solution

by:
tliotta earned 500 total points
ID: 33471273
Lynn:

Nothing wrong with the document. It was just unexpected. It's unusual for anyone to go to that much trouble. Practically speaking, it was excellent. The attachment area isn't always an "eye-catcher", obviously not for me! I'd have noticed it quicker if the question had mentioned "...in the attachment", but that might say more about me than the question.

Tom
0
 

Author Closing Comment

by:lynn_harris
ID: 33471319
Thanks
0
 

Author Comment

by:lynn_harris
ID: 33471338
Ah... I thought the parsing would use the decimal value when enter.  I am new to free format.  Thank you very much!!

I tend to put in as much info as possible.   Have a great night!
0
 
LVL 27

Expert Comment

by:tliotta
ID: 33471416
BTW, the (...:5:0)/10000 is purely for the actual value that was in the error condition! I suspect that if you think about what %dec() does and how the definition of "function" fits into everything here, you'll see both future possibilities as well as potential snags. E.g., what if PAPCT comes in with the character "01.01"?

Given the error value, you could more easily simply define PAPCT as a 5-digit, 4-decimal zoned field and not use %dec() at all. But then there are other potential errors...

And note that the original question is technically unrelated to /free-form. The coding is essentially the same in fixed format.

Tom
0
 

Author Comment

by:lynn_harris
ID: 33471451
Good points.  Hmmm...  thanks again.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Windows 7 does not have the best desktop search built in. This is something Windows 7 users have struggled with. You type something in, and your search results don’t always match what you are looking for, or it doesn’t actually work at all. There ar…
Windows 10 is here and for most admins this means frustration and challenges getting that first working Windows 10 image. As in my previous sysprep articles, I've put together a simple help guide to get you through this process. The aim is to achiev…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now