While searching, when the comparaters(a,b,c,d) finds a position where there is no match then that position is returned as a search result. Hence, %CHECK function is used to find the position for non-occurrence of a character in source string from right. Example –%CHECKR built-in funct...
·This built-in function is used to detect end-of file, beginning of file, or subfile full conditions while performing a file operation similar to resulting indicator. ·So, instead of checking any resulting indicator we simply use %EOF to check if the end of file is reached. ·%EOF retur...
In third output we are getting output in ¢ (Not in $). At compile time the currecy($) changes to currency(¢). Hence it is producing different output.
Columns . . . : 6 80 AMIT/QRPGSRC SEU==> TESTRPG1 FMT D DName++++++ETDsFrom+++To/L+++IDc.Keywords+++++++++++++++ *** Beginning of data *** 0001.00 D Sellprice s 5p 0 0002.00 D BuyPrice s 5p 0 0003.00 D Profit s 5p 0 0004.00 D Loss s 5p 0 0005.00 C 0006.00 C ...
%DAYS built in function in rpgle is used to convert number into days. %DAYS built in function example.
%EQUAL is used along with two operation codes SETLL and LOOKUP. We can use SETLL along with %EQUAL to check the existence of the record. Example: S_PNUM SETLL REC5 IF %EQUAL()
%TRIML built in function in rpgle is used to trim the leading spaces. %TRIML built in function example : Name = %triml (FirstName) + ' ' + %triml (LastName);