- 3201. Multidimensional Array Conversions
- (General)
- RPG lacks one feature that other languages have had for a long time- multidimensional arrays. If you need them, you can use single-dimensional arrays instead. The trick is to convert the multidimensional ...
- Created on 31 January 1995
- 3202. The Check Power Off Schedule (CHKPWRSCD) Utility
- (IT Infrastructure - Other)
- ... + PROMPT('Return Code:') PARM KWD(HOURS) TYPE(*DEC) LEN(2 0) + PROMPT('Number of hours to + Check for:') The Check Power Off Schedule (CHKPWRSCD) Utility Figure 2 RPG Command Processing Program PWR001RG ...
- Created on 31 January 1995
- 3203. AS/400 Basics: PDM's User-defined Option
- (IBM i (OS/400, i5/OS))
- ... an RPG program in batch and produces an indented listing. These are just a few user-defined options that I find useful; I'm sure you can come up with many more on your own. Customized Time-savers ...
- Created on 31 December 1994
- 3204. Duplicate Record WRITE Performance
- (RPG)
- Recently, I had to use an RPG program to write records from one file to another. The file I was writing to didn't allow duplicate records, but the file I was reading from did. I wrote my program, coding ...
- Created on 31 December 1994
- 3205. Matching Field Names
- (RPG)
- Wouldn't life be easier if the field names on the display file matched the field names in the physical file? To display the values in the database using RPG, the program would simply CHAIN to the file before ...
- Created on 31 December 1994
- 3206. Passing Parameters with the SBMJOB Command
- (CL)
- ... defines entry parameters of the same type and length as the calling program. For instance, if PGMB is written in RPG, PGMB receives the parameters in the following way: *7890123456789012345678901234567890123456789012345 ...
- Created on 31 December 1994
- 3207. Show File Keys Utility
- (CL)
- ... * To compile: * * CRTRPGPGM PGM(XXX/KEY002RG) SRCFILE(XXX/QRPGSRC) * *=============================================================== *. 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 FQAFDACCPIP ...
- Created on 31 December 1994
- 3208. V3R1 Security Enhancements
- (IBM i (OS/400, i5/OS))
- ... */ /* */ /* CRTCLPGM PGM(XXX/CHGUSRPGP) SRCFILE(XXX/QCLSRC) */ /* ...
- Created on 31 December 1994
- 3209. Handling File and Data Area Record Locks
- (Business Intelligence)
- ... (the typical user idea) cancels the job. Instead of changing the maximum record wait time on all files, why not change the default reply from Cancel to Retry? CHGMSGD MSGID(RPG1218) + MSGF(QRPGMSGE) ...
- Created on 30 November 1994
- 3210. Enhancing the Performance of Interactive Programs
- (RPG)
- ... has grown much more powerful on the AS/400 because of the changes IBM has made to RPG in the past several years. First of all, you should open a file only if you intend to use it. As you see in 1, by ...
- Created on 30 November 1994
- 3211. Closing Files at Program End
- (RPG)
- From: Mike Grawl To: All It was my understanding that when an RPG program ended with *INLR on, all files would be closed. Here is what happened. Program A is interactive and ends with *INLR on; program ...
- Created on 30 November 1994
- 3212. Search Deletions
- (RPG)
- You're probably familiar with the DELET op code in RPG, but you may not know that you can place a key or relative record number in factor 1, the search argument. If the system finds duplicate records, the ...
- Created on 30 November 1994
- 3213. Lab Notes: Improve Performance of Group Processing
- (System Administration)
- ... (e.g., the use of arrays to accumulate by group). Loading an array for this type of work was described in "The Truth About RPG Performance Coding Techniques," MC, September 1993. The fastest solution shown ...
- Created on 30 November 1994
- 3214. IBM's AS/400 Strategy: The Next Three Year
- (Analysis of News Events)
- ... include a C++ compiler and VisualAge. In a certain sense, the development tools also include traditional languages such as RPG and COBOL. IBM will provide facilities that let RPG, COBOL, and objects created ...
- Created on 30 November 1994
- 3215. The Duplicate Message Description (DUPMSGD) Comman
- (CL)
- ... Source Members INFO: DUPMSGD (QATTINFO) CDO: TAAMSGJ (QATTCMD) CPP: TAAMSGJC (QATTCL) RPG: TAAMSGJR (QATTRPG) These tools are documented in Midrange Computing's QUSRTOOL Command Reference. The manual ...
- Created on 31 October 1994
- 3216. Randomly Picking Numbers
- (CL)
- ... kicking around a few ideas, but I figure someone else has already done this. We write our programs in RPG and CL. From: Dave Shaw To: Ricky Thompson In QUSRTOOL there is a tool called GENRANNBR that ...
- Created on 31 October 1994
- 3217. Object Reference Utility
- (Change Management)
- ... The DSPOBJREF command (see 6) displays the records from the OBJRFPF file using a subfile defined in display file OBJ013DF (see 7). RPG program OBJ013RG (see 8, page 52) reads the OBJRFPF file and loads ...
- Created on 31 October 1994
- 3218. TechTalk: Using SETLL to Search Mixed-case Strings
- (RPG)
- Q: I have an RPG program in which I use a key as my search argument to set lower limits (SETLL) to a file based on user input. I then do a read to load my records into a subfile. How can I make the SETLL ...
- Created on 30 September 1994
- 3219. Modifying OS/400 Commands
- (CL)
- ... your investigation. Modifying the sample programs to work with commands other than CHGJOB will require RPG programming skills and investigation of the specific command you want to modify. Since each OS/400 ...
- Created on 30 September 1994
- 3220. Control Files in Shared Folders
- (CL)
- ... path/file to be checked out, the target folder to receive a copy of the file passed in parameter one, and a data queue name. F001RG: RPG program used to maintain the checked out files (CKOFILES) database ...
- Created on 30 September 1994
- 3221. Unlocking the Secrets of Version 3 Software Pricin
- (Analysis of News Events)
- ... AS/400 PL/1 5763-PL1 Graduated AS/400 Pascal 5763-PS1 Graduated Performance Tools/400 5763-PT1 Graduated Application Development ToolSet/400 5763-PW1 Graduated ILE RPG/400 5763-RG1 Graduated Neural Network ...
- Created on 30 September 1994
- 3222. Array Screen Fields
- (RPG)
- ... buffer as an array of quantities in the RPG program that controls the display file. The code I'm using looks similar to the code in 1. Q: I have a display screen which consists of input/output fields for ...
- Created on 31 August 1994
- 3223. Cursor-sensitive Searches
- (RPG)
- Q: I have started programming my interactive programs with cursor-sensitive searches. If the user presses a function key to perform a search, I calculate the location of the cursor. If it falls within ...
- Created on 31 August 1994
- 3224. Easy Access to Message Subfile Messages
- (RPG)
- Q: My application uses a display record format with I/O fields in which errors could occur, based on the data entered in those fields. When one or more errors occurs, the message subfile displays the errors ...
- Created on 31 August 1994
- 3225. The Work with Command Stack Utility
- (CL)
- ... The command processing program (CPP) which creates physical file CMD007PF and user space CMD007US in library QTEMP and then calls RPG program CMD007RG. CMD007RG: An RPG program which retrieves commands ...
- Created on 31 August 1994
- 3226. Selective Command Prompting
- (CL)
- ... a task. For example, let's say you frequently use the Create RPG Program (CRTRPGPGM) command. Besides the program name and source file parameters, you would like to be prompted for the ignore decimal data ...
- Created on 31 August 1994
- 3227. The Retrieve User Space Tools
- (CL)
- ... Retrieving entries from a user space is usually done from within a high-level language such as RPG or COBOL. This works well when you want to use the information to display a subfile or produce a report. ...
- Created on 31 August 1994
- 3228. V3R1 Follow-up: An Introduction to Program Binding
- (IBM i (OS/400, i5/OS))
- ... or announced for C, RPG, COBOL, and CL. For the majority of users, the significance of ILE will not be realized until the general availability of ILE RPG, concurrent with V3R1 later this year. This article ...
- Created on 31 July 1994
- 3229. Date Entry Fields
- (RPG)
- ... A DSPSIZ(24 80 *DS3) A CA03(03) A R DSP01 A MM 2Y 0B 4 10 A DD 2Y 0B 4 13 A YY 2Y 0B 4 16 A R DSP02 A CLRL(*NO) A MMDDYY 6Y 0O 4 10EDTCDE(Y) A DSPATR(UL) Date Entry Fields Figure 6 RPG Program XMS003RG ...
- Created on 31 July 1994
- 3230. Opening/Closing Files in CL
- (CL)
- ... I've found (ugly, but it works) is to put the reads in a separate CL (or RPG) program and then call it from the main program. If you do that, you can eliminate the open and close, because they're done implicitly. ...
- Created on 31 July 1994
- 3231. Message Queue Housekeeper
- (CL)
- ... create the command source member (CLROBSMSG) listed in 1, the CL program (OBS001CL) in 2 and the RPG program OBS001RG in 3. Compile the source members according to the instructions at the beginning of ...
- Created on 31 July 1994
- 3232. Creating Client/Server Applications with ODBS
- (General)
- ... anyone who is unfamiliar with event-driven GUI programming, "Visual Development Tools for RPG," MC, May 1994, covers many of the basic concepts.) In 4, we have labeled each control of our form with a letter ...
- Created on 31 July 1994
- 3233. Retrieving Four-digit Job Date
- (General)
- ... The *ISO format is YYYY-MM-DD. Is there a way I can retrieve the current year in a four-digit form? A: The RPG special word *DATE returns the job date in your job's date format with a four-digit year. ...
- Created on 31 July 1994
- 3234. Overriding Compile Listing Attributes
- (General)
- Both the Create RPG/400 Program (CRTRPGPGM) and the Create COBOL Program (CRTCBLPGM) commands have a PRTFILE parameter. This parameter allows you to specify the name of the printer file you want the compiler ...
- Created on 31 July 1994
- 3235. UIM List Panels
- (RPG)
- ... passes control to the CL program PNL002CL shown in 3. If the library exists, PNL002CL calls the RPG program PNL002RG shown in 4. The command definition for the WRKPF command is shown in Figure 2. This ...
- Created on 30 June 1994
- 3236. Strip Leading Zeros
- (RPG)
- ... except to provide a place to define the field. Since its value is never altered, it might be better if BLANKS were a constant field. Also, its length should be extended to 30 bytes since RPG can handle ...
- Created on 30 June 1994
- 3237. Correction: Numbers-to-Words Program (May 94)
- (RPG)
- In the May 1994 TechTalk, we published an RPG program (CVT001RG) that converts a numeric value to words for check writing. It accepts an eight-digit numeric value with two decimal positions (maximum value ...
- Created on 30 June 1994
- 3238. Sending Files with SNADS
- (General)
- ... a library other than the one you intended. For example, 2 shows that we're receiving an RPG source member for file QRPGSRC. With option 1, the library list is used to locate the first occurrence of file ...
- Created on 30 June 1994
- 3239. LOCKMSG Tool for COBOL
- (General)
- ... a technique for using the LOCKMSG in RPG. Unfortunately for COBOL programmers, it doesn't describe how to use the tool in COBOL. In fact, it states "The same technique cannot be used in COBOL." I was convinced ...
- Created on 30 June 1994
- 3240. Creating Subfiles with SDA
- (RPG)
- ... at the top of the source code. The Subfile in Action If you want to see your new display file run, I have provided a short RPG program shown in 7 which you can use. Here's how the program works. First, ...
- Created on 31 May 1994
- 3241. Indicatorless Function Keys
- (RPG)
- ... the worst part of programming an IBM midrange computer is using indicators. With RPG, COBOL, C or even CL, indicators are still the only way of communicating certain attributes to a display or printer ...
- Created on 31 May 1994
- 3242. Screen Edit Codes/Words
- (RPG)
- From: Randy Ward To: All I'm a little confused regarding the use of edit codes and edit words with screen fields that are both input and output. I'm writing a payroll entry program that has several numeric ...
- Created on 31 May 1994
- 3243. Program Messages and DDS Windows
- (RPG)
- Q: I have written a couple of programs using the DDS WINDOW keyword. I enjoy its ease of use and flexibility; however, I can't get my program-controlled messages to appear in the last line of the window. ...
- Created on 31 May 1994
- 3244. The Print AS/400 Calendar (PRT400CAL) Command
- (CL)
- ... resides in RPG program TAACALAR in source file QUSRTOOL/QATTRPG. The compile-time array record uses a four-digit date (MMDD) followed by a 12-character description. For example: 1225Christmas For variable ...
- Created on 31 May 1994
- 3245. Field Reference File
- (Change Management)
- From: Lee Smith To: All I am about to clean up an application left by a vendor with whom my company no longer has a business relationship. This application has about 30 physical files and about 150 RPG ...
- Created on 31 May 1994
- 3246. Query/400 Date Manipulation
- (General)
- ... Unfortunately, IBM's implementation did not include RPG programming support. I felt let down, as if a powerful programming capability had just been placed totally out of my reach. Or so I thought. I have ...
- Created on 31 May 1994
- 3247. Right-adjust or Left-adjust Subroutine
- (RPG)
- Once upon a time, it was a rather tedious task to left-adjust decimal values and right-adjust character values with RPG. Nowadays, some of the more recent operation codes make the adjustments easy. 1 contains ...
- Created on 30 April 1994
- 3248. Activate Attention Key Program
- (RPG)
- Q: I would like to change the processing of the Attention key. If an operator hits it, I want the Attention key to bring up a program instead of the Operational Assistant screen. Can you supply any ideas ...
- Created on 30 April 1994
- 3249. Enabling the Dup Key
- (RPG)
- From: Willie Moore To: All In order to activate the Dup key, the DDS manual states that you should do the following: 1. Specify, in DDS, two fields for each input-capable field on the display. Specify ...
- Created on 30 April 1994
- 3250. Numbers-to-Words Conversion Program
- (RPG)
- Nearly 10 years ago, MC-known then as Data Network-published an RPG II program written by Tim Neal. The program converted a numeric value to words, for check-printing purposes. Although a conversion routine ...
- Created on 30 April 1994