OLAP functions : OnLine Analytical Processing functions What is online here? An online algorithm is one that can process its input piece-by-piece in a serial fashion”. So an online algorithm is one who newer have access to all data at the same time. (So it’s streaming data) Advantages- OLAP functions are specially helpful to [...]
If you need to run the same dynamic SQL statement more than once per job use the PREPARE – EXECUTE statements using EXECUTE IMMEDIATE incurs the unnecessary cost of re-preparing the SQL statement each time PREPARE is like a mini-compile of its own. If required info to PREPARE a statement is not available on COMPILE TIME than the [...]
Description This utility can write Subfile code for any given SQL select statement with little or no user interaction. It takes less than 20 seconds to write complete Subfile code. Check video at top/bottom of this page for more details.
Here is a sample code to add 2 number in Free Format RPG 0001.00 D Total S 10 0 INZ 0002.00 C *ENTRY PLIST 0003.00 C PARM Number1 5 0 0004.00 C PARM Number2 5 0 0005.00 /FREE 0006.00 Total = Number1 + Number2 ; // Get total for both input values 0007.00 DSPLY Total '*EXT' ; // Display value of Total 0008.00 *InLR = *ON; // End of program [...]
Free Format RPG was a major step towards the modernization of RPG language. This change in RPG syntax gave RPG programmers flexibility to write code which is easy to type, read and maintain. Technically Fix Format RPG and Free Format RPG are equally powerful and each one of them has its own pros and minor cons with respect to each other.
SQL is always much better than RPG for handling string data. Embedding SQL in RPG gives RPG the great power not only to handle database operations but also to perform string manipulation. For string manipulation, RPG provides some very basic functions, such as %TRIM, %SUBST, %SCAN, and %REPLACE. CISSP pdf The geology of the surrounding [...]
When you use COMMIT or ROLLBACK statements with CURSOR, the behavior of the CURSOR depends on whether or not it is declared using the WITH HOLD clause If the CURSOR is declared using the WITHOUT HOLD clause, all of its resources (cursor, locks, and large-object datatype, or LOB, locators) are released upon either COMMIT or [...]