%OPEN Built-In Functions in rpgle %OPEN function is used to check to see if a file has already been opened. It returns *ON if the file is opened, otherwise it returns *OFF. In case we are using USROPN keyword in F-Spec, then during the program initialization the file will be closed...
%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...
SQL built-in functions cheat sheet is very helpful. You can use these for any embedded SQL programming language such as SQLRPGLE on iSeries(AS400), for SQL in java programs using JDBC connections. You can also query files on iSeries using STRSQL command which provides a SQL command line. ...
CHECKRINREADPESUBST ·The error will be handled using the built-in functions %STATUS and %ERROR. ·Control resumes with the next ILE RPG operation. Example – I –%error built-in function in rpgle ERROR HANDLING USING E-OPERATOR EXTENDER BUT NOT HANDLING ERROR WITH %ERROR Columns . . . :...
%STATUS built in function provides a five-digit status code that identifies the error. %STATUS built in function example: IF %ERROR() IF %STATUS(CUST)=1211 OPEN CUST ELSEIF %STATUS(CUST)=1221