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...
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.
·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 Real scenario, we can see many examples where we need to generate reports with amount fields in the form $12,345.67-, $12,345.67CR, '***12345.67-' instead of displaying the amount as -12,345.67 In those report generation program, we can use %EDITC Function and can generate the out...
·For the LOOKUP operation, this function returns '1' if an element is found that exactly matches the element in factor-1. Example – I –%equal built-in function in rpgle %EQUAL for SETLL operation 0138.00 C FILLWND BEGSR 0139.00 C EVAL RRN1=0 ...
%TRIML built in function in rpgle is used to trim the leading spaces. %TRIML built in function example : Name = %triml (FirstName) + ' ' + %triml (LastName);