- 3101. Reusing Source Code
- (General)
- ... mean it ended up bug-free in the source member we copied it to. Another way programmers reuse source code is through compiler directives, such as the /COPY directive of RPG and Auto Report, and the COP ...
- Created on 31 March 1996
- 3102. Flexible Date Selection with OPNQRYF
- (Business Intelligence)
- ... in YYMMDD format, but you can easily modify this job to accommodate dates of other formats. Program DTF001RG, in 4, builds the dates file. Since RPG III does not have date arithmetic, it relies on the ...
- Created on 29 February 1996
- 3103. TechTalk: Getting started with the ILE Dynamic Screen Manager APIs.
- (RPG)
- ... used by ILE languages. In V2R3, the only language that could be used with the DSM APIs was ILE C/400. In V3R1, with the release of RPG IV (which operates in the ILE environment), these APIs became accessible ...
- Created on 29 February 1996
- 3104. Maximizing Performance with Client Access/400 ODBC
- (System Administration)
- ... written in C, COBOL, or RPG, for example. The source code was then precompiled, which translated the SQL statements into code that the subsequent compile step could process. One advantage of this approach, ...
- Created on 29 February 1996
- 3105. The Display User Screen Utility
- (IT Infrastructure - Other)
- ... a unique data queue in QRPLOBJ and calls the RPG program SCN001RG. To get the list of jobs, SCN001RG calls the CL program SCN002CL, which uses the Display Object Description (DSPOBJD) command to load a ...
- Created on 29 February 1996
- 3106. Working with Strings in CL Programs
- (CL)
- ... using ILE, you might want to consider converting it to an ILE RPG program. Often, the only characteristic that distinguishes the professional from the amateur is the professional's greater skill with th ...
- Created on 31 January 1996
- 3107. Programmer's Toolbo
- (CL)
- ... SNDSTSMSG MSG(*REMOVE) Programmer's Toolbox Figure 3: Sending a Status Message from Within an RPG Program I 'Please wait' C MSG * * Send status message... C MOVELMSG STSMSG 80 C CALL 'SNDSTS' C PARM ...
- Created on 31 January 1996
- 3108. The Check Stack Utility
- (CL)
- A recursive program is one that can call itself either directly or indirectly through a program it has called. Some programming languages, like CL, allow programs to be recursive. However, RPG doesn't allow ...
- Created on 31 January 1996
- 3109. The Graph Memory Utility
- (CL)
- ... 1. To accomplish its task, this utility uses a Visual Basic (VB) program on the PC side and a CL and an RPG program on the AS/400 side. In this article, I'll explain how to implement this utility and how ...
- Created on 31 January 1996
- 3110. Applying User Index APIs
- (APIs)
- ... tools that have come out in the last few years, RPG is often the fastest and most cost-effective way of extracting and formatting the data. (You probably don't want to tell your end users this, but RPG ...
- Created on 31 January 1996
- 3111. The Hierarchical File System APIs
- (APIs)
- ... ILE C/400. For those installations still managing legacy RPG III or even RPG II code, ILE seems a bit too far in the future, to say nothing of ILE C/400. Regardless, ILE C/400 does offer a useful set of ...
- Created on 31 January 1996
- 3112. TechTalk: Print graphics on the AS/400 with a PC Support conversion trick.
- (System Administration)
- ... library. You can then clear or delete the physical file that held the AFPDS output. Your image is now on the AS/400, ready for use by RPG, DDS, or the OVRPRTF command. For more information, look at IBM' ...
- Created on 31 January 1996
- 3113. Advanced AS/400 Print Programming Techniques
- (Document Management)
- ... program-described output using RPG O-specs and externally described printer files using DDS A-specs. Each approach has advantages and disadvantages; I wait to decide which approach I'll use until I know ...
- Created on 31 January 1996
- 3114. TechTalk: Change PDM's "Exit Lists on ENTER" Option to "N" to avoid losing overrid
- (General)
- A colleague of mine complained that he loses his overrides during a PDM session if he accidently presses Enter at the Work with Members screen in a source physical file, such as QRPGSRC. I understand ...
- Created on 31 January 1996
- 3115. TechTalk: Running OPNQRYF over a multiformat logical file.
- (General)
- ... and one over the detail file. They can reference the physical files or the correct formats of the logical file. 2. Run one OPNQRYF command over the header to select the invoices you want. In your RPG ...
- Created on 31 January 1996
- 3116. Subfiles Made Simple
- (RPG)
- If you are an RPG programmer on the AS/400, you must know how to code subfiles. If subfiles are one technique you have been avoiding, this article may be just the ticket for you. We will cover the basics ...
- Created on 31 December 1995
- 3117. Lab Notes: ILE Call Performance
- (RPG)
- IBM has spent a lot of resources developing ILE RPG as a means of extending the venerable language into the 21st century. With ILE RPG, IBM says you can build modular RPG programs that use routines written ...
- Created on 31 December 1995
- 3118. TechTalk: Chaining in a CL program.
- (CL)
- ... many may not be aware that it can also be used with the Receive File (RCVF) command to perform random record access, similar to CHAIN or SETLL operation codes in RPG. The way to do this is to use the ...
- Created on 31 December 1995
- 3119. The DSPRCDFMT Utility Version 2.0
- (APIs)
- ... the code that accomplishes this task. The five components to the DSPRCDFMT utility are presented in2-6. Here you'll find a command definition, a CL program, a display file, a printer file, and an RPG program ...
- Created on 31 December 1995
- 3120. Referential Integrity Error Trapping
- (General)
- ... If the referential constraint violation is not trapped, a system error message is issued. I'll illustrate referential integrity error trapping with a simple Integrated Language Environment (ILE) RPG program ...
- Created on 31 December 1995
- 3121. TechTalk: The built-in functions of the new system debugger.
- (General)
- ... debug functions to assist you in displaying variables: %SUBSTR and %ADDR. The %SUBSTR function allows you to substring a character string variable. Similar to the ILE RPG %SUBSTR operator, the first parameter ...
- Created on 31 December 1995
- 3122. Getting Started with Query/400
- (Business Intelligence)
- ... file using the Override Database File (OVRDBF) command. 2. Build an open data path (ODP) by joining the VNDRMST file to the VNDRHST file using the Open Query File (OPNQRYF) command. 3. Write an RPG program ...
- Created on 30 November 1995
- 3123. TechTalk: Dynamically Setting On Indicators
- (RPG)
- Sometimes, you have to set on a group of indicators in a range depending on a group of related conditions. For example, suppose you're doing some calculations with an array and you have to validate each ...
- Created on 30 November 1995
- 3124. The Display Save Information Utility
- (CL)
- ... information is placed into a file called SAV002PF in QTEMP. Next, the SAV002CL program retrieves the system name to place on the report and calls an RPG program to display or print the information stored ...
- Created on 30 November 1995
- 3125. Client/Server at Work
- (General)
- ... the components of the utility and how to use it. The Big Picture This program comprises several pieces that fit together to produce the final output. The main pieces are an RPG program, a VB program, ...
- Created on 30 November 1995
- 3126. OPNQRYF Demystified
- (Business Intelligence)
- ... which allows us to build Open Data Paths (ODPs) using OS/400's Query Optimizer. Properly used, OPNQRYF lets you simplify high-level language (HLL) programs, such as RPG or COBOL. OPNQRYF performs the sorting ...
- Created on 31 October 1995
- 3127. DB2/400 Stored Procedure Implementation
- (DB2)
- ... SQL equivalent of an RPG CALL. There's been a lot of confusion about stored procedures, probably because RPG programmers take the convenience of CALLs for granted. It comes as a shock to realize that, until ...
- Created on 31 October 1995
- 3128. TechTalk: OPNQRYF MAPFLDand KEYFLD
- (DB2)
- ... RPG program is using), plus the mapped field. Write your RPG program to read the dummy file. In your CL program, override the dummy file to the real file. Be sure to tell it to share the open data path?SHARE(*YES). ...
- Created on 31 October 1995
- 3129. TechTalk: CLEAR Op Code on Input-only Fields
- (RPG)
- When the RPGCLEAR operation is applied to a record-format name, only output fields in the record format are cleared; input-only fields are not affected by the CLEAR operation. If you need to use the CLEAR ...
- Created on 31 October 1995
- 3130. The Display Trigger Description (DSPTRGD) Command
- (CL)
- ... in the outfile, TRG002CL displays the subfile through a series of SNDF and SNDRCVF commands, very similar to RPG WRITE and EXTFMT operations. Check It Out If you're using triggers and you want a way to ...
- Created on 31 October 1995
- 3131. User-defined Pop-up Menus
- (CL)
- ... mentioned, the actual functions that appear in the window depend upon the records entered into the REQ001PF file. Breaking Down the Code The code for the display file, REQ001DF (see 3), and the RPG ...
- Created on 31 October 1995
- 3132. Tools from the Trenches
- (Change Management)
- ... report ID, and number of copies?uniquely keyed on USER and RPTID. You would use this file to store information about reports. Next, you would need a simple RPG program, like the one in 2, to retrieve ...
- Created on 31 October 1995
- 3133. TechTalk: Is the Subsystem Active?
- (System Administration)
- ... (CPP) for CHKSBSSTS is RPG program SBS001RG (see 13). Here, I'm using the QWDRSBSD API to retrieve the status of the subsystem. However, you can retrieve much more information about subsystem descriptions ...
- Created on 31 October 1995
- 3134. The Run Remote PC Command Utility
- (General)
- ... When it is successful, it returns to the RPG program, CMD010RG (5), which opens the file and displays the contents through the DSPPFM command. If you want more detail on how this utilility works, read ...
- Created on 31 October 1995
- 3135. TechTalk: Character-to-Numeric Conversion
- (General)
- ... 5: Character-to-Numeric Conversion Program *=============================================================== * To compile: * * CRTRPGPGM PGM(XXX/CVT003RG) SRCFILE(XXX/QRPGSRC) * *=============================================================== ...
- Created on 31 October 1995
- 3136. The Work with Save File Objects (WRKSAVFOBJ) Utility
- (IT Infrastructure - Other)
- ... be used to retrieve information about the contents of the save file. The SAV001CL program then calls an RPG program (SAV001RG), which performs the main processing for this utility. Before I discuss the ...
- Created on 31 October 1995
- 3137. DB2/400 Trigger Implementation
- (DB2)
- ... You can write a trigger program in any high-level language (e.g., RPG, COBOL, or C), and they can contain embedded SQL statements. You can also write trigger programs in CL. A simple example of a trigger ...
- Created on 30 September 1995
- 3138. The Archive Documents Utility
- (CL)
- ... into our archived documents file named ARCDOCPF. The second part of the utility is a simple subfile selection RPG program over the ARCDOCPF summary file we created in the previous example. Figures 5, ...
- Created on 30 September 1995
- 3139. TechTalk: Converting Objects to Database Files
- (System Administration)
- ... to the AS/400, you reverse the process. To help you carry out this procedure, a set of tools in the QUSRTOOL library (CPYTOSAVF and CPYFRMSAVF) uses RPG programs to convert the save files to database ...
- Created on 30 September 1995
- 3140. The Nature of Objects in Applications
- (General)
- ... What does "event-driven" really mean? Some answers will be provided in the next installment of "The Nature of Objects." Rares Pateanu is the manager of RPG development for IBM. He can be reached through ...
- Created on 30 September 1995
- 3141. Automatic Messaging with MAPI
- (General)
- ... is simply an RPG program that puts the updated customer record into a data queue. For more information on triggers, see "Referential Integrity & Triggers in DB2/400" (MC, November 1994). On the client ...
- Created on 30 September 1995
- 3142. DB2/400 Referential Integrity
- (DB2)
- ... updates the database. Whether you use an RPG program, a client/server application, a DFU, or a query, the rules are enforced. ? RI reduces redundant code, and the remaining code is more standardized because ...
- Created on 31 August 1995
- 3143. Introduction to Sockets
- (General)
- ... beyond convincing UNIX sites to migrate to the AS/400. If that happens, we may see the ability to use Sockets from ILE RPG and other ILE languages. That would be a big step in making the AS/400 the "open" ...
- Created on 31 August 1995
- 3144. Sound Off for Soundex
- (General)
- ... this article follows the last method, stripping all redundant sounds after compression. The RPG Code 2 contains the ILE RPG program SDX001RG, which executes my Soundex algorithm. SDX001RG accepts a ...
- Created on 31 August 1995
- 3145. Subfile Scroll Bars
- (General)
- ... that displays a list of state codes. The display file (SCR002DF) can be found in 2, and the RPG program (SCR002RG) can be found in 3. This example was run on a PC using IBM's PC400 emulation connectivity ...
- Created on 31 August 1995
- 3146. TechTalk: CODE/400
- (General)
- ... if you want to edit an RPG/400 program, look in the file RPG400.LXL that is loaded before the source member. In this file, you'll find information such as which macro is assigned to which key. To make ...
- Created on 31 August 1995
- 3147. Advanced Join Techniques Using OPNQRYF
- (Business Intelligence)
- ... SHPQTY, and the calculated field, VARQTY. RPG program SHP001RG is coded to read SHP001PF, but the OVRDBF to the primary join file (ORDD) makes it read the data extracted by OPNQRYF instead. The JFLD (Join ...
- Created on 31 July 1995
- 3148. TechTalk: Workstation Data Management Tips
- (RPG)
- ... line turnaround. ? If you're outputting only to a display station, be sure to use the Defer Write-DFRWRT(*YES)-keyword. An RPG WRITE operation forces a line turnaround unless DFRWRT is also issued. -Thomas ...
- Created on 31 July 1995
- 3149. TechTalk: Subfile Paging
- (RPG)
- ... file: *. 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 A N99 ROLLUP(66) A 99 SFLEND(*MORE) RPG program: *. 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 C READ QDBXREF 99 ...
- Created on 31 July 1995
- 3150. TechTalk: CL Subfiles
- (CL)
- Try this method to simulate a load-all display subfile with file positioning in CL.3-6 show the code for a Territory Inquiry program as an example of how this can be accomplished. 7 shows the results. ...
- Created on 31 July 1995