General Page
.
.
Welcome to the RPG Cafe
Short URL for this page: https://ibm.biz/rpg_cafe
:
:
Follow the the IBM community forum for RPG
. .
. .
Announcement
- New Fall 2024: PTF enhancements for 7.5 and 7.4 :
- Find where you use 2-digit years, to avoid the "2039 problem"
- Use %PROC() in ON-EXIT
- New built-in functions %HIVAL and %LOVAL
7.4 PTFs for the Fall 2024 Enhancements:
- ILE RPG compiler: 5770WDS to be updated later
7.5 PTFs for the Fall 2024 Enhancements:
- ILE RPG compiler: 5770WDS to be updated later
- ILE RPG compiler, TGTRLS(V7R4M0): 5770WDS to be updated later
Note: The PTFs will also be available with later Db2 for i Fix Packs. See Db2 for IBM i 2024 PTF Group Schedule.
Notifications
If you want to be notified about new items in the RPG Cafe, subscribe to "Rational Development Studio for i" in "My Notifications" here: https://www-945.ibm.com/systems/support/myview/subscription/css.wss
- Enter "Rational Development Studio for i" in the Product Lookup.
- Click "Subscribe".
- Select "News" and any other categories that you're interested in, then click "Submit".
. .
. .
IBM Ideas: Request for Enhancement
Here is the list of current Ideas for RPG: https://ibm.biz/rpg_rfe. You can
- Vote for the Ideas you think are most important.
- Add Ideas to your watch list.
- Add your own comments to Ideas. If you have a use case for the Idea that is not mentioned yet in the comments, be sure to add a comment about your use case. The information in the Idea about why it would be useful is at least as important as the number of votes for the Idea.
If you don't find an existing Idea that describes what you want, open a new Idea:
- Select
Workspace IBM i Category Languages - RPG - Write the title of your Idea clearly so that other people can easily find your Idea and vote for it.
. .
. .
ILE RPG enhancements delivered through PTFs
-
Fall 2024
-
Spring 2024
-
Fall 2023
-
Spring 2023
- %PASSED and %OMITTED to test parameters
- The %SPLIT built-in function handles every separator when *ALLSEP is specified..
- The SELECT statement can have an operand. New operation codes WHEN-IS and WHEN-IN are used with the operand of the SELECT statement.
- Generate the "boolean" atribute for indicators in PCML. This enhancement is also available for 7.3.
-
January 2023
-
Fall 2022
- Convert parameters to strings with OPTIONS(*CONVERT)
- Concatenation built-in functions %CONCAT and %CONCATARR
- CHARCOUNT NATURAL mode to handle data correctly that has different-sized characters, such as UTF-8
Warning For this enhancement, a PTF for the RPG runtime is needed on the system where you compile your program and on any system where you run a program that uses the CHARCOUNT NATURAL support.
-
Spring 2022
- New messaging opcodes SND-MSG and ON-EXCP
Warning For this enhancement, a PTF for the RPG runtime is needed on the system where you compile your program and on any system where you run a program with SND-MSG or ON-EXCP.
- New messaging opcodes SND-MSG and ON-EXCP
-
Earlier enhancements
- Fall 2021: New built-in functions %MAXARR and %MINARR
- Fall 2021: Specify %FIELDS for SORTA to list the subfields for sorting a data structure
- Fall 2021: Specify DEBUG(*CONSTANTS) to debug named constants
Warning For this enhancement, a debugger PTF is needed on the system where you compile your program and on any system where you debug your program.
- Spring 2021: New built-ins %LOWER, %UPPER, and %SPLIT New built-ins %LOWER, %UPPER, and %SPLIT
Warning For the new built-in functions, a runtime PTF is needed on any system where you run your program.
- Spring 2021: EXPROPTS(*STRICTKEYS) EXPROPTS(*STRICTKEY) gives stricter rules for %KDS and a list of keys
- Fall 2020: New rules for string parameters for %DEC, %INT, and so on. New rules for string parameters for %DEC, %INT, and so on.
Warning For this enhancement, a runtime PTF is needed on any system where you run your program.
- Fall 2020: New built-ins %RANGE and %LIST, and new opcode FOR-EACH New built-ins %RANGE and %LIST, and new opcode FOR-EACH
- Fall 2020: Optionally require prototypes for exported procedures New command parameter and Control keyword REQPREXP, to optionally require prototypes for exported procedures
- Fall 2020: Debug the return value from a procedure Control keyword DEBUG(*RETVAL) to allow debugging the return value from a procedure
- Spring 2020: Microseconds for %TIMESTAMP and %TIMESTAMP(*UNIQUE): Microseconds for %TIMESTAMP and unique timestamps
Warning For this enhancement, a runtime PTF is needed on any system where you run your program.
- Spring 2020: %KDS(ds : var_num_keys): %KDS allows a variable number of keys
- Spring 2020: LIKEDS(qualified.name): LIKEDS allows a qualified name
- 2019 DATA-GEN, OVERLOAD, OPTIONS(*EXACT) for 7.3 and 7.4: Fall 2019 enhancements for RPG - DATA-GEN, OVERLOAD, OPTIONS(*EXACT)
Warning For this enhancement, a runtime PTF is needed on any system where you run your program.
- 2019 SAMEPOS keyword for 7.3: SAMEPOS keyword for 7.3 with a PTF
- 2019 Two new PSDS subfields for 7.2 and 7.3: Two new PSDS subfields for 7.2 and 7.3 with PTFs
Warning For this enhancement, a runtime PTF is needed on any system where you run your program.
- 2018 New DATA-INTO opcode for 7.2 and 7.3: DATA-INTO opcode - new for 7.2 and 7.3 with PTFs
Warning For this enhancement, a runtime PTF is needed on any system where you run your program.
- 2017 More new enhancements for 7.2 and 7.3: %PROC, more uses for complex qualified names, PCML support for varying-length
- 2017 New enhancements for 7.2 and 7.3: Nested data structures, %MAX & %MIN, ALIGN(FULL)
- 2016 New ON-EXIT section: New for RPG in IBM i 7.2 and 7.3 - ON-EXIT section to be run whenever a procedure ends
Warning For this enhancement, a runtime PTF is needed on any system where you run your program.
- 2016 New TGTCCSID parameter Compile RPG from Unicode source - new TGTCCSID parameter in 7.1, 7.2, 7.3
- 2015 Fully-free-form RPG Fully free-form RPG - new in 7.1 and 7.2
- 2015 Enhancements to improve PCML generation New for RPG in IBM i 7.1 and 7.2 - Enhancements for generated PCML
- 2014 Enhancements to add full ALIAS support and easier result data structure for I/O New for RPG in IBM i 7.1 and 7.2 - Full ALIAS support and easier result data structure for IO
- 2013 Enhancement to support free-form H, F, D and P statements, timed to coincide with 7.1 TR7. Free-form H F D P announcement
- 2011 Enhancement to add CCSIDCVT keyword: PTF enhancement for CCSID conversions
- 2011 Enhancement to improve the performance of Date and Time operations: Enhancement for Date, Time, Timestamp that can improve performance (but use with caution)
- 2011 XML-INTO options for XML namespaces: XML-INTO enhancement for namespaces and other non-RPG names
Warning For this enhancement, a runtime PTF is needed on any system where you run your program.
- 2009 XML-INTO options datasubf and countprefix: Two new options for XML-INTO with a V6R1 PTF
Warning For this enhancement, a runtime PTF is needed on any system where you run your program.
. .
. .
How To
- Article about how to write a procedure to replace the values in a string template by using OPTIONS(*CONVERT): https://www.ibm.com/support/pages/node/6982933
- A presentation about working with Unicode in RPG: Working with Unicode in RPG
- A tutorial on free-form RPG for experienced programmers new to RPG: Coding in Free-Form RPG IV - a beginner's tutorial
- Converting C prototypes to RPG: Converting C Prototypes to RPG
- Troubleshoot calls from RPG to Java™: Troubleshoot calls from RPG to Java
- Learn about RPG: https://www.ibm.com/search?q=rpg&tabType[0]=learning
- Getting the best performance for a call Getting the best performance for a call
- How to compile an RPG module or program with PCML included in the object How to compile an RPG module or program with PCML included in the object
- Article by Scott Hanson: Debug those mysterious problems with your application's memory: https://www.ibm.com/developerworks/ibmi/library/i-mysterious_application/i-mysterious_application-pdf.pdf
- A couple of articles about using Open Access with database IO A couple of articles about using Open Access with database IO
- SQL0901 logger education: New SQL Logger Enhancement
- Presentation on using Java with RPG Presentation on using Java with RPG
- Presentation on exception handling in RPG Presentation on exception handling ih RPG
. .
. .
Utilities
- Is the debugger active? Here's a procedure that you can call to find out: Is the debugger active?
- Save file with JNI utilities from the ILE RPG Programmer's Guide: JNI utilities from the RPG Programmer's Guide
- Utility to see the PCML embedded in a program or service program: See the PCML that is embedded in a program or service program
- Open Access sample programs Open Access sample programs
. .
. .
Tips
- ALIGN(*FULL), the forgotten third child of the spring 2017 RPG enhancements Why you should use ALIGN(*FULL)
- Have you heard of the /SET and /RESTORE directives? Have you heard of the /SET and /RESTORE directives
- Are you using OPTION(*NOUNREF)? If so, good! If not, read on Are you using OPTION(*NOUNREF)? If so, good! If not, read on
- Did you ever get weird errors after you called an API? Did you ever get strange errors after you called an API?
- Which is better? Divide by 2 or multiply by 0.5? Which is better? Divide by 2 or multiply by 0.5?
- Why use the TEMPLATE keyword? Why use the TEMPLATE keyword?
- Negative variable names Negative variable names
- Which is better, a return code or an exception? Which is better, a return code or an exception?
- An H spec keyword that you might be missing Keyword CCSID(*CHAR : *JOBRUN) is important
- Everyone knows what X'7D' means ... unfortunately Everyone knows what X'7D' means ... unfortunately
- RPG's "Move fields" logic, and its cousin EVAL-CORR RPG's "Move fields" logic, and its cousin EVAL-CORR
- Performance tip Performance tip
Was this topic helpful?
Document Information
Modified date:
09 October 2024
UID
ibm11106229