By submitting your email address, you agree to receive emails regarding relevant topic offers from TechTarget and its partners. You can withdraw your consent at any time. Contact TechTarget at 275 Grove Street, Newton, MA.
How to take advantage of this code
The free code is in the form of copy members (also known as header files and include files) and can be found in the QSYSINC library, which stands for 'system includes' (the word 'includes' is the C language terminology for copy member). Each language has its own file. The chart below will help you locate the file appropriate for the language you are using.Quick reference to copy files in QSYSINC
Tips for locating the proper member
Once you have determined which file you need, you'll need to locate the appropriate file member. Because there are so many copy members in each of these files and many of their names apparently have no relation to their contents, finding the right member can be tough. Try these two tricks to lessen the burden:
1. Search through the contents of all the members for the name of the API you are using (e.g., QMHRDQM). To search through all the members in a file, "open" the file in PDM (use the WRKMBRPDM command to get into PDM). Then, type option 25 next to the first member listed and press F13 (this will copy the option 25 to all the members in the list). Next, press Enter and the Search Options screen will appear, where you can type the name of the API (or any other text) you want to search for. Finally, press Enter and the system will start searching through the members.
2. A quicker, but less effective, method involves searching just the text descriptions of the members. You can do this by pressing F17 to bring up the Subset Member List screen and specify criteria to subset the list. To search the text descriptions, type in a search word for the Text field. For example, to locate members having include information for data queue APIs, type "data queue" in the Text field and press Enter.
Once you have located the appropriate member, use the "/COPY" RPG compiler directive to have the compiler copy the contents of the member into your program (COBOL programmers use the COPY statement).
About the author: Ron Turull is editor of Inside Version 5. He has more than 20 years' experience programming for and managing AS/400-iSeries systems.