Example 2–%editc built-in function in rpgle Use of 3rd parameter {*ASTFILL | *CURSYM | currency-symbol} Below are the uses of these param value: *ASTFill- When *ASTFill is specified, It fills the leading zeros with asterisks(*) *CURSYM- When *CURSYM is specified, the currency sym...
Example- II –%eof built-in function in rpgle Checking successful CHAIN operation to set %EOF=*OFF In the program below we are Checking successful CHAIN operation to set %EOF=*OFF Columns . . . : 6 80 Edit AMITCC/QRPGLESRC SEU==> BIN_EOF FMT FX FFilename++IPEASF...L...A.Device...
%CHECKR function is used to find the position for non-occurrence of a character in a string from Right. The format of this function is %CHECK(comparator : base string {: Start position}) This function will return the first position of the base string that contains a characters that is not...
0010.00 C Eval Profit = Sellprice - Buyprice 0011.00 C Else 0012.00 C Eval Loss = %abs(Sellprice - Buyprice) 0013.00 C Endif 0014.00 C 0015.00 C Profit DSPLY 0016.00 C Loss DSPLY 0017.00 C Seton LR *** End of data *** Output DSPLY 0 DSPLY 10...
%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);