These procedure converts a string to Proper-, Pascal- and CamelCase.
Continue readingTag Archives: ILE RPG
A replacement for DISPL
There are a number of shortcomings using DISPL, such as the message to display can be maximum 52 characters.
Continue readingILE RPG procedures Num2BPre() and Num2SPre() to format numbers in short form
These procedure displays numbers in short form, that is with nomination as Thousand, Millions, Miliards etc.
Continue readingILE RPG procedure PopMnu() to display a popup menu
ILE RPG procedure FindFiles() to search the IFS for files, version 2
This procedure searches the IFS tree structure (including sub-directories) for files and directories having a name that matches the mask 🙂 Continue reading
ILE RPG procedure to split a filename into name and extension
This procedure splits a filename (must be without path name) into the name and the extension.
If the filename has more than one dot, the name and extension is split at the last dot.
This is version 2 of the SplitFn() procedure.
ILE RPG procedure to convert a string to upper/lower case – fast
Please note: As of April 2021, IBM has published PTFs for V7.3 and V7.4 that gives the ILE RPG langugage two new BIF (Build In Functions) to convert to upper and lower case. Continue reading
Searching for files and objects in the IFS
The code examples in this article is based on the first version of the FindFiles() procedure. The FindFiles() procedure has been updated to Totally Free RPG and a bug have been fixed. You will find the source code, example and build script here.
I am working on a utility and I wanted to add the ability to search for files in the IFS. That is, I wanted my utility to search the entire or relevant parts of the tree structure (including sub-directories) seen from the IFS’s point of view. Had it just been a search for objects in the libraries, a DSPOBJD command could do the job. But my ambition was that the search should work anywhere in the IFS and, of cause, only find objects matching a name mask that I would provide. Sounds like a reasonable requirement, don’t you think?
ILE RPG function to split a filename into name and extension
This function splits a filename (must be without path name) into the name and the extension 🙂
If the filename has more than one dot, the name and extension is split at the last dot.