IScript Function Call to strToLong Does Not Return Expected Result For Alphanumeric Input
Last updated on OCTOBER 25, 2013
Applies to:Oracle Communications Billing and Revenue Management - Version 220.127.116.11.0 and later
Information in this document applies to any platform.
***Checked for relevance on 25-Oct-2013***
How to workaround when function call strToLong does not return the expected result for alphanumeric input?
strToLong ---> This function converts a string value to a Long value.
Returns the string converted to a Long value if the function is successful.
Returns 0 if the string is not a valid Long value.
But after applying this function to the string "598*111" the return value its 598.
When the expected result its 0 for "598*111" as it's not a valid Long
1) Provide the below iScript : (ISC_Rakesh.isc)
if ( fileOpen (out, "/pinhome/pin7911/opt/ifw/test1.txt", "w" ) == true )
fileWriteStr ( out, "Hello World!\n" );
val = strToLong("598*111");
fileWriteLong ( out, val );
getting the below output :
Sign In with your My Oracle Support account
Don't have a My Oracle Support account? Click to get started
My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms