IScript Function Call to strToLong Does Not Return Expected Result For Alphanumeric Input
(Doc ID 1265576.1)
Last updated on AUGUST 22, 2018
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 :
To view full details, sign in with your My Oracle Support account.
Don't have a My Oracle Support account? Click to get started!