Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Micros ISL Datatype Limitation?

Status
Not open for further replies.
Mar 17, 2010
78
US
Hi Micros experts,

I am working on a SIM that converts a long string into a base 32 format. Part of the formatting process is to take the modulus (%) of a numeric string. Everything works fine as long as the numeric string stays at or under 18 characters. If I try to take the modulus of a 19 character numeric string, it returns an invalid negative value.

For example, the following calculation (999931207132112226 % 32) = 2 which is correct.

If I increase the length of the numeric string by 1, the following calulation occurs:
(9999312071311124223 % 32) = 1- Which is of course incorrect.

I have tried so many different things in troubleshooting this issue, I dont think it is a logic/syntax issue in my code. I think it may just be a limtation of the data type.

Does anyone have any insight into what may be going on? Is 18 characters the limit of the mathematical calculation? Any assistance would be greatly appreciated.

Regards
 
It probably is a limitation of the data type. SIM seems like it's designed, understandably, more for dollar amount and item identification numbers than mathematics of that level. You're best bet may be to wrap your calculations up in a dll and call it from your SIM function.
 
Thanks so much for your response. I had not considered calling a dll for the work, great idea.
 
If you'd like I can post the 9700 SIM pdf. It gives a great example for a C++ DLL.

Out of curiosity pmegan, have you ever gotten a .NET DLL to work in a SIM? I know it shouldn't work for obvious reasons, but I do wonder if you ever found a way to make it work, or if you gave up and went straight to C++.
 
Nope. Thankfully I haven't needed a custom dll in years. I enjoyed C++ programming 20 years ago. These days, not so much.
 
Hey Moregelen, could you please post the 9700 sim manual for me to review when you get a chance. We are on 3700 platform but I am curious now. Thanks.
 
Here is the entire set of documentation for 9700. Most of the SIM documentation applies to 3700, though you will find that 3700's support for a lot of the things 9700 can do limited (the big one being the system variables, at least for me).


9700_SIMDB.pdf has a nice (in that I finally found some documentation on how Micros expects the DLL's to be structured) C++ DLL example.
 
Thanks so much. I will give it a read and see if it makes any sense to me.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top