- 3451. 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
- 3452. 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
- 3453. 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
- 3454. 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
- 3455. 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
- 3456. 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
- 3457. 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
- 3458. 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
- 3459. 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
- 3460. 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
- 3461. 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
- 3462. 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
- 3463. 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
- 3464. 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
- 3465. 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
- 3466. 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
- 3467. 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
- 3468. 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
- 3469. 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
- 3470. 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
- 3471. 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
- 3472. 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
- 3473. 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
- 3474. 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
- 3475. 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
- 3476. 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
- 3477. 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
- 3478. 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
- 3479. 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
- 3480. 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
- 3481. 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
- 3482. 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
- 3483. 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
- 3484. 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
- 3485. 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
- 3486. 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
- 3487. 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
- 3488. 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
- 3489. 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
- 3490. 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
- 3491. 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
- 3492. 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
- 3493. 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
- 3494. TechTalk: Low-Rent Word Processor
- (General)
- ... set up a source file called QTXTSRC in your library or in a special library just for documents. QTXTSRC is just like QCLSRC or QRPGSRC - it simply helps you organize documents by placing them in a file ...
- Created on 31 January 1991
- 3495. AS/400 Basics: Database Files
- (IBM i (OS/400, i5/OS))
- Database Files Next to CL programming, one of the greatest traumas for the new AS/400 programmer is learning about database files. RPG II programmers from the System/36 (and earlier machines) suffer most. ...
- Created on 31 December 1990
- 3496. TechTalk: Lining Up Proportional Spacing
- (System Administration)
- ... that each line without an ending position generates a warning message during compilation. The RPG compiler halts a compile when too many error messages are generated, and issues a message about a message ...
- Created on 31 December 1990
- 3497. Using AS/400 Library Lists in Parallel Environment
- (General)
- ... of any programs we are modifying in the test library. If we are only modifying an RPG program, but not the CL program which calls it, we can use the production version of the CL program. It will find the ...
- Created on 31 December 1990
- 3498. Going Native: The Field Reference File
- (General)
- ... of RPG. The field names used in each database file section, however, should be kept to a maximum of six characters if RPG is to be the main programming language. How Do I Use The FRF? Once you have taken ...
- Created on 31 December 1990
- 3499. AS/400 Basics: Program-to-Program Calls
- (IBM i (OS/400, i5/OS))
- ... in terms of RPG, but the concepts are universal for any AS/400 language. Simply Put The simplest way to think of one program calling another is to think of RPG subroutines. Usually, a subroutine is written ...
- Created on 30 November 1990
- 3500. More on Creating Commands
- (CL)
- ... That Return Values Suppose that you have a small RPG program that calculates the day of the week for any given date. This program receives the date in one parameter - a packed decimal number six digits ...
- Created on 30 November 1990