- 3451. TechTalk: Floating Brackets for Negative Numbers
- (System Administration)
- I recently had a fun problem. One of our accountants wanted to put brackets around negative numbers. I quickly added a compare to zero, setting on an indicator and hard-coded brackets when the indicator ...
- Created on 31 October 1991
- 3452. TechTalk: Printer Files
- (System Administration)
- ... what they looked like. Currently, I write the print file, pray it is correct, write the RPG code, then test the program. If changes need to be made in the DDS for the print file, then I need to re-compile ...
- Created on 31 October 1991
- 3453. A Look at REXX
- (General)
- ... programs, such as CL or RPG, there is no checking to determine if you have passed required parameters. For example, if you compile a CL program that specifies a parameter on its PGM statement, and then ...
- Created on 31 October 1991
- 3454. The Correcting Compiler
- (General)
- ... hundreds of other messages that you might want to change. The problem is, how to identify those messages? My first impulse was to simply print the QRPGMSG message file, so I did. This was 27 pages long. ...
- Created on 31 October 1991
- 3455. TechTalk: Easy Access to Compile Errors
- (General)
- ... numbers. Editor's Note: We have tested this technique and found that it works for member types CLP, RPG, PLI, PF, LF, DSPF, PRTF and CMD. We didn't test any others. While SEU shows the compile listing ...
- Created on 31 October 1991
- 3456. TechTalk: Faster LOKUP
- (General)
- As an RPG III and RPG/400 user, I have always wondered why IBM cannot give us an operation that would search an array starting from any array index and backwards to element 1. This would reduce processing ...
- Created on 31 October 1991
- 3457. TechTalk: S/36 to AS/400 Numeric Fields
- (General)
- ... programs (on the S/36) that define a screen field as both numeric and alpha--the field is specified twice in the RPG program. Can the AS/400 handle that? The reason for doing this is so the program can ...
- Created on 31 October 1991
- 3458. TechTalk: Random Number Generator
- (General)
- ... by the command. Editor's Note: For the most theoretically accurate random number generator, see the RPG subroutine RANDSUBR published in the December 1986 article, "Random Number Generator." ...
- Created on 31 October 1991
- 3459. When Was the Last Time...?
- (IT Infrastructure - Other)
- ... DATE') * A K SORT1 DESCEND A K SORT2 DESCEND A K ODLBNM A K ODOBNM A K ODOBTP When Was the Last Time...? Figure 4 RPG program OBJ007RG FQADSPOBJIP E K DISK FOBJ007WFO E DISK A * I DS I 1 6 MMDDY ...
- Created on 31 October 1991
- 3460. File I/O Through Data Structures
- (General)
- How do you define frustration? I'm sure you could think of several definitions, but maybe one definition is, "having to run System/36 RPG on an AS/400." No external file definitions. No WRITE and UPDAT op ...
- Created on 30 September 1991
- 3461. TechTalk: Super Debugging!
- (General)
- When using interactive debug on an RPG program, sometimes it's convenient to place a breakpoint somewhere besides on an executable C-spec. For instance, with program-described files you can place a breakpoint ...
- Created on 30 September 1991
- 3462. Saving and Restoring Spool Files
- (IT Infrastructure - Other)
- ... leftmost characters of the field. The name of the RPG program we'll change is TAASPLHR. In the code for TAASPLHR, all of the modifications have been noted with a ===> in the first four positions of each ...
- Created on 30 September 1991
- 3463. Gotcha! Likewise, My Friend
- (RPG)
- I make frequent use of the RPG *LIKE DEFN operation, as I enjoy the increased security of defining work fields properly. There is, however, a very subtle consideration with *LIKE that caused me quite a ...
- Created on 31 August 1991
- 3464. Relational Database Design -- Part 2
- (Change Management)
- ... name should not be limited by the restrictions of the method of implementation (i.e., six-character names in RPG). * A description that fully describes the purpose of the data element. The type of data, ...
- Created on 31 August 1991
- 3465. In My Opinion: SAA and Its Impact on the AS/400
- (Commentary)
- ... because RPG was not included in SAA. We assumed that RPG was not a strategic language and, furthermore, that we should not be programming in it, despite the fact RPG was and still is the dominant language ...
- Created on 31 August 1991
- 3466. Display Key Fields
- (General)
- ... to KEY001W2 for each record, this time adding records instead of replacing them. After that, RPG program KEY001RG takes over. Its job is to format the output and present the information on the display ...
- Created on 31 August 1991
- 3467. Know Your Source Members
- (CL)
- ... has to call an RPG program to print the information it needs. So you write member LSTRTNAUT in QRPGSRC. Now you compile LSTRTNAUT from QCMDSRC, LSTRTNAUT from QCLSRC, and LSTRTNAUT from QRPGSRC. This ...
- Created on 31 July 1991
- 3468. TechTalk: Comparing Objects Against Source
- (CL)
- ... a problem. The utility consists of command Compare Objects and Source (CMPOBJSRC, 4a), two CL programs (OBJ006CL and OBJ006CLA, in4b and 4c), and an RPG program (OBJ006RG, 4d). This helps to identify ...
- Created on 31 July 1991
- 3469. APIs and the Anatomy of a User Space
- (APIs)
- ... to create a user space rather than including an OS/400 command. Parameters used to call this program are shown in 1. Key in the external physical file as shown in 1, and reference it in RPG programs as ...
- Created on 31 July 1991
- 3470. A List API Processor
- (APIs)
- ... file. These files are not meant to store any data, but by keeping the definition on the system as a file, we can reference it in our programs as an external definition. In RPG programs, we can reference ...
- Created on 31 July 1991
- 3471. DSPRCDFMT -- An API Alternative to DSPFFD
- (APIs)
- ... have to do. RCD002RG, a RPG program shown in 4, is then called to retrieve the list of fields from the user space. Depending on the user's request, this information -- along with the access path information ...
- Created on 31 July 1991
- 3472. C and APIs -> What's the Point
- (General)
- ... come face-to-face with a totally new concept of programming for us RPG and COBOL coders -- pointer-based languages. Most of the Release 3.0 APIs work fine with RPG or COBOL, and even CL, but the inference ...
- Created on 31 July 1991
- 3473. TechTalk: Checking the Program Stack
- (General)
- ... This process can continue indefinitely, calling program after program and never returning to the caller. There is a problem, however. In some HLLs such as RPG, program C cannot call program B or A (which ...
- Created on 31 July 1991
- 3474. A REXXample
- (APIs)
- ... meanings for the extended attribute, you can designate anything you wish. (Examples of extended attributes on program and file objects: Programs have extended attributes of RPG, CBL, C, etc.; files have ...
- Created on 30 June 1991
- 3475. TechTalk: Reducing Printing Volume
- (System Administration)
- With minimal effort, any user can drastically reduce the amount of unneeded printed material. Take, for example, a 150-page RPG compiler listing. By routing the compiles to an inactive output queue, they ...
- Created on 30 June 1991
- 3476. In My Opinion: What IBM Should Do About S/36 Shop
- (Commentary)
- ... enhancements (SPE's), IBM has upgraded SSP 5.1 and 6.0, hereby providing external RPG Call/Parm (which has existed for COBOL for some time), and enhancing communications and connectivity features. Apparently, ...
- Created on 30 June 1991
- 3477. Compiling the Easy Way
- (General)
- ... of compilable source member and are not release dependent. Hocus Pocus To give you a clear idea of what the utility will do for you, let's suppose your RPG program MYLIB/PGM001 uses the LOKUP operation ...
- Created on 30 June 1991
- 3478. TechTalk: Hard-coded Library Names are Bad News
- (General)
- ... of the RTVOBJD command to retrieve the library name. For example, suppose you want to create a duplicate object of a file called WKFILE into QTEMP, then call an RPG program. You could use the program shown ...
- Created on 30 June 1991
- 3479. DDS Error Message Utility
- (CL)
- ... DDS Error Message Utility Figure 3 RPG program ERR001RG FQDDSSRC IF F 92 DISK KINFDS INFDS FQSYSPRT O F 132 OF PRINTER E #OVR 1 1 51 E #MSG 1 1 42 IQDDSSRC NS I 19 19 #AST I 20 28 #IND I 29 29 #RFMT ...
- Created on 31 May 1991
- 3480. Going Native: AS/400 Equivalents to S/36 OCL
- (CL)
- ... RPG's IFxx operation will execute all the statements following it whenever the test is positive, until an ELSE or an END is reached. CL does have this capability; you simply run the DO command to indicate ...
- Created on 31 May 1991
- 3481. Real Life APIs
- (APIs)
- ... it in the RPG program. The equivalent function can be programmed with APIs. In order to program this function, you need to use three APIs in RPG, and four if you choose to process using pointers in a ...
- Created on 31 May 1991
- 3482. TechTalk: Managing Document Storage
- (System Administration)
- ... command. 3b has the CPP (program FLR001CL), which uses the DSPFLR command to create an outfile which is then read to create another outfile with one record for each document. 3c is RPG program FLR001RG, ...
- Created on 31 May 1991
- 3483. TechTalk: Commands with Optional Return Parameter
- (General)
- ... SNDPGMMSG MSGID(&MSGID) MSGF(QCPFMSG) MSGDTA(&MSGDATA) + MSGTYPE(*ESCAPE) ENDPGM TechTalk: Commands with Optional Return Parameter Figure 4C RPG program DB001RG Figure 4c: The DB001RG Program ....1.... ...
- Created on 30 April 1991
- 3484. Customizing the Sign-on Display
- (IT Infrastructure - Other)
- by Ernie Malaga You don't have to settle for a boring, ho-hum sign-on display. Add pizzazz, make it interesting! Making modifications to the sign-on display is as easy as the proverbial piece of cake ...
- Created on 30 April 1991
- 3485. AS/400 Basics: Overall Look at a Few Basics
- (IBM i (OS/400, i5/OS))
- ... the dump, you can pencil in on your source, listing the values. For RPG, you'll especially want to be aware of the indicators. However, if the problem isn't in the calculations, but is in the input of output ...
- Created on 31 March 1991
- 3486. Going Native: AS/400 Library Management Commands
- (General)
- ... commands (QCMDSRC), CL programs (QCLSRC), RPG programs (QRPGSRC), and so on. Condensing Libraries and Allocating Space It may seem like an odd starting point, but let's talk about the CONDENSE procedure ...
- Created on 31 March 1991
- 3487. Query Management
- (SQL)
- ... and QM Procedures. The Callable Interface, or CI, is for use in the HLLs -- C, COBOL and RPG. QM procedures are for true SAA programming and are available across SAA platforms. CL commands, which are most ...
- Created on 31 March 1991
- 3488. TechTalk: Securing Procedures in S/36E
- (Security - Other)
- ... 1b. CHECKUSR puts the procedure and user name in the LDA , then calls an RPG program named CHECKUSR, shown in 1c. The RPG program uses the procedure and user name as the key to the file USERAUTH. If that ...
- Created on 31 March 1991
- 3489. Where Has All My DASD Gone? - Library List Utility
- (IT Infrastructure - Other)
- ... ended. After some additional trimming, WRKSYSSTS now shows a healthy 81% usage. PRTLIBSIZ uses a CL program, three RPG (or PL/I) programs, and two externally- described files. Let's review them in turn. ...
- Created on 31 March 1991
- 3490. AS/400 Basics: System Values
- (IBM i (OS/400, i5/OS))
- ... the date; that character is also used when you use the "Y" edit code in RPG programs. System Control There are a few system values for System Control that you may want to investigate. One of the problem ...
- Created on 28 February 1991
- 3491. Gotcha: Differences With DO Between S/36 and AS/4
- (RPG)
- ... call of duty, and this gets it into trouble very quickly: RPG0121 is issued, which reads "The array index is invalid (C G S D)." Taking option D (for Dump) generates a printout that lets you examine the ...
- Created on 28 February 1991
- 3492. Freedom of Choice in C-Compilers
- (General)
- Stacking C/400 against the competition -- Diploma/C by Don Denoncourt For a decade, the midrange product line has given us few alternatives for programming languages. RPG and, to a lesser extent, COBOL ...
- Created on 28 February 1991
- 3493. Treating Library Lists As Objects
- (General)
- ... 3.0: CRTCMD CMD(xxx/CHGLIBLOBJ) + PGM(xxx/LIBL001CL) + SRCFILE(xxx/QCMDSRC) + PMTOVRPGM(xxx/LIBL003CL) What's Your Excuse? Ted Holt showed you two months ago how to take advantage of the library list ...
- Created on 28 February 1991
- 3494. TechTalk: Avoiding the AS/400 S/36 Environment
- (General)
- ... had to do was stop development on S/36 projects and turn to the conversion, it would be a marvelous idea. Your programmers would learn all about RPG/400, external file descriptions, CL programming, and ...
- Created on 28 February 1991
- 3495. TechTalk: Scanning with PDM
- (General)
- ... a field in database file FILEA and consequently need to change all the RPG programs that use that file. Nothing could be simpler: FNDSTRPDM STRING('FILEA') + FILE(MYLIB/QRPGSRC) + MBR(*ALL) + OPTION(*CMPL) ...
- Created on 28 February 1991
- 3496. AS/400 Basics: The Copy Commands
- (IBM i (OS/400, i5/OS))
- ... rather than programs. That way, I can make changes in OCL, rather than having to recompile RPG programs. Either of these techniques let us select and add to existing files, but I have always preferred ...
- Created on 31 January 1991
- 3497. Gotcha: Restricting DDS Field Name Lengths
- (RPG)
- One serious limitation of the RPG language is that variable names cannot be longer than six characters. This limitation tends to prevent names from having much meaning, or at least clear meaning. When ...
- Created on 31 January 1991
- 3498. Developing and Installing International Systems
- (Change Management)
- ... force the RPG compiler to understand what date format UDATE is in, and adjust UMONTH and UDAY accordingly. It also means you need to maintain two copies of your source. 2) Perfect, but a little involved: ...
- Created on 31 January 1991
- 3499. Going Native: Local Data Area and Switches
- (General)
- ... parameters on the back burner. The LDA is a bit more complicated to code in native, but the concepts are the same. In this article we will see how the LDA can be used in CL and RPG/400 programs. If you ...
- Created on 31 January 1991
- 3500. TechTalk: You can Use Just One Source File
- (General)
- If you use the Programming Development Manager (PDM) but still use the traditional source file names, QRPGSRC, QDDSSRC and QCLSRC, you may find yourself jumping from source file to source file as you ...
- Created on 31 January 1991