Home

User Manual - Harkins Audit Software

image

Contents

1.
2. 201 256 010411 52500 11 11 11 153 ALL ALLS 256 1 FERRE EE ET FE AE HE HE FEFE E AE EA FE FE EE EA EE EEA HE HE A HE FE FE FE HEHEHE ea a 101 FEAE HE HE HEHE E HE FEFE EE THEE HE FE E HE FE FE AE HE FE EE E HE FE FE AE HE FE FE AE HE HE FE FE FE HE FE FE FE HE HE FE FE E HE FE FE FE HE BERE FE AE E HE FE FE IEEE FE FE FE AE AE AE HE EEE FE EE HE HEHEHE HE HEHHE 201 256 1 101 2 MOVSW 2 Pu MOVSW1 3 4 MOVSW2 4 MOVSW3 5 NES MOVSW4 5 A HLD1 A UDATE 120906 BLANK 15 MOVSW2 4 MOVSWA 5 8 9 D HLD1 A MOVSW2 4 1 UPDREC 1 583 C MOVE VAR ALL VAR ALL VAR ALL 584 C MOVE VAR ALL VAR ALL VAR ALL
3. 010522 27600 11 11 12 861 336 AUDIT RPGIV eval starting in extended factor 2 010522 27700 11 11 12 861 337 C eval answer expmdy expyy 010522 27800 11 11 12 861 11814 11807 7 338 000917 27900 11 11 12 862 339 C EVAL STSC BLANKS 010730 28000 11 11 12 862 342 C movel I Qyes 1 010730 28300 11 11 12 862 1 343 C movel It Q1stline 1 010730 28400 11 11 12 862 T 344 C setoff 33 010730 28500 11 11 12 862 345 C IF lstline yes and 01 010730 28600 11 11 12 862 1 1 346 C IN33 OFF AND 01 050118 28700 11 11 12 862 0 347 C INLR OFF 01 050118 28800 11 11 12 862 0 348 C movel 2 hold2 1 01 010730 28900 11 11 12 862 2 349 C ENDIF EO1 010730 29000 11 11 12 862 351 C dou lstline yes or BO1 PDDD 010814 29200 11 11 12 862 308 C IN33 OFF BO1 PDDD 010814 29300 11 11 12 862 353 C movel 3 hold2 1 01 010730 29400 11 11 12 862 3 354 C enddo EO1 PDDD 010814 29500 11 11 12 862 355 C movel 4 hold2 1 010730 29600 11 11 12 862 4 356 AUDIT RPGIV 010522 29700 11 11 12 862 357 C eval IN50 ON 010522 29800 11 11 12 862 1 358 C eval in55 OFF 010710 29900 11 11 12 862 0 359 C eval IN55 OFF 010710 30000 11 11 12 862 0 360 C eval in 60 ON 010710 30100 11 11 12 862 1 361 C eval IN 60 ON 010710 30200 11 11 12 862 1 362 C eval IN OFF 010710 30300 11 11 12 862 00000000000000000000000000000000000000000000000000000000
4. ZSPGMOIR Real Time Program Audit for RPG V4R3 Date 6 04 07 PHH Detailed Job Record Time 16 46 08 Program NEWEXPSH New Expected Ship Date from Order Detail RPGIV Status 8 EXPAND RPG COMPILED OK F10 Express Y Type options press Enter 5 Display Compile listing P PDF Compile listing Opt Job Job 3 Records Submitted Completed Elapsed Input 139567 1 001 6 04 07 16 42 57 6 04 07 16 42 59 2 Insert 139568 5 209 6 04 07 16 43 03 6 04 07 16 43 05 2 Expand 139570 6 210 6 04 07 16 43 06 6 04 07 16 43 10 4 Source File QRPGLESRC Object Lib ZSAUDITE Record formats 6 Copybooks Y Library ZSAUDIT Audit JOBQ RTPA Printer Files 2 RPG Ver 4 RPGLE Audit OUTQ Extension Sparms From To Audit JOBD LIBL Subroutines 7 free Y From To JOBD Libr Overflow OE Indent From To SD SEG From To Prototype From To F3 Exit F13 Files Recds F14 Fields F15 Operations F16 Variables F17 Labels F19 Called Pgm F21 Cond Oper F22 Indicators F23 Pre audit C 2000 2002 Harkins Audit Software Inc Figure 2 3 RTPA Expanded Job Detailed Information screen Pressing Command Key 19 displays all called programs from this expanded program Expanding these called programs will provide RTPA program audits of these called programs when the NEWEXPSH expanded object program is executed Expanding all the application source programs in a source file and library with the RTPA genetic program name ALL will audit enable all programs executed in a job
5. 294 C m CABEQ 090100 DONE 000000 24100 17 38 35 568 301 C Z ADD br OORDER 000000 24800 17 38 35 568 1500 302 C Z ADD vu OLINE 000000 24900 17 38 35 568 Results 309 C pores MET chain orderde 2 25 S NOT FOUND ph234 000000 25500 17 38 35 568 7 3 000550 COLINE OE ODITEM Y2430 ODPRIC xxx o gb Vae ee rA M ees dam 20051 C EXFMT NEWEXPD1 000000 23700 17 38 3 ac END E01 ph235 000000 26000 17 38 35 570 E C EXFMT NEWEXPD2 000000 49400 17 38 3 318 C odexpd ifne zero CHECK FOR ZERO BO1 ph543 000000 2800 17 38 35 570 200811 E C EXFMT NEWEXPD2 000000 49400 17 38 3 319 C z add odexpd expnd 40 MADD 01 ph543 000000 26600 17 38 35 570 1 200511 E C NEWEXPD1 000000 23700 17 38 3 E um o eii on expyy Sn e guum ss C EXFMT NEWEXPD1 000000 23700 17 38 3 S HM vers kuuza gas WN EET E C EXFMT NEWEXPD2 000000 49400 17 38 3 322 C ssp add expyy expndy MNDDYY 01 000000 26900 17 38 35 571 12 CE E C EXFMT NEWEXPD2 000000 49400 17 38 3 T 7 38 35 GE Si ree answer 70 27400 17 38 35 71 EP C EXFMT NEWEXPD1 000000 23700 17 38 3 328 C ai answer emi expyy 000000 27500 17 38 35 571 E C NEWEXPD1 000000 23700 17 38 3 331 c eval answsr expndy expyy 000000 27800 17 38 35 571 E C EXFMT NEWEXPD2 000000 49400 17 38 3 333 C EVAL STSC BLANKS 000000 28000 17 38 35 571 E C EXFMT NEWEXPD2 000000 49400 17 38 3 we mel 73 fe 3 00000 398200 TL SN C EXFMT NEWEXPD1 000000 23700 17 38
6. Work with All Spooled Files Type options press Enter 1 Send 2 Change 3 Hold 4 Delete 5 Display 6 Releas 7 Messages 8 Attributes 9 Work with printing status Device or Moral Ga Opt File User Queue User Data SES Pages Page Copy NEWEXPSH PHH OPRINT RDY 36 1 NEWEXPSH PHH OPRINT RDY 142 1 QPRINT2 PHH QPRINT2 NEWEXPSH RDY ji 1 PHH OPRINT NEWEXPSH RDY iL 1 5 ZZAUDITP PHH OPRINT NEWEXPSH HLD 53 1 ZZAUDITP PHH QPRINT BATCHPGM1 HLD 1 1 Bottom Parameters for options 1 2 3 or command gt F3 Exit F10 View 4 F11 View 2 F12 Cancel F22 Printers F24 More keys Figure 2 8 Display ZZAUDITP audit output of program NEWEXPSH The spool file shows the compile listing for the NEWEXPSH input source program 36 pages and for the NEWEXPSH RTPA audit enabled compile listing 142 pages from the RTPA expand of the input soutce program The NEWEXPSH program produces two out print files QPRINT2 and QPRINT RTPA for RPG produces a ZZAUDITP audit report of 53 pages showing every executing source statement the data processed and the exact time the statement was executed RTPA for RPG also audits all called programs from the expanded source program if the called programs have been also expanded by RTPA Program BATCHPGMI is audited because it was also previously expanded by RTPA and is called from program NEWEXPSH on page 22 of the audit output Review the NEWEXPSH 53 page entry of the spool fil
7. er Ose see tcm Program CVTTOHEX Convert Character to Hex Data in PF DATAFILE Obj Lib ZSAUDITE Initiated 6 12 08 CVTTOHEX CVTTOHEX Job 894756 User Profile PHH Source Type RPGLE Y Source File Library QRPGLESRC Line Dof SrcId 2l Source program example from www rpgworld com 27 read datafile File 00002 Key DATA 1234567890ABCDEFGHIJ 29 dow not eof datafile 24 convert character to hex 25 SzH ex c data s B01 1234567890ABCDEFGHIJ 1234567890ABCDEFGHIJ 26 eval result szHex FIF2F3F4F5F 6F 7F 8F 9FOC1C2C3C4C5C6C7C8C9D1 FIF2F3F 4F5F 6F 7F8F 9FOC1C2C3C4C5C6C7C8C9D1 23 if szHex blanks 01 F1F2F3F4F5F6F7F8F9FOC1C2C3C4C5C6C7C8C9D1 28 convert hex to character 01 29 cvtch szChars szHex len TrimR szHex B02 F1F2F3F4F5F6F7F8F9FOC10C2C3C4C5C6C7C8C9D1 F1F2F3F4F5F6F7F8F9FOC1C2C3C4C5C6C7C8C9D1 30 eval result szChars 1234567890ABCDEFGHIJ 1234567890ABCDEFGHIJ S endif 02 32 read datafile 02 File Key DATA KLMNOPORSTUVWXYZ 24 convert character to hex 25 cvthc szHex data len data 2 B01 KLMNOPQRSTUVWXYZ KLMNOPORSTUVWXYZ 26 eval result szHex D2D3DA4D5D6D7D8D9E2E3EA4E5E6E7E8E9405A7C7B D2D3D4D5D6D7D8D 9E2E3E4E5E6E7E8E9405A7C7B 27 if szHex lt gt blanks 01 D2D3D4D5D6D7D8D9E2E3EA4E5E6E7E8E9405A7C7B 28 convert hex to character 01 29 cvtch szChars szHex len TrimR szHex 02 D2D3D4D5D6
8. ZSPGMOIR Real Time Program Audit for RPG V4R3 Date 6 04 07 PHH Select Program to Audit mes 17817847 Type choices press F10 Input Source Member Name NEWEXPSH Name generic ALL F4 List cq a QRPGLESRC Name Nene o o e s ec ZSAUDIT Name olg ee ise Lilbreasy s s o o KSAUDITE Name Gea es M EM PGM MOD Ape File QEG a o e e SAME Name SAME Mie ALEE REGES o s s o s s 15000 199999 ORD eo COMP Eme wu LIBL JOBD Library Namera Name Audit Compile Listing Stmts EO 1 99999 Only to to TO to F1 Help F3 Exit F4 Prompt F5 Refresh F6 Auditing Options F7 Compile Options F10 Submit Fll Advanced Auditing F24 More Keys Ready for advanced auditing Figure 5 2 Program NEWEXPSH is ready for selection of audit information The programmer may now use the command keys to selectively audit the program variables files subroutines operation codes subroutines etc confirming each selection with F5 to accept Using the F16 Command Key to audit desired variables In addition only executing source statements with the selected variables or Operation codes may be optionally audited In the following screen the F16 command key was pressed to select some variables for auditing Only the vatiables selected with Y will have their data values shown in the audit output 81 RTPA for RPG User Manu
9. RTPA for RPG User Manual 91 45 c Eval balle om ji 46 c Return Figure 7 4 RTPA audit of R5R4 Operation code eval corr evaluate corresponding Only the leftmost 80 characters of the ZZAUDITP audit output are shown Pre Audit Conditionals Conditionals are audited after they are executed As a result conditionals that evaluate as not true are not included in the audit file For that reason selecting Y for Pre Audit Conditionals causes RTPA to also audit conditionals prior to evaluation The result is that false conditionals are displayed Arithmetic Operations Arithmetic operations ate audited after the entire expression is executed If a vatiable value is changed during the expression the changed value 1s shown For example Auditing Calculation Comment statements RTPA always shows comments that are on audited source lines as part of the audited source statement Optionally comment statements on separate calculation source statements may be included in the RTPA audit output The RTPA default is to audit calculations comment statements Including comments in the audit output may help in understanding executing code particularly if the RPG code is generated from a code generator Each audited calculation comment statement required four Z audit source statements in the expanded source program in library Z AUDITE The default option is to audi
10. F3 Exit F5 Refresh Subfile F12 Cancel C 2000 2002 Harkins Audit Software Inc Figure 4 21 iRTPA command without a keyed program name submits the last source name expanded iRTPA TEST expands all RPG programs in the source file and library starting with TEST 67 RTPA for RPG User Manual iRTPA ALL expands ALL RPG programs in the source file and library Expanding all the RPG source programs in an applications effectively provided RTPA program auditing for all RPG application programs executed at all levels of execution in the program call stack Using the RTPA Maintenance Menu to manage RTPA The RTPA Menu provides the Company using RTPA auditing and each User using RTPA auditing with useful features for managing auditing Note Command Key 24 on the Main RTPA selection screen may be pressed to toggle the RTPA command key features at the bottom of the screen The RTPA Maintenance Menu is accessed by pressing command key 9 at the RTPA main selection screen ZSPGMOIR Real Time Program Audit for RPG V4R3 Date 6 04 07 PHH Select Program to Audit Tages 1781158957 Type choices press F10 Input Source Member Name NEWEXPSH Name generic ALL F4 List BascsNdmese e e mua ORPGLESRC Name ibn ZSAUDIT Name Olojexe to luleweuty s s s s s e ZGRNUDIT Name Grea ECNS C sP GM PGM MOD Audie mak TE OWE Name SAME Mersa
11. Figure 7 3 RTPA Job Audit Options overrides for this expansion only Press F5 to apply the Job audit options overrides then F10 or F11 to submit the RTPA expansion Note Programmer default Audit Options and overrides for all RTPA expands are maintained using the Option 2 of the RTPA Maintenance Menu 89 RTPA for RPG User Manual The first set of options allow you to include or exclude certain operations For your convenience the operations have been grouped as follows Arithmetic Branch ADD BEGSR ADDDUR CAB DIV CAS EVAL ENDSR EXTRCT EXSR MULT GOTO MVR TAG SUB SUBDUR TIME XFOOT Z ADD Z SUB EVALR EVAL CORR Conditional External CHECK CALL CHECKR CALLB COMP CALLP DO IN DOU OUT DOW PARM ELSE RETURN END ENDFOR ENDSL FOR IF ITER LEAVE LEAVESR LOOKUP MONITOR OCCUR ON ERROR OR OTHER SCAN SELECT TEST TESTN WH WHEN File O CHAIN CLOSE DELETE EXCEPT EXFMT OPEN READ READPE SET UNLOCK UPDATE WRITE Move CAT CLEAR MOVE MOVEAX RESET SETOFF SETON SUBST XLATE In addition virtually all IBM RPG V5R3 and V5R4 executable operation codes and BIFs are audited by RPTA for RPG For example the V5R4 operation code eval corr RTPA for RPG User Manual 90 Display Spooled File 200 DSa DS rielo xote 34 DSb borde 919 35 44 exit program EE f aim Free Fonn iorder ic
12. 14 14 14 14 14 14 14 14 14 14 File Control Find d Level Start Time 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 ORDLINE Program ORDERINQ Displays ORDERINQ Line Source Statement Program ORDERINQ Reports ORDERINO Line Source Statement ORDERINQ End 27 27 odio 026 043 28 28 28 29 29 29 297 29 29 32 32 32 32 32 575 585 594 085 114 235 254 656 704 388 441 589 652 752 ZZAUDITS 8 ow sane 41 o 3 Oso Display Spooled File ORT B E 000150000001000000ABC STORES STORE 522 Displays produced in the program with variable names and Display outpu Reports produced in the program with variable names and Report Output Call Level Cross reference of Logical Job Type CLP RPGLE RPGLE RPGLE SOLRPG RPGLE SOLRPGLE CBL CBLLE CLP CLLE RPGLE RPG SOLRPGLE CBL CBL Level gt Q N S O Q QQ O O Or QI 3 Q N P Program ORDERINQ NEWEXPSH BATCHPGM1 BATCHPGM2 TESTSOL TESTFREE CUSTSQL TESTCOB5 TESTCOB7 CLPTEST5 CLLETEST8 TEST3 SELECWH CUSTSOL TESTCOB5 TESTCOB7 Program Description Order Inquiry of expected Ship Date CLP driver New Expected Ship Date from Order Detail RPGIV batch program with call to another batch program Batch RPGLE program calling SOLRPG RPG3 program Test SQLRPG RPG3 program Test Free form
13. The FTP of the PC file to the AS 400 should take about ten seconds Restore the object RTPA40B1 From the AS 400 type RSTOBJ OBJ ALL SAVLIB QGPL DEV SAVF SAVF RTPA40B1 Run the installation program From the AS 400 type CALL QGPL IRM 23 RTPA for RPG User Manual Step 2 Enter the RTPA for RPG License Key Please Email paulhark aol com for a 30 Day free RTPA license Key From the command line type RTPA Tab to the License Key area Enter the license key and press Enter RTPA 1 30 08 V4R3M0 License Key Authorization License Key This License Key is INVALID please contact www harkinsaudit com 888 350 9148 or paulhark aol com 610 431 1755 for an updated Key F3 Exit Copyright C 2000 by Harkins Audit Software Inc Figure 1 3 RTPA License Key Authorization Screen The software is now loaded on the iSeries computer and ready to use Note In some cases the software may already have a key loaded as part of the distribution package In these cases you will not see the License Key Authorization screen This screen will automatically appear when an evaluation license expires You may contact the sales department to obtain evaluation license keys at any time without having to reload the software How to create a PDM User defined Option for RTPA A final RTPA installation step may be optionally accomplished
14. Time of execution 44 RTPA for RPG User Manual Creating an Audit Overview RTPA is a software utility that programmers use to create audits of their programs It may be useful to think of RTPA as a pre compiler because the bulk of its work is done prior to compiling the object RTPA s process is remarkably simple 1 RTPA analyses the source code and creates a new temporary source code file called the audit enabled source code containing both the source code and audit statements 2 RTPA compiles the audit enabled source code with the regular compiler The resulting object is an audit enabled executable object program 3 When the audit enabled executable object program is initiated interactive or batch the executable itself produces an audit output file which we normally refer to as an audit file or audit Audit Enabling A Program Using the RTPA interface a programmer selects source files for auditing chooses what types of auditable information to include in the audit file and the conditions under which the information should be audited The default is to include all information under any condition Once the software and options are selected RTPA temporarily creates an audit enabled source file in QTEMP RTPA then compiles the audit enabled source program using the OS 400 compiler putting the audit enabled executable object into the library that you selected on the main screen Producing an Audit File When
15. 010118 44900 11 10 54 990 509 THIS ROUTINE CAUSES THE WRONG CUSTOMER TO BE DISPLAYED 010118 45000 11 10 54 990 510 IF THE ORDER DETAIL FILE HAS BEEN UPDATED TWICE AND ONLY TWICE 010118 45100 11 10 54 990 511 FIND THE ERROR ON THE AUDIT REPORT BY SCANNING FOR 2050 010118 45200 11 10 54 990 512 C UPDREC IFEQ 2 BOL 010118 45300 11 10 54 990 0 521 C ENDIF E01 010118 46200 11 10 54 990 523 010118 46400 11 10 54 990 524 C CUSKEY CHAIN CUSTREC1 30 000717 46500 11 10 54 990 N30 00010000000001 CUCUST 0001000 CUSTOR 0000001 CUNAME ABC STORES INC CUAD1 423 MONTGOMERY AVENUE CUAD2 CUSTA PA 11 10 48 733 PAGE 525 C z add all 1 aa 30 050102 46600 11 10 54 991 111 526 C z add all 2 bb 30 050102 46700 11 10 54 991 222 527 C z add all 3 cc 30 050102 46800 11 10 54 991 333 528 C z add all 4 dd 3 0 050102 46900 11 10 54 991 444 529 C z add all 5 ee 30 050102 47000 11 10 54 991 555 530 C z add all 6 ff 30 050102 47100 11 10 54 991 666 531 C z add all 7 gg 30 050102 47200 11 10 54 991 777 532 C z add all 8 hh 30 050102 47300 11 10 54 991 888 533 C z add all 9 ii 30 050102 47400 11 10 54 991 999 534 C z add zeros total 80 050102 47500 11 10 54 991 0 536 total aa bb cc dd ee ff gg hh ii 050102 47700 11 10 54 991 130 RTPA for RPG User Manual 4995 111 222 333 444 555 666 777 888 999 538 c eval total aa bb cc dd ee ff gg hh 05010
16. output report line 060319 6600 11 10 13 610 88 except prtfre 01 030207 6700 11 10 13 623 89 reade scust custmast 01 030207 6800 11 10 13 623 1000 0001000 CUCUST 0001000 CUSTOR 0000522 CUNAME ABC STORES STORE 4522 CUAD1 231 70TH STREET CUAD2 CUCITY NEW YORK CUSTA NY CUZIP 10021 86 fstore custor 01 030207 6500 11 10 13 623 522 522 87 output report line 060319 6600 11 10 13 623 88 except prtfre 01 030207 6700 11 10 13 623 89 reade scust custmast 01 030207 6800 11 10 13 623 1000 0001000 90 enddo EO1 030207 6900 11 10 13 623 91 monitor BOL 030207 7000 11 10 13 623 92 on error x01 030207 7100 11 10 13 623 93 endmon E01 030207 7200 11 10 13 623 95 eval cucust 1000 030207 7400 11 10 13 624 1000 96 eval custor 522 030207 7500 11 10 13 624 522 97 chain custkey custmast chain on file name 030207 7600 11 10 13 624 00010000000522 CUCUST 0001000 CUSTOR 0000522 CUNAME ABC STORES STORE 522 CUAD1 231 70TH STREET CUAD2 CUCITY NEW YORK CUSTA NY CUZIP 10021 98 if found custmast BOL 030207 7700 11 10 13 624 99 gotname cuname 01 030207 7800 11 10 13 624 ABC STORES STORE 4522 ABC STORES STORE 522 100 gotadl cuadl 01 030207 7900 11 10 13 624 231 70TH STREET 231 70TH STREET 101 gotad2 cuad2 01 030207 8000 11 10 13 624 102 gotcity cucity 01 030207 8100 11 10 13 624 NEW YORK NEW YORK 103 except prtrec 01 030207 8200 11 10 13 624 104 update custrec update 01 031014 8300 11 10 13 624 CUCUST 0001000 CUSTOR 000052
17. 010522 35100 11 11 14 064 411 AUDIT RPGIV EXTENDED FACTOR 2 CONDITIONAL AND OR COMPLEX STATEMENTS 010602 35200 11 11 14 064 412 C Z ADD 2 COUNTER 010602 35300 11 11 14 064 2 413 C Z ADD 7 answer 010602 35400 11 11 14 064 7 414 C Z ADD zero final 72 010607 35500 11 11 14 064 00 415 C Z sub zero sum 61 010704 35600 11 11 14 064 0 416 C Z ADD 3115 total 80 010604 35700 11 11 14 064 3115 417 C Z ADD 112 net 30 010607 35800 11 11 14 067 112 418 C IF COUNTER 0 B01 010602 35900 11 11 14 067 2 419 C OR COUNTER 2 B01 010602 36000 111 11 14 067 2 420 C OR COUNTER 4 B01 010602 36100 11 11 14 067 2 421 C AND ANSWER 7 B01 010602 36200 111 11 14 067 7 446 C CCCC DIFFERENCE 160 EXTRA 010617 38700 11 11 14 067 7 12 1444 20 87 447 C 188 INTERIM EXTRA2 010617 38800 11 11 14 067 1229 85 105 448 C 33 15 GROSS 010617 38900 11 11 14 067 163 23 449 C MORE 010617 39000 11 11 14 067 17 00 452 C 44 GROSS EXTRA2 010617 39300 11 11 14 067 163 23 105 422 C Z ADD 3 COUNTER 01 010604 36300 11 11 14 068 3 423 C ENDIF EO1 010602 36400 11 11 14 068 424 C sum add total final 010604 36500 11 11 14 068 0 3115 3115 00 425 C eval final answer counter 5 010602 36600 11 11 14 068 15 00 7 3 144 RTPA for RPG User Manual PAGE 426 C eval sum 4 6 2 1555 010602 36700 11 11 14 068 1563 0 427 C eval final answer counter 010610 36800 11 11 14 068 21 00 7 3 428 C eval final answer counter 010610 36900 11 11
18. 153 153 153 154 154 154 154 154 154 154 154 154 154 154 154 154 156 156 156 156 100 200 100 200 100 200 ODREQD 20000317 611 WRITE UPDATED ORDER DETAIL TO A WORK FILE 000402 55200 11 11 11 160 612 C CLEAR ODETWRK 000402 55300 11 11 11 160 613 C Z ADD ODORD WDORD 000402 55400 11 11 11 160 1500 1500 614 C Z ADD ODLINE WDLINE 000402 55500 11 11 11 160 2 2 615 C Z ADD ODCUST WDCUST 000402 55600 11 11 11 160 1000 1000 616 C Z ADD ODSTOR WDSTOR 000402 55700 11 11 11 160 1 1 132 RTPA for RPG User Manual 617 C MOVEL ODITEM WDITEM 000402 55800 11 11 11 160 2430 2430 618 C Z ADD ODPRIC WDPRIC 000402 55900 11 11 11 160 25 15 25 15 619 C Z ADD WDOTY 000402 56000 11 11 11 161 3 3 620 C Z ADD ODREQD WDREQD 000402 56100 11 11 11 162 20000317 20000317 11 10 48 733 PAGE 621 C Z ADD ODEXPD WDEXPD 000402 56200 11 11 11 162 20070118 20070118 622 C Z ADD ODSHPD WDSHPD 000402 56300 11 11 11 163 0 0 623 C Z ADD ODINV WDINV 000402 56400 11 11 11 163 0 0 624 C MOVEL ODSTAT WDSTAT 000402 56500 11 11 11 163 625 C MOVEL ODX WDX 000402 56600 11 11 11 163 627 WRITE ORDERWK 000402 56800 11 11 11 163 628 C WRITE ODETWRK 000402 56900 11 11 11 163 WDORD4 0001500 WDLINE 00002 WDCUST 0001000 WDSTOR 0000001 WDITEM Y2430 WDPRIC 0002515 WDQTY 0000003 WDREQD 20000317 WDEXPD 20070118 WDSHPD 00000000 WDINV 0000000 WDSTAT O WDX 630 NESTED IF STATEME
19. Create As PGM PGM MOD Audit File Outq SAME Name SAME Max Audit Pages 15000 i 99999 Audit Compile Listing Stmts to 1 99999 Only to to to EO F1 Help F3 Exit F4 Prompt F5 Refresh F6 Auditing Options F7 Compile Options F10 Submit Fll Advanced Auditing F24 More Keys submitted Press F18 to see status Figure 5 4 Program NEWEXPSH submitted for expansion in advanced auditing RTPA for RPG User Manual 83 Chapter 6 Working with Audit Files When you execute an audit enabled program the program creates an audit file as part of its own operations This chapter explains how to use these files Reading Audit Files WRKSPLF and PDF files Audit files are sent to the printer queue ZZAUDITP The audit files are identified the name of the executed program in the data field Use the IBM command WRKSPLF to display the audit file Type WRKSPLF Go to the bottom of the spool file listing to get the most recent files Tab next to the file that you want to view and select option 5 to display the compile listing Select option P to display the compile listing as a searchable PDF if the appropriate IBM programs are available After opening the audit file with WRKSPLF you can use the Display Spooled File s powerful FIND capability to scan the audit file by e Any of the fields in the audited source statement e The data contents of variables in the audited source statement e The exact time the sou
20. D J 010703 65700 11 11 32 479 34 10 6 18 719 C DO 13 I 30 B01 010624 66000 11 11 32 479 1 720 C Z ADD I D I 01 010624 66100 11 11 32 479 1 1 721 C ADD 32 D I 01 010624 66200 11 11 32 481 33 722 C D ADD 23 D2 I 01 010624 66300 11 11 32 481 33 56 723 C D ADD D2 I D3 I 01 010624 66400 11 11 32 481 33 56 89 11 10 48 733 724 C D MULT D2 D4 01 010624 66500 11 11 32 481 33341806231236121212121212 056000000000000000000000000000000000000 18480000000000000000000000000000000000000000000000000000000000000000000000000000 725 C 2 MULT D I WORK5 51 01 010624 66600 11 11 32 481 33 66 0 726 C D I MULT 5 WORK7 72 01 010624 66700 11 11 32 481 33 165 00 727 C I IFEQ 5 B02 010624 66800 11 11 32 481 1 730 C END E02 010624 67100 11 11 32 481 731 C D 1 IFEQ 7 B02 010624 67200 11 11 32 481 33 734 C END E02 010624 67500 11 11 32 482 735 C D I IFEQ D2 I B02 010624 67600 11 11 32 482 33 56 736 C D 2 OREQ D2 3 02 010624 67700 11 11 32 482 34 0 737 C D2 I ANDNE D3 I 02 010624 67800 11 11 32 482 56 89 738 C D4 I ANDEQ D3 3 02 010624 67900 11 11 32 482 1848 0 741 C END E02 010624 68200 11 11 32 483 742 C D I IFEQ 9 B02 010624 68300 11 11 32 483 33 745 C END E02 010624 68600 11 11 32 483 719 C DO 13 I 30 B01 010624 66000 11 11 32 483 2 720 C Z ADD I D I 01 010624 66100 11 11 32 483 2 2 721 C ADD 32 D I 01 010624 66200 11 11 32 483 34 722 C D I ADD 23 D2 I
21. DSA crorclase ar 1 9 54105 3 1500 26 2 a IDSet Ord SE 1654 321 000091931234567897654321000123456 Zi DSo ls cueliriec cents sv ncrurs SIS ds Qualified Dom bondens 8 0 inz 0 Dons 9 2 ima Door dere P720 26 rorder G 3 sie 0 2 w elele alin epbeillikicsel IDS kasami DONG Eval DSa aorder 1500 1500 29 Eval DSa xorder 1234 ASA OWES 3X0 Eval DSa iorder 7654 7654 321 Sb Eval DSa rorder 123 123 456 File ZZAUDITP Page Line Control Columns Find s pror qeu semen RE Te DES UP RES EG E Program ESTEVALCOTest Eval corr corresponding ESTEVALCO TESTEVALCO Joss 056773 User Proruiles Il Linet 12 Time Timen 155006 13 audit the RPGLE V5R4 new Op code eval corr 14 DSa is a qualified data structure iS DSa ds Qualified 16 aorder 8 0 inz 0 J y sexo J 2 uma Jig Orden Y 3 saa LS vegueelese 3 iaz 567 659 call 456 fill qualifed DS DSb field border 37 V5RA op code eval corr evaluate corresponding L 78 A Olorj kile Soves and rorder correspond with DSb DS 000015001234567897654321000123456 38 c eval corr DSb DSa 39 qualified DS names DSb 40 c z add DSb border 9193 41 c z add DSb xorder 1234567 89 42 z add DSb iorder 7654 321 43 c z add DSb rorder 125456 wor wor 1234567 wor k80 9199 oe 89 k73 16554 321 wor k63 123 456
22. The RTPAQ command is entered for RTPA Query display and summatization of audit output The RTPA audit output of executing source programs and the data for variables used in the audited executing source program statements id to the printer file ZZAUDITP There is a separate ZZAUDITP spool printer file for each separate audited program The WRKSPLF command is used to select and display the ZZAUDTIP audit spool files for review RTPA for RPG User Manual Work with All Spooled Files Type options press Enter 1 Send 2 Change 3 Hold 4 Delete 5 Display 6 Releas 7 Messages 8 Attributes 9 Work with printing status Device or Meran GU Opt File Usen Queue User Data SES Pages Page Copy ZZAUDITP PHH OPRINT ZSTESTIN HLD 1 1 ZZAUDITP PHH OPRINT NEWEXPSH HLD 63 1 ZZAUDITP PHH OPRINT BATCHPGM1 HLD JL 1 ZZAUDITP PHH OPRINT CAP TIS SUUS HLD 1 1 ZZAUDITP PHH OPRINT CLLETESTS HLD 1 1 ZZAUDITP PHH OPRINT TESTS HLD 1 1 Bottom Parameters for options 1 2 3 or command F3 Exit F10 View 4 F11 View 2 F12 Cancel F22 Printers F24 More keys Figure P 1 RTPA Audit output ZZAUDITP created from the execution of call Z TESTIN CLP RTPA Query for PDF of all Job audit output by Execution Time The Real Time Program Audit RTPA Query product brings together all selected ZZAUDITP audit output spool files for a Job together in a spool file ZZAUDITS by the moment in time that the program was execute
23. This could be executed daily or periodically to cleanup RTPA work files and to clear the RTPA expanded Library Z AUDITE Note All object programs and modules in the RTPA expanded library Z AUDITE are deleted when CALL ZSCLRFIL is processed RTPAAudit output in Character and Hexadecimal HEX RTPA audit output is to the audit file ZZAUDITP which is character format for both the source program statements and the data RTPA audit output of data may be in both character format and in Hexadecimal format in RTPA Query by selecting the Hexadecimal option 75 RTPA for RPG User Manual RTPA converts the audit output data from the normal character format to Hexadecimal by using the convetsion code as illustrated in the RPGLE CVTTOHEX sample program then converts the Hexadecimal to over and under format in the RTPA Query audit output RTPA only show Hexadecimal for special characters by translating upper case letters lower case letters numbers and the editing characters to blanks before converting data lines to hexadecimal Thus RTPA Query audits data in both character and hexadecimal format where the data is special characters Columns 6 100 Edit ZSAUDIT QRPGLESRC SEU gt CVTTOHEX ENE IBS SYASIOSCIOISHELEEHEIESERESESEHESESESESESESESESESEHESEHEESERESESEREREREAESERESESESESERESESESESESESESEHESEHESESESEHESESEHESEHESEREHEHEHEAEAEAEHHCO
24. This iRTPA command is vety useful and quick when testing the same program or programs with full RTPA auditing 63 RTPA for RPG User Manual The blindly fast current System i processors and the forthcoming System i Power6 and Powet7 processors allow for virtually instant RTPA expansion of a program or selected generic programs and thus provide for virtually instant full electronic program auditing of all programs in an application Like the RTPA Command the iRTPA command optionally allows the program Name or genetic program name to also be keyed irtpa testfree expands RPG source program TESTFREE irtpa test expands all RPG source program beginning with TEST irtpa ALL expands all RPG source program in the source file The expanded object library and other RTPA main screen defaults from the last RTPA expand for the User are used together with the RTPA User profile defaults MAIN 15 08 Main Menu System APPCON Select one of the following 1 User tasks 2 Office tasks 3 General system tasks A Hikes Lild ensuies and rrolders 5 Programming 6 Communications 7 Define or change the system 8 Problem handling 9 Display a menu 10 Information Assistant options 11 iSeries Access tasks 90 Sigma GLE Selection or command gt irtpa testfree F3 Exit F4 Prompt F9 Retrieve F12 Cancel F13 Information Assistant F23 Set initial menu Figure 4 17 Selection of the i
25. each and shows the contents of the screen variables and variables Thus RTPA for RPG auditing shows and records the time the user took to enter the data and to press the enter key or a command key and RTPA records exactly what was keyed The user changed the order line number KLINE from 1 to 2 and took a little over 3 seconds to press Note that RTPA auditing shows the contents of all variables processed the status of all command keys used and the contents of KLISTS and Parameters NEWEXPD1 INO3 0 IN42 0 KORDER 0001500 KLINE 00001 UDATE 120906 TIMEN 111048 NEWEXPD1 INO3 0 IN42 0 KORDER 0001500 KLINE 00002 UDATE 120906 TIMEN 111048 281 282 C Z ADD 283 C Z ADD 284 285 DISPLAY HEADING SCREEN 286 287 C DISPO1 TAG 288 289 C Z ADD 290 C MOVEL 291 C Z ADD 292 C Z ADD 293 C MOVEL 294 C Z ADD 295 C TIME 296 C EXFMT INO3 0 IN42 0 KORDER 0001500 296 C EXFMT INO3 0 IN42 0 KORDER 0001500 297 TEST F3 298 C INO3 CABEQ 0 300 C UDATE CABEQ 120906 the enter key 296 C EXFMT 296 C EXFMT 297 TEST F3 298 C INO3 CABEQ 0 ON DONE 051007 051007 000323 000323 23700 11 10 48 761 WRITE 23700 11 10 54 917 READ 23800 11 10 54 917 23900 11 10 54 917 Figure 2 10 Audit Output of NEWEXPSH showing the data keyed and the elapsed time to enter it RTPA for RPG User Manual 39 RTPA auditing from the input source statement and the input program compile listing provides powerful capa
26. output report line except prtfre reade scust custmast enddo monitor on error endmon eval cucust 1000 eval custor 522 chain custkey custmast if found custmast gotname cuname gotadl cuadl gotad2 cuad2 gotcity cucity except prtrec iorder chain on file update custrec update endif eval custor 999 chain custkey custmast if found custmast gotname cuname gotadl cuadl gotad2 cuad2 gotcity cucity except prtrec endif is no store 999 chain on file t r name name RTPA for RPG User Manual 119 84 84 0094 00 end of free formne 0095 00 end free 0096 00 c eval rorder iorder 98 0097 00 c 13 5 porder 0098 00 c eval cucust 1000 0099 00 c cucust setll custrec 0100 00 read by record name 0101 00 c cucust reade custrec 0102 00 c in84 doweq off 0103 00 c except prtrec 0104 00 c cucust reade custrec 0105 00 c enddo 0106 00 c eval inlr on 0107 00 exit program 0108 00 c return 0109 00 free 0110 00 sorder max porder iorder xorder 0111 00 end free 0112 00 c moveit begsr 0113 00 c eval movesw2 11 0114 00 c endsr 0115 00 oqprint e audstr 2 01 0116 00 o 8 TESTFREE 0117 00 o udate 18 0118 00 o times 28 i 0119 00 o 70 Test Free Form RPGIV 0120 00 audit input record 0121 00 o e prtrec 1 0122 00 o cucust z 7 0123 00 o custor z 15 0124 00 o cuname 42 0125
27. 01 010604 40200 11 10 54 972 5 462 C endif EO1 010604 40300 11 10 54 972 463 w w 010604 40400 11 10 54 972 11 10 48 733 464 C Z ADD 2 COUNTER 010615 40500 11 10 54 972 2 465 C Z ADD 7 answer 010615 40600 11 10 54 972 7 466 C Z ADD 14 2 999999 62 010615 40700 11 10 54 972 14 20 467 C IF COUNTER 0 and gggggg 5 and B01 010615 40800 11 10 54 972 2 14 20 468 C COUNTER gt 5 AND B01 010615 40900 11 10 54 972 2 469 C COUNTER 3 OR ANSWER 6 AND B01 010615 41000 11 10 54 972 2 7 470 C COUNTER 2 B01 010615 41100 11 10 54 972 2 471 C OR COUNTER 2 B01 010615 41200 11 10 54 972 2 472 C AND ANSWER 7 OR B01 010615 41300 11 10 54 972 7 473 c ANSWER 5 B01 010615 41400 11 10 54 972 7 474 C Z ADD 3 COUNTER 01 010615 41500 11 10 54 987 3 475 C ENDIF E01 010615 41600 11 10 54 987 416 a 010615 41700 11 10 54 987 010615 41800 11 10 54 987 478 AUDIT RPGIV MOVEL PADDED WITH BLANKS STATEMENT 010522 41900 11 10 54 987 479 C MOVEL ALL M TESTML 20 001029 42000 11 10 54 987 MMMMMMMMMMMMMMMMMMMM 480 C MOVEL P LEFT TESTML 001029 42100 11 10 54 987 LEFT 129 RTPA for RPG User Manual PAGE 481 010330 42200 11 10 54 987 482 all lower case statements 010330 42
28. 11 11 11 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 ODPRIC 0002515 ODQTY 0000003 48 48 48 48 48 48 48 48 48 48 48 48 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 ODREQD 20000317 761 761 761 761 48 761 761 48 761 761 761 761 761 761 761 761 WRITE 917 READ 917 917 917 917 917 917 917 917 918 918 918 918 918 918 931 316 C if not amp found BO1 ph234 030504 25700 11 10 54 931 319 C END E01 ph235 030504 26000 11 10 54 931 320 000909 26100 11 10 54 931 322 DID GET ORDER DETAIL RECORD 000323 26300 11 10 54 931 323 CONVERT ODEXPD FORMAT YYYYMMDD TO PEXPSH FORMAT MMDDYY 000317 26400 11 10 54 931 324 C odexpd ifne zero BO1 ph543 030504 26500 11 10 54 931 20051126 325 C z add odexpd expmd 40 01 ph543 030504 26600 11 10 54 931 20051126 1126 326 C odexpd DIV 10000 expyy 20 001029 31100 11 10 54 931 20051126 5 327 C expmd mult 100 expmdy 6 0 01 010330 26800 11 10 54 932 1126 112600 125 RTPA for RPG User Manual PAGE 328 C expmdy add expyy expmdy 01 010330 26900 11 10 54 932 112605 5 112605 329 C endif EO1 010330 27000 11 10 54 932 331 000917 27200
29. 20070118 20070118 622 C Z ADD ODSHPD WDSHPD 000402 56300 11 11 13 683 0 0 623 C Z ADD ODINV WDINV 000402 56400 11 11 13 683 0 0 624 C MOVEL ODSTAT WDSTAT 000402 56500 11 11 13 683 625 C MOVEL ODX WDX 000402 56600 11 11 13 683 627 WRITE ORDERWK 000402 56800 11 11 13 683 628 C WRITE ODETWRK 000402 56900 11 11 13 683 WDORD 0001500 WDLINE 00002 WDCUST 0001000 WDSTOR 0000001 WDITEM Y2430 WDPRIC 0002515 WDOTY 0000003 WDREQD 20000317 WDEXPD 20070118 WDSHPD 00000000 WDINV 0000000 WDSTAT O WDX 630 NESTED IF STATEMENTS WITH AND OR 010429 57100 11 11 13 683 631 C aaaaaaaaaa ifeq bbbbbbbbbb B01 010429 57200 11 11 13 683 11111 22222 000 632 C UPDREC andeq 01 010429 57300 11 11 13 683 2 7 637 C END EO1 010429 57800 11 11 13 684 639 REDISPLAY FIRST SCREEN 000323 58000 11 11 13 684 640 C GOTO DISPO1 000514 58100 11 11 13 684 287 C DISPO1 TAG 000514 22800 11 11 13 684 288 CLEAR EXPECTED SHIP DATE AND ERROR CODE 000514 22900 11 11 13 684 289 C Z ADD ZERO PEXPSH 000514 23000 11 11 13 684 0 290 C MOVEL BLANKS PERROR 000514 23100 11 11 13 684 291 C Z ADD ZEROS KCUSNO 001002 23200 11 11 13 684 0 292 C Z ADD ZEROS KSTORE 001002 23300 11 11 13 684 0 293 C MOVEL BLANKS KCUSNA 000323 23400 11 11 13 684 294 C Z ADD ZERO EXPMDY 000323 23500 11 11 13 684 0 295 C TIME TIMEN 6 0 010501 23600 11 11 13 684 111113 296 C EXFMT NEWEXPD1 051007 23700 11 11 13 684 WRITE INO3 0 IN42 0 KORDER 0001500 KLINE 00002 UDATE 120906 TIMEN 111113 29
30. 35 Review the Audit File RTPA audit output file ZZAUDITP seen 36 Program NEWEXPSH audit output in searchable PDF L 40 Program audit OUDOT ul nennen ennemi etre nennen 42 Chapter 3 RTPA Overview Auditing Concepts 44 Auditable Informatilori etr re va Wee een Fede Rove tes 44 Creating an Audit Overview ine tette 45 Audit Enabling A Program 2 tee Leere ee de ee 45 Producing an Audit incinta 45 Reviewing an Audit tr crea eie ete ea bak binde oa die e E iee edes 45 Audit Statement Orderin0 45 Data Modifying Statements esient iaiia diine ii aa e ieda 45 EVAL Statements 35 25 a etn OA NG 45 Branching and Conditional Statements U uu uuu 46 Special Case Uninitialized Fields sss 46 Chapter 4 Using RTPA 47 Selecting a source member to expand for Auditing seen 48 Selecting the Object Library for the expanded object 49 Selecting the Job Description to be used for RPG source compiles sss 49 i RTPA for RPG User Manual GCustomizing the Audil atone ed Icon nd teas ecutive ae edt Wives Wee ree Un eda ad ues Brede n 50 Selecting Ranges
31. 45 68 736 C 660 2 OREQ D2 3 02 010624 67700 11 11 32 501 34 58 737 C D2 I ANDNE D3 I 02 010624 67800 11 11 32 501 68 113 738 C D4 I ANDEQ D3 3 02 010624 67900 11 11 32 501 3060 93 741 C END E02 010624 68200 11 11 32 501 742 C 660 I IFEQ 9 B02 010624 68300 11 11 32 501 45 745 C END E02 010624 68600 11 11 32 501 746 C ENDDO E01 010624 68700 11 11 32 501 748 C exsr moveit 010709 68900 11 11 32 501 749 C exsr move22 010709 69000 11 11 32 502 937 C MOVE22 BEGSR 010709 87800 11 11 32 502 938 c MOVEL 122 MOVSWx 2 010709 87900 11 11 32 502 22 939 C ENDSR 010709 88000 11 11 32 503 750 C exsr move3333333333 010710 69100 11 11 32 503 941 6 MOVE3333333333BEGSR 010710 88200 11 11 32 503 942 6 MOVEL 333333333333 MOVSWx33333333 12 010710 88300 11 11 32 503 333333333333 943 c ENDSR 010710 88400 11 11 32 503 751 C exsr move4444444444 010710 69200 11 11 32 503 945 C MOVE4444444444BEGSR 010710 88600 11 11 32 503 946 C MOVEL 444444444444 MOVSWx44444444 12 010710 88700 11 11 32 503 444444444444 947 C do 5 11 3 BO1 0917 020917 88800 11 11 32 503 1 948 6 add 1 qq 5 01 0917 020917 88900 11 11 32 503 1 949 C 11 ifeq 4 BO2 0917 020917 89000 11 11 32 503 1 952 c endif E02 9917 020917 89300 11 11 32 503 947 C do 5 11 3 BO1 0917 020917 88800 11 11 32 503 2 948 6 add 1 qq 5 01 0917 020917 88900 11 11 32 503 2 949 C 11 ifeq 4 B02 0917 020917 89000 11 11 32 503 2 952 C endif E02 9917 020917 89300 11 11 32 503 947 C do 5 11 3 BO1 0917 0209
32. 74 RTPA for RPG User Manual Display Library ee os Number of objects Types Ser PROD Library ASP number i Gede author yan SYSVAL Library ASP device SYSBAS lplewesuew ASP gene gt 8 SYSBAS Type options press Enter 5 Display full attributes 8 Display service attributes Opt Object Type Attribute Size Text NEWEXPSH PGM RPGLE 4325376 New Expected Ship Dat OCLLESRC es ILLE PF Ciia Usu TESE ILN OCLSRC FILE PF 45056 RTPA CLP User testing QCMDSRC AFILE PF 16384 RTPA CMD User Testing QCPYLESRC AFILE PF 16384 RTPA COPY book source QCPYSRC FILE PF 16384 RTPA COPY book source ODDSSRC AFILE PF 16384 RTPA DDS User Testing ORPGLESRC FILE PF 16384 RTPA RPG4 User Testin QRPGSRC FILE PF 16384 RTPA RPG3 User Testin Bottom F3 Exit F12 Cancel F17 Top F18 Bottom Comin IBM CORP 1990 2005 Figure 4 30 RTPA User Test library 7 WRKSPLF The WRKSPLF option displays the User Spool File 8 Delete Spooled Files for Current User Sign On The Delete Spool file option deletes all spooled files in the User spool file 9 WRKSBMJOB JOB The WRKSBMJOB option displays submitted jobs for the RTPA user Signon Clear RTPA Expanded Objects in Lib Z AUDITE for all Users with CALL Z CLRFIL The CALL ZSCLRFIL program is executed from a command line when no RTPA Users are active
33. Elle wm e JE ZZAUDITS Page Line 61 86 control Columns 1 78 Find SE Displays KNM DN NGT NE Program NEWEXPSH Displays produced in the program with variable names and Di Displays NEWEXPSH Line f Source Statement 343 C EXFMT NEWEXPD1 WRITE IN03 0 IN42 0 KORDER 0001500 KLINE 00001 UDATE 101707 TIMEN 170303 1234 0 IN42 IN CHAR 1 1235 0 KORDER 85 ZONE 7 0 1236 0 KLINE 135 ZONE 5 0 1237 0 UDATE 195 ZONE 6 0 1238 0 TIMEN 255 ZONE 6 0 343 C EXFMT NEWEXPD1 READ IN03 0 IN42 0 KORDER 0001500 KLINE 00002 UDATE 101707 TIMEN 170303 1234 0 IN42 IN CHAR 1 1235 0 KORDER 85 ZONE 7 0 1236 0 KLINE 135 ZONE 5 0 1237 0 UDATE 195 ZONE 6 0 1238 0 TIMEN 255 ZONE 6 0 612 C EXFMT NEWEXPD2 WRITE 0 IN43 0 EXPMDY 111407 KCUSNO 0001000 KCUSNA ABC STORES STORE 522 1240 0 IN43 IN CHAR 1 1241 0 KCUSNO 85 ZONE 7 0 1242 0 KCUSNA 33A CHAR 25 1243 0 KSTORE 405 ZONE 7 0 1244 0 KORDER 475 ZONE 7 0 1245 0 KLINE 52S ZONE 5 0 1246 0 EXPMDY 58S ZONE 6 0 1247 0 UDATE 64S ZONE 6 0 1248 0 TIMEN 70S ZONE 6 0 More F3 Exit F12 Cancel F19 Left F20 Right F24 More keys Figure P 9 RTPA Query display of Displays screens by the program with variable names and data RTPA for RPG User Manual Display Spooled File File rn p EE ZZAUDITS Page Line 59 79 Control Columns 1 78 Find KES EE pn SEG NT NE Program NEWEXPSH Reports produced in the program with variable names and Rep Reports NEWEXPSH Line
34. How can expand all the members in a source 62 104 Do I need to expand all my source programs U U uuu uu 105 How can selectively audit ranges of source statements u 105 What is the proper format of a Compile time Array header sss 105 Appendix C RTPADEMO Menu of RPG Auditing Examples 107 Appendix D User Profile and Job Description for 110 Typical Programmer Profile for RTPA expansion PHH sene 112 RTPA Job Description in Library QGPL uu uuu uuu 113 Appendix E RTPA Audit Output Examples 1 16 Examples of Input RPG programs and RTPA Audit Output ee cece ceees cee eeeeee eects ceeeeseeeeeeeneaeens 116 iii RTPA for RPG User Manual Preface In writing this manual we assume that you are familiar with the basics of programming RPGIII or RPGIV RPGLE on a System i AS 400 computer This manual is designed to help you get started with and use the Real Time Program Audit for RPG software utility from Harkins Audit Software Inc Ata minimum we hope that you will read Chapter 1 Installing Real Time Program Audit to install the software Chapter 4 Using RTPA to learn how to use RTPA Appendix E RTPA for RPG Example
35. I MULT 5 WORK7 72 01 010624 66700 11 11 32 486 36 180 00 727 C I IFEQ 5 B02 010624 66800 11 11 32 486 4 730 C END E02 010624 67100 11 11 32 486 731 C 660 I IFEQ 7 B02 010624 67200 11 11 32 486 36 734 C END E02 010624 67500 11 11 32 486 735 C 660 I IFEQ D2 I B02 010624 67600 11 11 32 486 36 59 736 C 660 2 OREQ D2 3 02 010624 67700 11 11 32 486 34 58 737 C D2 I ANDNE D3 I 02 010624 67800 11 11 32 486 59 95 738 C D4 I ANDEQ D3 3 02 010624 67900 11 11 32 486 2124 93 741 C END E02 010624 68200 11 11 32 486 742 C 660 I IFEQ 9 B02 010624 68300 11 11 32 486 36 745 C END E02 010624 68600 11 11 32 486 719 C DO 13 I 30 B01 010624 66000 11 11 32 486 5 720 C Z ADD I 660 01 010624 66100 11 11 32 486 5 5 721 C ADD 32 660 01 010624 66200 11 11 32 486 37 722 C 660 I ADD 23 D2 I 01 010624 66300 11 11 32 486 37 60 723 C 660 I ADD D2 I D3 I 01 010624 66400 11 11 32 486 37 60 97 724 C D MULT D2 6554 01 010624 66500 11 11 32 486 33343536371236121212121212 056057058059060000000000000000000000000 18481938203021242220000000000000000000000000000000000000000000000000000000000000 725 C 2 MULT 660 1 WORK5 51 01 010624 66600 11 11 32 486 37 74 0 11 10 48 733 726 C 660 I MULT 5 WORK7 72 01 010624 66700 11 11 32 486 37 185 00 727 C I IFEQ 5 B02 010624 66800 11 11 32 486 5 728 C MOVEL EEEEEEEE A I 02 010624 66900 11 11 32 486 EEEEEEEE 729 C MOVE I A I 02 010624 67000 11 11 32 486 5
36. Key Finds the next program file I O statement that is executed in the program with Key fields and displays the key fields and data processed Data Finds the next program file I O statement Data Area that is executed in the program Printer Finds the next program file Printer I O statement that is executed in the program including the printer file name and the variable names and data printed by the program Display Finds the next program file Display Workstn I O statement that is executed in the program including the Workstn file and record name and the variable names and data processed by the program 1 SQL Finds the next program embedded SQL statement set executed by the program End Finds the end of the program audit output character string finds the next time the character string appears in the audit output is executed in the Green Screen WRKSPLF audit output character string finds all times the character string appears in the audit output is executed in the PDF audit output RTPA for RPG User Manual 327 27 228 228 328 329 329 329 229 829 329 82 382 292 332 97 1 28 08 14555501 Job 634 634 634 98 98 98 634 634 634 634 634 634 634 634 634 634 634 634498 634498 More 98 98 98 98 98 98 98 98 98 98 4
37. amp Jerry if ScanX gt zero 4 c S REPLACE AND CUSNM SCANX 3 Tom amp Jerry 4 c eval CustNamev Tom and Jerry SREPLACE AND CUSNM SCANX 3 Tom amp Jerry 4 endif SIZE BIF obtain the size of a field eval siz SIZE fielda 25 obtain the size of one array element eval siz SIZE arrayx 2 B01 010814 01 010814 01 010814 01 010814 E01 010814 010814 010814 SUBST BI010814 010814 010812 010812 SIZE BI 010812 73900 11 11 010812 010812 000000000000000000000000000000000000 obtain the size of an entire array eval siz SIZE arrayx ALL 36 010812 010812 000000000000000000000000000000000000 obtain the size of a named literal eval siz SIZE QV 38 obtain the size of a literal eval siz SIZE abcdef 6 Wi ENE MENSEN EL MSc STRIML TRIMR TRIM BIF eval Textlinel abcdehghijklm abcdehghijklm eval Textline2 TRIML Textlinel abcdehghijklm abcdehghijklm eval Textline2 TRIMR Textlinel abcdehghi jkl1m abcdehghi jklm eval Textline2 TRIM Textlinel abcdehghi jklm abcdehghi jklm EVEN C P H OPEN BIF if not open qprint open e qprint if Serror else good user controlled open TIME TIMES 60 111132 EXCEPT AUDSTRHEAD end end found not found BIF NO INDICATOR USED ON CHAIN
38. at all levels RTPA for RPG User Manual 32 ZSPGM01R Real Time Program Audit for RPG V4R3 Date 6 04 07 Select Called Programs to Audit Tame Oe Program NEWEXPSH Type choices press Enter Y Include in audit e Opt Seq Called Pgm Called program description B Comment P4 534 BATCHPGM1 satch program with call to another batch pr CALL BATCH PR 3t 706 ZSPGMOIC RETRIEVE USER PROFILE TEXT GET USER PROF at 926 HESTS TEST SOURCE PROGRAM 3 RPGIV batch program W CALL BATCH PR F3 Exit F12 Cancel Enter Accept options and continue C 2000 2002 Harkins Audit Software Inc Figure 2 4 RTPA called programs from program NEWEXPSH Enteting a 5 to the left of the Input will display the input source program compile listing Entering a 5 to the left of the Expand will display the expanded RTPA audit enabled compile listing illustrating exactly how RTPA enables RPG programs for program auditing RTPA compiles the input RPG source program to ensure a valid RPG compile and to obtain a compile listing which includes all copybook and SQL expansions and a field cross reference listing 33 RTPA for RPG User Manual Display Spooled File File NEWEXPSH Page Line 1 1 Control Columns dt 78 Find et ea cred a ces eee MO S S cA See NA T Od SA ere
39. 00 AUTHOR PAUL H HARKINS COOLS OO DAT O08 15 99 COOLS OO EJE SIE Cilia wea F3 Exit F4 Prompt F5 Refresh F9 Retrieve F10 Cursor F11 Toggle F16 Repeat find F17 Repeat change F24 More keys CORLVRIIGEIE IWEM COR Wil ZOOS Figure 4 8 RPGLE input source program Header specification compile override statements 2 RTPA User Profile compile override defaults may be used to override the compile options these compile override options have similar values as using command key 4 to override a normal compile These RTPA User profile compile options are created dynamically when the user first signs on to RTPA and stored in RTPA file These User Profile options may be changed using option 1 of the RTPA Menu command key 9 on the RTPA main screen 55 RTPA for RPG User Manual ZSPGMO1R PHH Real Time Program Audit for RPG V4R3 Date 5 18 07 Select Program to Audit Time 20 23 34 Type choices press F10 Input Source Memb File Name Library Name Object to Library Create As Audit File Outq Max Audit Pages JOBD for pgm comp Library Name Audit Compile Lis Only F3 Exi F7 Compile Option RTPA Maintenance Menu Enter option press enter User Profile Maintenance User Standard Audit Options Maintenance RPGIII Operation Code Maintenance RPGIV Operation Code Maintenance Standard Subroutines to be bypassed for Auditing Create User RTPA Testing Library
40. 0000000 WDSTAT O WDX 630 NESTED IF STATEMENTS WITH AND OR 010429 57100 631 C aaaaaaaaaa ifeq bbbbbbbbbb BOL 010429 57200 11111 22222 000 632 C UPDREC andeq YY 01 010429 57300 3 7 637 C END Q E01 010429 57800 639 REDISPLAY FIRST SCREEN 000323 58000 640 C GOTO DISPOL 000514 58100 287 C DISPOL TAG 000514 22800 288 CLEAR EXPECTED SHIP DATE AND ERROR CODE 000514 22900 289 C Z ADD ZERO PEXPSH 000514 23000 0 290 C MOVEL BLANKS PERROR 000514 23100 291 C Z ADD ZEROS KCUSNO 001002 23200 0 292 C Z ADD ZEROS KSTORE 001002 23300 0 293 C MOVEL BLANKS KCUSNA 000323 23400 294 C Z ADD ZERO EXPMDY 000323 23500 0 295 C TIME TIMEN 6 0 START TIMO10501 23600 111114 296 C EXFMT NEWEXPD1 051007 23700 INO3 0 IN42 0 KORDER 0001500 KLINE 00002 UDATE 120906 TIMEN 111114 296 C EXFMT NEWEXPD1 051007 23700 INO3 1 IN42 0 KORDER 0001500 KLINE 00002 UDATE 120906 TIMEN 111114 297 TEST F3 000323 23800 298 C INO3 CABEQ ON DONE 000323 23900 1 645 C DONE TAG 000323 58600 646 C movel XXXXXXXXXXXX alphxxxxxxxxxx 12 010708 58700 XXXXXXXXXXXX 647 C movel yyyyYYYYYYYYY alphyyyyyyyyyy 12 010708 58800 YYYYYYYYYYYY 648 C movel ssssssssssss alphssssssssss 12 010708 58900 SSSSSSSSSSSS 649 C movel tttttttttttt alphtttttttttt 12 010708 59000 tttttttttttt 651 C IF alphxxxxxxxxxx alphyyyyyyyyyy or 01 010708 59200 XXXXXXXXXXXX YYYYYYYYYYYY 652 C ALPHSSSSSSSSSS ALPHTTTTTTTTTT BOL 010708 59300 SSSSSSSSSSSS tttttttttttt 653 C end E01 010708 59400 655
41. 10 48 751 240 C IN TSTDTA 010126 18700 11 10 48 751 VAR TSTDTA 1 100 ABCDEFGHIJKLMNOPORSTUVWZYZ012345 BBBBBBBBBBBBBBBBBBBBBBBBBBBBBB C VAR TSTDTA 101 200 CCCCCCCCCCCCCCCCCCCCCCCCCCCCC DDDDDDDDDDDDDDDDDDDDDDDDDDDDDD E VAR TSTDTA 201 256 EEEEEEEEEEEEEEEEEEEEEEEEEEEEE FFFFFF 242 C TIME TIMES 60 000302 18900 11 10 48 751 111048 244 MOVE INPUT PARM INTO FOUR PARM FIELDS IN DS 990918 19100 11 10 48 751 245 C MOVEL PARMIN PARMRE 990918 19200 11 10 48 752 000150000001 000150000001 247 start free form 061201 19301 11 10 48 752 249 now in free form RPG 061201 19401 11 10 48 752 250 torder 1500 020623 19500 11 10 48 752 1500 251 iorder 78 543 020623 19600 11 10 48 752 78 543 252 value of iorder has now been computed 061201 19601 11 10 48 752 253 xorder torder 13 45 020623 19700 11 10 48 753 1618 19 1500 254 this is a continuation free form statement preceeded with 061201 19701 11 10 48 753 255 26 2 iorder 020623 19800 11 10 48 753 78 543 256 end of free form 061201 19801 11 10 48 753 258 resume fixed format calc statements 061201 19901 11 10 48 753 259 c eval rorder iorder 98 020623 20000 11 10 48 753 176 543 78 543 260 add 30 days to start date to get end date 020623 20100 11 10 48 753 261 c start date adddur 30 days end date 020623 20200 11 10 48 753 1998 12 18 1999 01 17 262 add 1 month to end date 020623 20300 11 10 48 753 263 c adddur 1 months end date 020623 20400 11 10 48 753 1999 02 17 264
42. 11 10 54 932 332 AUDIT RPGIV EVAL STATEMENT LOWER CASE 010113 27300 11 10 54 932 333 C z add zero answer 7 0 010113 27400 11 10 54 932 0 11 10 48 733 334 C eval answer expmdy expyy 010522 27500 11 10 54 932 112610 112605 5 335 010522 27600 11 10 54 932 336 AUDIT RPGIV eval starting in extended factor 2 010522 27700 11 10 54 932 337 C eval answer expmdy expyy 010522 27800 11 10 54 932 112610 112605 5 338 000917 27900 11 10 54 932 339 C EVAL STSC BLANKS 010730 28000 11 10 54 932 342 C movel HL Ryes 1 010730 28300 11 10 54 932 1 343 C movel HE Q1stline 1 010730 28400 11 10 54 934 1 344 C setoff 33 010730 28500 11 10 54 934 345 C IF lstline yes and 01 010730 28600 11 10 54 934 1 1 346 C IN33 OFF AND 01 050118 28700 11 10 54 934 0 347 C INLR OFF 01 050118 28800 11 10 54 934 0 348 C movel ua hold2 1 01 010730 28900 11 10 54 938 2 349 C ENDIF EO1 010730 29000 11 10 54 938 351 C dou lstline yes or BO1 PDDD 010814 29200 11 10 54 938 308 C IN33 OFF BO1 PDDD 010814 29300 11 10 54 938 353 C movel 13 hold2 1 01 010730 29400 11 10 54 938 3 354 C enddo EO1 PDDD 010814 29500 11 10 54 938 355 C movel 47 hold2 1 010730 29600 11 10 54 938 4 356 AUDIT RPGIV 010522 29700 11 10 54 938 357 C eval IN5O ON 010522 29800 11 10 54 938 1 358 C eval in55 OFF 010710
43. 2 02 07 15314304 TESTCOM 8 EXPN OK Test common print routine 056785 2 02 07 15314304 TESTCOMF 8 EXPN OK Test common print routine free 056786 2 02 07 15 14 04 TESTCSR 8 EXPN OK Test Subroutine CSR old format 056787 2 02 07 15 14 04 TESTCTA 8 EXPN OK Test compile time array 056788 2 02 07 15 14 04 F3 Exit F5 Refresh Subfile F12 Cancel 2000 20027 Hankins Aude Soteware ine Figure 4 16 RTPA expansion of all source programs starting with TEST RTPA Status code 8 EXPN OK means that the expanded RTPA source programs with Z audit statements in library Z AUDITE has compile correctly and the expanded object program may now be used to create program as the program executes Note Copybook input source programs should not be expanded with RTPA Z audit statements as the expanded copybook source is put into library Z AUDITE Copybook source copied into RPG source programs with the COPY statement are audited unless excluded with RTPA an option Instant RTPA Program Auditing with the iRTPA command The iRTPA command Instant RTPA provides the User with a powerful shortcut to audit enable an RPG program or many programs The User may simply key iRTPA on the command line and press the Enter key to submit the last audit enabled program for another RTPA expansion The iRTPA command bypasses the RTPA main selection screen and displays the RTPA Job Summary screen showing the submitted program or programs for genetic programs
44. 29900 11 10 54 938 0 359 C eval IN55 OFF 010710 30000 11 10 54 938 0 360 C eval in 60 ON 010710 30100 11 10 54 938 1 361 C eval IN 60 ON 010710 30200 11 10 54 938 1 362 C eval IN OFF 010710 30300 11 10 54 939 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 363 010522 30400 11 10 54 939 364 AUDIT RPGIV DOW STATEMENT 000918 30500 11 10 54 939 365 C Z ADD ZERO COUNTER 20 000918 30600 11 10 54 939 0 366 C DOW COUNTER 6 B01 000918 30700 11 10 54 939 0 367 C ADD 1 COUNTER 01 000918 30800 11 10 54 939 1 366 C DOW COUNTER 6 B01 000918 30700 11 10 54 939 1 367 C ADD 1 COUNTER 01 000918 30800 11 10 54 939 2 366 C DOW COUNTER lt 6 B01 000918 30700 11 10 54 939 2 367 C ADD 1 COUNTER 01 000918 30800 11 10 54 939 3 366 C DOW COUNTER lt 6 B01 000918 30700 11 10 54 939 3 367 C ADD 1 COUNTER 01 000918 30800 11 10 54 939 4 126 RTPA for RPG User Manual PAGE 366 C DOW COUNTER lt 6 BO1 000918 30700 11 10 54 939 4 367 C ADD 1 COUNTER 01 000918 30800 11 10 54 939 5 366 C DOW COUNTER 6 B01 000918 30700 11 10 54 939 5 367 C ADD 1 COUNTER 01 000918 30800 11 10 54 939 6 368 C ENDDO E01 000918 30900 11 10 54 939 369 000918 31000 11 10 54 939 370 AUDIT RPGIV select WHEN OTHER STATEMENTS 001029 31100 11
45. 3 337 C movel 1 eer ine 1 000000 28400 17 38 35 571 C EXFMT NEWEXPD1 000000 23700 17 38 4 338 C Setoff 33 000000 28500 17 38 35 571 339 C IF lstline eyes and B01 000000 28600 17 38 35 571 340 C IN33 OFF AND B01 000000 28700 17 38 35 571 341 C one OFF B01 000000 28300 17 38 35 571 342 C movel ua piar 1 01 000000 28900 17 38 35 571 343 C ENDIF DOW COUNTER lt 6 E01 000000 29000 17 38 35 571 345 C dou elstline a es or B FOOD 000000 29200 17 38 35 571 302 C N33 BOT POOD 000000 29300 17 38 35 571 347 C movel 3 Told 1 01 000000 29400 17 38 35 571 348 C enddo DOW COUNTER lt 6 E01 FOOD 000000 29500 17 38 35 571 gt Done 349 C movel 4 hold2 1 000000 29500 17 38 35 571 1NGD ON 000000 20900 17 38 35 571 vi We Lise Advanced Search Options c eval 11 00x8 50im gt EE j Lid 4 zas b bl 9 O L4 Fd HH Sj Find a word in the current PDF document Figure 2 11 Audit Output of NEWEXPSH showing the data keyed and the elapsed time to enter it in PDF 40 RTPA for RPG User Manual Display Spooled File File ZZAUDITP Page Line 22 46 Control Columns i 78 Find EE Ele eee Ses OE See Ore ef fete Te 515 MOVEL SATA MSGDA AAAAAAAAAAAAAAAAAAAAAAAAAAAAA 516 MOVEL Ab de MSGDB BBBBBBBBBBBBBBBBBBBBBBBBBBBBB 517 call with parms 518 C CALL BATCHPGMI 519 C PARM MSGDA 79 AAAAAAAAAAAAAAAAAAAAAAAA
46. 4 Source Statement 973 C WRITE Header PROGID NEWEXPSH UDATE 100307 TIMES 174947 PROGDE Open Order Detail Report by HEADDE Customer Name Cust Order Line Store Item Pri 1275 0 PROGID 10A CHAR 10 1276 0 UDATE 16S ZONE 6 0 1277 0 TIMES 22S ZONE 6 0 1278 0 PROGDE 72A CHAR 50 1279 0 PAGE 76S ZONE 4 0 1280 0 HEADDE 196A CHAR 120 1002 C Write Ordheader CUSNAM ABC STORES STORE 5 ODCUST 0001000 ODORD 0001500 1282 0 CUSNAM 20A CHAR 20 1283 0 ODCUST 275 ZONE 7 0 1284 0 ODORD 34S ZONE 7 0 1028 C WRITE OrdDetail ODCUST 0001000 ODORD 0001500 ODLINE 00001 ODSTOR 0000522 ODITEM Y1815 OD 1286 20 ODCUST 7S ZONE 7 0 128720 ODORD 14S ZONE 7 0 1288 0 ODLINE 19S ZONE 5 0 1289 0 ODSTOR 26S ZONE 7 0 1290 0 ODITEM 36A CHAR 10 1291 0 ODPRIC 43S ZONE 7 2 1292 0 505 ZONE 7 0 1293 0 DETAMT 58S ZONE 8 2 1294 20 REQDAT 64S ZONE 6 0 129520 EXPDAT 70S ZONE 6 0 1296 0 ODSTAT 71A CHAR 1 1134 C WRITE OrdTotal CUSNAM ABC STORES STORE 45 TOTDES Order Total ORDQTY 00000015 ORDAMT 00032745 1298 20 CUSNAM 20A CHAR 20 1299 20 TOTDES 31A CHAR 11 130020 ORDOTY 39S ZONE 8 0 1301 0 ORDAMT 47S ZONE 8 2 1039 C WRITE FinTotal TOTDES Final Total FINQTY 00000098 FINAMT 00561170 130320 TOTDES 11A CHAR 11 130420 FINOTY 19S ZONE 8 0 130520 FINAMT 275 ZONE 8 2 1056 C EXCEPT Headeri Figure P 10 RTPA Query display of Reports produced by the program with variable names and data 10 RTPA for RPG User Manual 14 14 14 14 14 14
47. 8 0 inz 0 0011 13 xorder 9 2 inz 0 0011 14 iorder 7 3 inz 0 0011 15 rorder 6 3 inz 0 0011 16 fill fields in qualifed DS DSa fields 0012 00 c Eval DSa aorder 1500 0013 00 c Eval DSa xorder 1234567 89 0013 01 c Eval DSa iorder 7654 321 0013 02 c Eval DSa rorder 123 456 0017 00 free 0017 01 in free form fill qualifed DS DSb field border 0018 00 DSb border DSa aorder 13 45 0019 00 26 2 DSa iorder 0021 00 end free 0022 00 V5R4 op code eval corr evaluate corresponding 0023 00 c eval corr DSb DSa 0024 00 qualified DS names DSb 0025 00 c z add DSb border work80 80 0025 01 c z add DSb xorder work92 92 0025 02 c z add DSb iorder work73 73 0026 00 c z add DSb rorder work63 6 3 0027 00 exit program 0027 01 c Eval inlr on 0028 00 c Return kkkkkkkkkkkkkkkkkk End of data e d ddd ddd dk d dkk dk d kk k eek RTR kk k k kk k RTPA Audit Output for RPGLE program TESTEVALCO Program TESTEVALCOTest Eval corr TESTEVALCO TESTEVALCO corresponding Obj Lib Z AUDITE Initiated 1 25 07 18 27 06 818 PAGE Job 054067 User Profile PHH Source File Library QRPGLESRC Z AUDIT Line Do SrcId ChgDat Seq Time 12 c Time Timen 60 Get the current 070124 1101 18 27 06 818 182706 13 audit the RPGLE V5R4 new Op code eval corr 070125 1102 18 27 06 818 14 DSa is a qualified data structure 070125 1103 18 27 06 818 15 DSa ds Qualified 070125 1104 18 27 06 818 16 aorder 8 0 inz 0 070125 1
48. 82 010617 38100 11 10 54 967 1444 20 441 C z add 43 8 interim 82 010617 38200 11 10 54 967 128 RTPA for RPG User Manual 43 80 442 C z add 87 extra 50 010617 38300 11 10 54 967 87 443 C z add 105 extra2 50 010617 38400 11 10 54 967 105 444 C z add 17 more 82 010617 38500 11 10 54 967 17 00 445 C eval final answer counter 010617 38600 11 10 54 967 783 80 7 3 402 C CCCC DIFFERENCE 160 EXTRA 010617 39000 11 10 54 967 7 12 1444 20 87 403 C 188 INTERIM EXTRA2 010617 39000 11 10 54 967 43 80 105 404 C 33 15 GROSS 010617 39000 11 10 54 967 163 23 405 C MORE 010617 39000 11 10 54 967 17 00 450 C eval net counter cccc 010617 39100 11 10 54 969 10 3 7 12 451 C eval interim answer cccc net difference 010617 39200 11 10 54 969 1229 85 7 7 12 10 1444 20 408 C 44 GROSS EXTRA2 010617 39300 11 10 54 969 163 23 105 453 x w 010617 39400 11 10 54 969 454 C movel 2 movsw 1 010604 39500 11 10 54 969 2 455 AUDIT RPGIV IF STATEMENT with alpha extended factor 2 010604 39600 11 10 54 971 456 C if movsw 2 01 010604 39700 11 10 54 971 2 457 C OR MOVSW 3 01 010604 39800 11 10 54 971 2 458 C movel VL movsw 1 01 010604 39900 11 10 54 971 1 459 C endif EO1 010604 40000 11 10 54 971 460 C movel 15 movsw 1 010604 40100 11 10 54 971 5 461 C if movsw 5
49. AE AE HE AE EAE HEHEHE HE HE HE HE FE FE FE RHE AE FE AE FE AE AE E HE HE HE FE FE HE FE FE FE FE FE AE AE FE FE BH AE E HE HE HE FE FE FE FE FE FE FE FE FE AE EE E E E E HE FE FE FE FE FE EEE AE FE AE AE HE HE HE HE HE FE HEHEHE VAR ALL 201 256 11 10 48 733 23 586 C MOVE MOVSW 010429 52700 11 11 14 495 2 587 C MOVE 3 MOVSW1 1 010429 52800 11 11 14 495 RTPA for RPG User Manual 148 100 200 100 200 100 200 PAGE 3 588 C MOVE 14 MOVSW2 1 010429 52900 11 11 14 495 4 589 C MOVE E MOVSW3 1 010429 53000 11 11 14 495 5 590 C MOVE Bu MOVSWA 1 010429 53100 11 11 14 495 5 591 C MOVE A HLD1 1 010429 53200 11 11 14 495 A 593 C EXPMDY IFEQ UDATE BO1 010420 53400 11 11 14 495 11807 120906 594 C MOVSW ANDEQ BLANK 01 000514 53500 11 11 14 495 2 595 C MOVSW OREQ 5 01 010429 53600 11 11 14 495 2 596 C MOVSW1 OREQ MOVSW2 01 010429 53700 11 11 14 495 3 4 597 C MOVSW3 ORNE MOVSWA 01 010429 53800 11 11 14 495 5 5 598 C MOVSW OREQ 8 01 010429 53900 11 11 14 495 2 599 c MOVSW OREQ 9 010429 54000 11 11 14 495 2 600 C MOVSW OREQ ct 01 010429 54100 11 11 14 495 2 601 C MOVSW OREQ D 01 010429 54200 11 11 14 495 2 602 C MOVSW OREQ HLD1 01 010429 54300 11 11 14 495 2 A 603 C MOVSW3 ANDNE MOVSW2 01 010429 54400 11 11 14 495 5 4 605 C END EO1 000323 54600 11 11 14 496 607 UPDATE ORDER DETAIL E
50. AUDIT RPGIV CHAIN STATEMENT NO ERROR INDICATOR eval oorder 1500 1500 eval oline I 1 ordkey chain odetrec 000150000001 ODORD 0001500 ODLINE 00001 ODCUST 0001000 ODSTOR 0000522 ODITEM Y1815 ODEXPD 20070121 ODSHPD 00000000 ODINV 0000000 ODSTAT O ODX 010812 010812 010812 010812 010812 010812 010812 TRIML 010812 11 10 TRIMR 010812 STRIM 010812 010812 010812 B01 010812 01 010812 B02 010812 x02 010812 010812 02 010812 02 010812 02 010812 EO1 010812 010812 010812 010812 010812 010812 76700 11 11 77100 11 11 77400 11 11 010812 25 IS NOTO10812 77700 11 11 ODPRIC 0002100 ODQTY 0000002 72900 11 11 73100 11 11 73000 11 11 73100 11 11 73200 11 11 73300 11 11 73400 11 11 73500 11 11 73600 11 11 73800 11 11 74100 11 11 74200 11 11 74300 11 11 74400 11 11 74500 11 11 74600 11 11 74700 11 11 74800 11 11 74900 11 11 75000 11 11 75100 11 11 75200 11 11 48 733 75300 11 11 75400 11 11 75600 11 11 75700 11 11 75800 11 11 75900 11 11 76000 11 11 76300 11 11 76400 11 11 76500 11 11 76600 11 11 77600 11 11 32 507 32 507 32 507 32 507 32 507 32 507 32 507 32 507 32 507 32 507 32 507 74000 11 11 32 507 32 508 32 508 32 508 32 508 32 508 32 508 32 508 32 508 32 508 32 508 32 508 32 509 PAGE 32 509 32 509 32 509 32 509 32 509 32 512 32 51
51. CUSTMAST TO FATLERR FILE NAME CUSTMAST 572 021800 OPEN INPUT CUSTMAST 573 022000 MOVE PRTFILE TO FATLERR FILE NAME PRTFILE 022300 INITIALIZE CURRENT DATE AREAS 575 022400 PERFORM 800000 CPDATES TODAY THRU 022500 800099 CPDATES TODAY EXIT 865 4025800 800000 CPDATES TODAY 023300 TEST ARITHMETICS 579 023400 ADD 123 45 TO FIELD AAA 123 45 580 023500 ADD 7689 TO FIELD BBB 7689 581 023600 SUBTRACT FIELD BBB FROM FIELD AAA GIVING FIELD CCC 7689 123 45 7565 55 582 023700 MULTIPLY FIELD AAA BY FIELD CCC GIVING FIELD FFF 123 45 7565 55 933967 14 583 023800 MULTIPLY FIELD AAA BY FIELD CCC 123 45 7565 55 023900 GIVING FIELD DDD ROUNDED 933967 15 584 024000 DIVIDE FIELD DDD BY FIELD AAA GIVING FIELD EEE 933967 15 123 45 7565 55 024200 TEST REMAINDER 585 024300 DIVIDE FIELD DDD BY FIELD AAA GIVING FIELD EEE 13 933967 15 123 45 7565 55 024400 REMAINDER FIELD FFF 00 586 024600 DIVIDE 7 BY 2 GIVING FIELD GGG B 024700 REMAINDER FIELD HHH 1 00 F3 Exit F12 Cancel F19 Left F20 Right F24 More keys Figure P 14 RTPA for COBOL Audit Output for program GETEXPSH Z COBO1R Real Time Program Audit for COBOL V4R3 Date 1 04 08 Select Variables to Audit Time 20 49 43 Program GETEXPSH Type options press Enter Position to Y Include in audit Opt Data field variable T Len Dec Elem Description Y ODSSY050 INTERFACE AREA G 49 Y ODSSY050 LD AREA G 14 Y ODSSY050 LD INP LE
52. E02 010624 67100 11 11 32 494 731 C 660 I IFEQ 7 B02 010624 67200 11 11 32 494 44 734 C END E02 010624 67500 11 11 32 494 735 C 660 I IFEQ D2 I B02 010624 67600 11 11 32 494 44 67 736 C 660 2 OREQ D2 3 02 010624 67700 11 11 32 494 34 58 737 C D2 I ANDNE D3 I 02 010624 67800 11 11 32 494 67 111 738 C D4 I ANDEQ D3 3 02 010624 67900 11 11 32 494 2948 93 741 C END E02 010624 68200 11 11 32 494 742 C 660 I IFEQ 9 B02 010624 68300 11 11 32 494 44 745 C END E02 010624 68600 11 11 32 501 719 C DO 13 I 30 B01 010624 66000 11 11 32 501 158 RTPA for RPG User Manual 13 PAGE 720 C Z ADD I 660 1 01 010624 66100 11 11 32 501 13 13 721 C ADD 32 660 1 01 010624 66200 11 11 32 501 45 722 C 665 I ADD 23 D2 1 01 010624 66300 11 11 32 501 45 68 723 C 665 I ADD 6672 I D3 I 01 010624 66400 11 11 32 501 45 68 113 724 C D MULT D2 D4 01 010624 66500 11 11 32 501 33343536373839404142434445 056057058059060061062063064065066067068 18481938203021242220231824182520262427302838294830600000000000000000000000000000 725 C 2 MULT 660 I WORK5 51 01 010624 66600 11 11 32 501 45 90 0 726 C 660 I MULT 5 WORK7 7 01 010624 66700 11 11 32 501 45 225 00 721 C I IFEQ 5 B02 010624 66800 11 11 32 501 13 11 10 48 733 730 C END E02 010624 67100 11 11 32 501 731 C 660 I IFEQ 7 B02 010624 67200 11 11 32 501 45 734 C END E02 010624 67500 11 11 32 501 735 C 660 I IFEQ D2 I B02 010624 67600 11 11 32 501
53. EEEEEEEO05 730 C END E02 010624 67100 11 11 32 486 731 C 660 I IFEQ 7 B02 010624 67200 11 11 32 486 37 734 C END E02 010624 67500 11 11 32 486 735 C 660 I IFEQ D2 I B02 010624 67600 11 11 32 486 37 60 736 C 660 2 OREQ D2 3 02 010624 67700 11 11 32 486 34 58 737 C D2 I ANDNE D3 I 02 010624 67800 11 11 32 486 60 97 738 C D4 I ANDEQ D3 3 02 010624 67900 11 11 32 486 2220 93 154 RTPA for RPG User Manual PAGE 741 C END E02 010624 68200 11 11 32 486 742 C 665 1 IFEQ 9 B02 010624 68300 11 11 32 486 37 745 C END E02 010624 68600 11 11 32 486 719 C DO 13 I 30 BO1 010624 66000 11 11 32 486 6 720 C Z ADD I 660 1 01 010624 66100 11 11 32 486 6 6 721 C ADD 32 660 1 01 010624 66200 11 11 32 486 38 722 C 660 I ADD 23 D2 I 01 010624 66300 11 11 32 486 38 61 723 C 660 I ADD 6602 I D3 I 01 010624 66400 11 11 32 486 38 61 99 724 C D MULT D2 D4 01 010624 66500 11 11 32 487 33343536373836121212121212 056057058059060061000000000000000000000 18481938203021242220231800000000000000000000000000000000000000000000000000000000 725 C 2 MULT 665 I WORK5 51 01 010624 66600 11 11 32 487 38 76 0 726 C 660 I MULT 5 WORK7 72 01 010624 66700 11 11 32 487 38 190 00 727 C I IFEQ 5 B02 010624 66800 11 11 32 487 6 730 C END E02 010624 67100 11 11 32 487 731 C 665 I IFEQ 7 B02 010624 67200 11 11 32 487 38 734 C END E02 010624 67500 11 11 32 487 735 C 660 I IFEQ D2 I B02 010624 67600 11 11 32 4
54. FIND feature sene 85 Chapter 7 Using Auditing Options 87 Auditirig C Dlloris einen M iie AS 87 Pre Audit Gonditionals R 92 Arithmetic Operations enne nnne entente nennt teen rnit enter nnne 92 Auditing Calculation Comment statements sss nennen 92 Show All Variable Values n a ne adenine ibo de erede na traen va ene ren ee eun a 93 Audit lines of data ie ide c t erre di 93 Only Selected Variable Statements sss 93 Audit Zoned Decimal Variables U ante ie tte cn n 93 Audit File Key Flelds e e egre ede e e aeree E e ta s 93 QSYSPRT Compile Printer File u n aussi etn 94 Auditing by Change ID u sann o e e tere 94 Auditing by Change Date rti deett eee Edere de 94 Documentation Only with Z C Comment Auditing esses eterne 96 Chapter 8 Auditing Very Large RPG and COBOL Programs 98 RPG Compiler Elimits i e e i uim duse eer sper 98 COBOL Comlpller BEImlts itat etr bo tete qe edelt 98 SED EMITS 22 H 99 How RTPA Inserts Audit Statements aren coristi reinii i iie ent ade end p ed na n a da 100 Changing A
55. Ic SIRE ie elm F7 Compile Options F10 Submit Fll Advanced Auditing F24 More Keys C 2000 2002 Harkins Audit Software Inc Figure 4 1 RTPA Main Selection Screen Selecting a source member to expand for Au diting Note RTPA for RPG redisplays the source member name source file and source library from the last RTPA expansion by the user The first step in creating an audit is to select a source file to audit enable expand The source file s type and location are dependent on the following values Parameter Description Member Name The name of the member to audit File Name The source file that contains the member Library Name The library that contains the soutce file There are two ways to select a source file Type the Member Name File Name and Library Name or Select the program in PDM by blanking the program name in the RTPA main screen then pressing F4 to display the source members in PDM Choose the desired source member name to return to the RTPA main screen program by entering S S blank or blank S next to the member name in the Opt column and then pressing Enter then press command 3 to exit PDM as shown in Figure 4 2 The selected PDM member name will be returned to the RTPA main screen in the source member name field RTPA for RPG User Manual 48 PDM may be used to edit or browse a source member in the RTPA main screen by pressing F4 with the cursor on the member name fi
56. Inc Figure 4 19 Display of the submitted program or programs for RTPA expansion for the User Like the RTPA Command the iRTPA command alone may be keyed and the enter key pressed to submit the RPG source program last successfully expanded by the User for an expansion with audit statements keyed irtpa The expanded object library and other RTPA main screen defaults from the last RTPA or iRTPA expand for the User are used together with the RTPA User profile defaults 66 RTPA for RPG User Manual MAIN 15 08 Main Menu System APPCON Select one of the following l User tasks 2 Office tasks 3 General system tasks 4 Files libraries and folders 5 Programming 6 Communications 7 Define or change the system 8 Problem handling 9 Display a menu 10 Information Assistant options 11 iSeries Access tasks 90 Saga Go Selection or command gt irtpa F3 Exit F4 Prompt F9 Retrieve F12 Cancel F13 Information Assistant F23 Set initial menu Figure 4 20 Selection of the iRTPA command without keyed program name Use the last successfully expanded RPG source program name for the User ZSPGMO1R Real Time Program Audit for RPG V4R3 Date 2 05 07 PHH Job History mimer 12352920 Type option press Enter 4 Delete 5 Display O Program Job Status Program Name Jobi Date Time TESTFREE 1 INPT SBM Test Free format RPG specs 000000 2 05 07 12 52 20
57. Job 056103 User Profile PHH Source Fi Line 4 C ENTRY PSI 5 0 PARM PARMA 78 AAAAAAAAAAAAAAAAAAAAAAAAAAAAA ON PARM PARMB 79 BBBBBBBBBBBBBBBBBBBBBBBBBBBBB ere MOVEL AAAAAAAA CHECK8 8 AAAAAAAA 9 Z ADD 5 EERSTE ZO 5 LO Z ADD 14 2 SECND S m 4 20 11 B RS MULT SECND PROD DN Moner F3 Exit F12 Cancel F19 Left F20 Right F24 More keys Figure 2 14 ZZAUDITP audit output of program BATCHPGMI called from program NEWEXPSH Program BATCHPGM audit output Program BATCHPGM1 Batch program with call to Obj Lib Z AUDITE Initiated 01 30 07 17 05 42 106 PAGE 1 BATCHPGM1 BATCHPGM1 Job 056103 User Profile PHH Source File Library QRPGLESRC ZSAUDIT Line Do SrcId ChgDat Seq Time 4c ENTRY PLIST 010529 400 5c PARM PARMA 79 010529 500 17 05 42 126 AAAAAAAAAAAAAAAAAAAAAAAAAAAAA 6C PARM PARMB 79 010529 600 17 05 42 126 BBBBBBBBBBBBBBBBBBBBBBBBBBBBB 8 c MOVEL AAAAAAAA CHECK8 8 010827 800 17 05 42 131 AAAAAAAA 9c Z ADD 5 FIRST 20 000521 900 17 05 42 131 5 10 C Z ADD 14 2 SECND 32 000521 1000 17 05 42 131 4 20 11 C FIRST MULT SECND PROD 52 000521 1100 17 05 42 131 5 4 20 21 00 Figure 2 15 ZZAUDITP audit output of program Appendix E 42 RTPA for RPG User Manual 5 Real Time Program Audit for RPG V4R3 Date 5 18 07 PHH Select Program to Audit Time 20 43 14 Type choices press F10 Input Source Member Name A00400 Name generi
58. Lib Z AUDITE Initiated 12 09 06 11 10 48 733 PAGE 1 NEWEXPSH NEWEXPSH Job 026982 User Profile PHH Source File Library QRPGLESRC Z AUDIT Line Do SrcId ChgDat Seq Time 956 C INZSR BEGSR ph456 011227 89700 11 10 48 742 957 initialize fields and arrays 060318 89800 11 10 48 742 958 C MOVEL BLANKS MOVSW 1 ph456 011227 89900 11 10 48 742 959 C Z ADD 12 D ph456 011227 90000 11 10 48 751 12121212121212121212121212 123 RTPA for RPG User Manual 960 C MOVEA ZERO D2 ph456 011227 90100 11 10 48 751 000000000000000000000000000000000000000 961 C MOVEA 1111 D3 ph457 011227 90200 11 10 48 751 1111000000000000000000000000000000000000000000000000 962 C MOVEL 88888888 SSA ph456 011227 90300 11 10 48 751 963 C ENDSR ph456 011227 90400 11 10 48 751 229 CUSTOMER MASTER KEY 991225 17600 11 10 48 751 234 RECEIVE PARAMETERS PASSED FROM CALLING PROGRAM 990918 18100 11 10 48 751 235 C ENTRY PLIST 990918 18200 11 10 48 751 236 C PARM PARMIN 44 991225 18300 11 10 48 751 000150000001 238 INPUT DATA AREA TSTDTA 010126 18500 11 10 48 751 240 C IN TSTDTA 010126 18700 11 10 48 751 VAR TSTDTA 1 100 ABCDEFGHIJKLMNOPORSTUVWZYZ012345 BBBBBBBBBBBBBBBBBBBBBBBBBBBBBB C VAR TSTDTA 101 200 CCCCCCCCCCCCCCCCCCCCCCCCCCCCC DDDDDDDDDDDDDDDDDDDDDDDDDDDDDD E VAR TSTDTA 201 256 EEEEEEEEEEEEEEEEEEEEEEEEEEEEE FFFFFF 242 C TIME TIMES 6 0 000302 18900 11 10 48 751 111048 244 MOVE INPUT PARM INTO FOUR PARM FIELDS IN DS 990918 19100 11 10 48 751 245 C
59. Oe e at ACkCckckckck ck ckck ck kk kk Beginning of data KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK 0001 00 H BNDDIR QC2LE 0002 00 H Dftactgrp NO 0003 00 Source program example from www rpgworld com 0004 00 fdatafile if disk 0005 00 0006 00 D cvthc PR SKEDKOC Gvitlad 0007 00 D szRtnHexVar 65532A OPTIONS VARSIZE 0008 00 D szSourceVal 32766A CONST OPTIONS VARSIZE 0009 00 D nHexLen 10I 0 VALUE 0010 00 NOLL 100 1D sari PR extproc cvtch 0012 00 D szRtnCharVar 32766A OPTIONS VARSIZE 0013 00 D szInputHex 65532A CONST OPTIONS VARSIZE 0014 00 D nHexLen 10I 0 VALUE 0015 00 0016 00 D szHex S 40A BOLT 00 MNI MESZ 9 Na S 20A 0018 00 D Result S 40A 0019 00 0020 00 free 0021 00 Source program example from www rpgworld com 0022 00 read datafile 0012 5 0 0 dow not eof datafile 0024 00 convert character to hex 0025 00 cvthc szHex data Slen data 2 0026 00 val result szHex 02 7 00 if szHex lt gt blanks 0028 00 convert hex to character 0029 00 cvtch szChars szHex len TrimR szHex 0030 00 val result szChars 0031 00 endif 0032 00 read datafile 0033 00 enddo 0034 00 even OR 0035 00 return 0036 00 end free Figure 4 31 CVT TOHEX sample source program 76 RTPA for RPG User Manual Display Spooled File pare ZZAUDITP Page Controlan 6 3 3 Colum Ne
60. Pages 5 Standard Subroutines to be bypassed for Auditing 6 Create User RTPA Testing Library first in Libl 7 WRKSPLF Audit Compile Lis 8 Delete Spooled Files for Current User Sign On Only 9 WRKSBMJOB JOB Option 2 Clear RTPA Expanded Objects in Lib ZSAUDITE F1 Help F3 Exi F3 Exit for All Users with CALL ZSCLRFIL F7 Compile Option Figure 7 1 Selection of User Audit Options maintenance to change User Audit Options 87 RTPA for RPG User Manual These User Audit Options are the default for all RTPA expansions for the User unless overridden by the Command Key 6 key Job Audit Options on the RTPA main screen ZSPGM12R Real Time Program Audit for RPG V4R3 Date 2 02 07 PHH User Standard Audit Options Maintenance Time 15 41 53 Type choices press F5 to apply Types of Statements to Audit Externals Y Include File I O M Y Include Branches pa Y Include Conditionals Y Y Include Arithmetic operations x YES Move operations 36 Y Include Audit calc comment statements Y Xe wie Copybook subroutines Y ae luce Variable values Y Yes Lines of record data T 0 1 2 A All fields Audit Zoned Decimal Variables Y Yes DS may not be initialized Only selected variables stmts MINER F11 focused audits only Insert Z C Comment Stmts Only X Yes Inserts only Documentation stmts into the Output Source in Library ZSAUDITE To make Source Program more readable No RTPA ZS Audit Stmts
61. TRIMR STA Z APOS BC 929 T 930 C SETON LR 931 C RETURN 70TH RTPA for RPG Audit Output BATCHPGMI Batch RPGLE Called from program NEWEXPSH CUAD1 554 ARCH STREET 011211 85500 11 11 011211 85600 11 11 011211 85700 11 11 011211 85800 11 11 STREET 011211 85500 11 11 011211 85600 11 11 011211 85700 11 11 011211 85800 11 11 011211 85900 11 11 020705 86100 11 11 020705 86200 11 11 020705 86300 11 11 020705 86400 11 11 020705 86600 11 11 020705 86800 11 11 020705 86900 11 11 010812 87000 11 11 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 524 524 524 524 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 000324 87100 11 11 32 525 Note RTPA audit output records the parameters passed to and from called programs RETURN TO 000316 87200 11 11 32 525 CUAD2 CUAD2 CUAD2 CUAD2 RTPA for RPG User Manual 165 Program BATCHPGM1 Batch program with call to Obj Lib Z AUDITE Initiated 01 30 07 17 05 42 106 PAGE 1 BATCHPGM1 BATCHPGM1 Job 056103 User Profile PHH Source File Library QRPGLESRC ZSAUDIT Line Do SrcId ChgDat Seq Time 46 ENTRY PLIST 010529 400 5c PARM PARMA 79 010529 500 17 05 42 126 AAAAA
62. The suggested name for this library is the User initials suffixed with RTPA for example PHHRTPA User Test Library successfully created PHHRTPA Test with ADDLIBLE User Test library then RTPA command on command line F3 Exit Press Enter to validate and create NEW User Library Copyright C 2000 by Harkins Audit Software Inc Figure 1 7 Creation of a private User testing library named PHHRTPA How to find the System i Processor Group with WRKLICINF Use the WRKLICINF command to display the System 1 Processor Group serial number and installed IBM software with feature codes Use the DSPSYSVAL command with system value QMODEL to display the System i model number 27 RTPA for RPG User Manual System serial number Processor group Work with License Information Type options press Enter 1 Add license key 2 Chang 10728ED RILO APPCON 11 29 07 18223238 5 Display detail 6 Print detail 8 Work with license users License Opt Product Term Feature Description 5122551 V5RAMO 5050 15 06 5722961 WS 5051 15 065 5722SS1 V5RAMO 5103 Media and Storage Extensions EPIS 5109 NetWare Enhanced Integration 5722881 V5RAMO 5112 PSF 1 45 IPM Printer Support 5722881 V5RAMO 5113 PS PSOE Mee ringes upport 5722881 V5RAMO 5114 PSF Any Speed Printer Support IMS sc Parameters or command gt F3 Exit F5 Refresh F11 Display Usage Information F12 Can
63. and the input source program goes through eight status steps to audit enable the expanded object program 30 RTPA for RPG User Manual verify that the expansion was successful press F18 to get the screen shown in Figure 2 2 ZSPGMO1R Real Time Program Audit for RPG V4R3 Date 6 04 07 PHH Job History Time 16 45 34 Type option press Enter 4 Delete 5 Display O Program Job Status Program Name Jobi Date Time NEWEXPSH 8 EXPN OK New Expected Ship Date from Or 139567 6 04 07 16 42 57 F3 Exit F5 Refresh Subfile F12 Cancel C 2000 2002 Harkins Audit Software Inc Figure 2 2 Programmer Audit Compiles by submitted Job Screen for Today In Figure 22 the status of 8 EXPN OK indicates that the source code was expanded and that the compile of the expanded program completed successfully If the program has not reached status code 8 you may press Enter to refresh the screen This screen shows all RTPA expanded programs Jobs for Today Status 8 Expand OK means that the RTPA audit enabled object program from the audit enabled source copy of the program in Z AUDITE has been successfully created and the program may be run to produce an RTPA audit Exit RTPA by pressing F3 twice Note Entering a 5 to the left of the program name displays the RTPA detailed Job History screen which is informational only 31 RTPA for RPG User Manual
64. cannot be successfully completely expanded with RTPA audit statements of all executing source statements may be selectively audited by specifying ranges of from and to compile listing statements to be audited Changing Audit Options to Reduce the Source Size You may estimate that about eight to nine Z audit statements are required for each line of calculation statements to be completely audited including the complete source statement and the data contents of all variables in the statement Simply bypassing the auditing of copybooks and subroutines designated as utility subroutines dramatically reduces the number of audit statements inserted and produces more focused audit output Audit Copybook Subroutines Blank this option to not audit copybook subroutines Many programs use copybooks to copy standard subroutines into the program These copied subroutines can most often be bypassed for auditing resulting in more focused auditing of the code of interest to the programmer Audit lines of Record Data Enter 0 zero in this option to bypass the auditing of the data contents of records as they are processed The contents of the variables fields in the records will still be audited as the calculations statements using those variables are executed Reporting RTPA Status 9 Compile Error If the RTPA for RPG expanded source compile results in a status 9 compile error rather than the status 8 OK then RTPA for RPG may have incorrectly inserte
65. continuation free form statement preceeded with 26 2 iorder 78 543 if porder lt 1500 1500 xorder porder 87 43 2769 47 1500 1103 5 iorder 78 543 comment 3 endif comment 4 zorder final porder iorder xorder sorder max 5425 4870 1500 78 543 2769 47 scust 1000 1000 compound if group if porder gt 1500 or 1500 if porder gt 1500 or 1500 iorder xorder or 78 543 2769 47 xorder gt 1 1234 2769 47 xorder porder porder 2 87 43 5769 47 1500 1500 1103 5 iorder 78 543 comment 3 endif setll scust custmast 1000 0001000 reade scust custmast 1000 0001000 0001000 CUCUST 0001000 CUSTOR 0000000 CUNAME ABC STORES INC CUCITY WEST CHESTER CUSTA PA CUZIP 19382 CUCUST 0001000 CUSTOR 0000000 CUNAME ABC STORES INC CUCITY WEST CHESTER CUSTA PA CUZIP 19382 CUCUST 0001000 CUSTOR 0000000 CUNAME ABC STORES INC CUCITY WEST CHESTER CUSTA PA CUZIP 19382 CUCUST 0001000 CUSTOR 0000000 CUNAME ABC STORES INC CUCITY WEST CHESTER CUSTA PA CUZIP 19382 85 dow not eof custmast 86 fstore custor 0 0 87 output report line 88 except prtfre 89 reade scust custmast 1000 0001000 CUCUST 0001000 CUSTOR 0000001 CUNAME ABC STORES INC CUCITY ARDMORE CUSTA PA CUZIP 19333 86 fstore custor 87 1 1 output report line 1234 56 B01 01 01 E01 B01 B01 B01 B01 01 01 E01 CUAD1 15 CUAD1 15 CUAD
66. extract day number from date 050516 20500 11 10 48 754 265 c extrct end date D dayno 20 dd 050516 20600 11 10 48 754 1999 02 17 17 266 extract month number from date 050517 20700 11 10 48 754 267 c extrct end date M Month no 20 mm 050517 20800 11 10 48 754 1999 02 17 2 268 extract year number from date 050517 20900 11 10 48 754 269 c extrct end date Y Year no 40 ccyy 050517 21000 11 10 48 754 1999 02 17 1999 270 add 1 year to start date 020623 21100 11 10 48 754 271 c employ dat adddur 1 years anniv dat 020623 21200 11 10 48 754 12 29 1992 12 29 1993 272 add 3 hours 22 minutes and 50 seconds to midnight 020623 21300 11 10 48 754 273 c T 00 00 00 adddur 3 hours end_time 020623 21400 11 10 48 754 03 00 00 274 c adddur 22 minutes end time 020623 21500 11 10 48 754 03 22 00 275 c adddur 50 seconds end time 020623 21600 11 10 48 754 03 22 50 276 add 1000 microseconds to a time stamp 26 character date and time 020623 21700 11 10 48 754 277 c adddur 1000 ms total time 020623 21800 11 10 48 758 0001 01 01 00 00 00 001000 11 10 48 733 38 RTPA for RPG User Manual 278 279 Z ADD Z ADD 14 25 zero TESD 14 250 LocatTotal 12 010113 21900 11 10 48 758 050415 22000 11 10 48 758 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 011227 22200 11 10 48 760 020623 22300 11 10 48 760 MOVE INPUT ORDER AND LINE TO KORDER AN
67. first in Libl WRKSPLF Delete Spooled Files for Current User Sign On WRKSBMJOB JOB Option 1 ES Clear RTPA Expanded Objects in Lib Z AUDIT F3 Exit for All Users with CALL ZSCLRFIL Figure 4 9 Selection of User Profile maintenance to change User compile overrides ZSPGM11R PHH Type options pres Real Time Program Audit for RPG V4R3 Darek 2 02 07 User Profile Maintenance vee Ie TOROS S FS CO apply joel KA Paul RIPA jorenbul Ine RPGLE Only Override Valid Overrides RTPA Default Generation Severity Level 10 PEZA 10 Type Conversion Options all valid options NONE Default Activation Group INO SAS RPGLE NCES Delay PREPARE NGS SNO NO Commitment Control SATS OS NO BDE CHG Close SQL Cursor ENDMOD ENDACTGRP ENDACTGRP Allow Null Values all valid options NO Fix Numeric all valid options NONE ZONED INPUTPACKED Debugging Views all valid options TAGS Hr Optimization Level BASIC NONE NONE Truncate Numeric INO ila Default Jobq for Audits Default Outq for Audits Target Release all valid options CURRENT User Profile all valid options Authority all valid options LIBCRTAUT Language ID all valid options JOBRUN F3 Exit F5 Apply F6 RPGIII Compile Options and Overrid
68. for RPG User Manual Selecting multiple source members Mass compiles genetic program group of source programs in a source file an after the program name or all the source programs in a source file FALL in the program name may be expanded with RTPA audit statements using notation similar to that used in PDM Program Development Manager In the following illustration all of the programs in beginning with TEST in the source file QRPGLESRC will be expanded with RTPA audit statements and the expanded object programs will be placed in library Z AUDITE The source type of the program eg RPGLE SQLRPGLE and the Create as option are used in the expansion Together with the program audit options Command Key 6 and the compiler overtides ZSPGMOIR Real Time Program Audit for RPG V4R3 Date 5 18 07 PHH Select Program to Audit times 2082975859 Type choices press F10 Input Source Member Name TEST Name generic ALL F4 List DARING NES rt ORPGLESRC Name ioseeuey Nette 5 9 ZSAUDIT Name OloJex tro lues y s s s o Name Create ASt RENE M PGM MOD ND Ola able OUNG s 5 e 4 s SAME Name SAME Max Audit Pages 5 s 2550 00 SO ESTO GS CO TT STRE BL 4 ss LIBL JOBD isa aii ames nie OGPL Name Audit Compile Listing Stmts to JS 9 SSS Only to EG EG to F1 Help F3 Exit F4 Prompt F5 Refres
69. incorrect result 1 5 16 WebFaced Interactive program UJ Select Option to execute Program s and audit F3 Exit F5 WRKSPLF to review Audits C 2000 2002 Harkins Audit Software Inc Figure C 1 RTPADEMO command to display Menu of RTPA for RPG program examples RTPA for RPG User Manual 107 ZSPGM37R Real Time Program Audit for RPG V4R3 Date 2 05 07 PHH Examples of RPG Program Auditing in Real time Time 16 31 26 Opt RPG Program Function ES Programs Executed 1 Interactive with calls to interactive and batch NEWEXPSH I 2 Beron vita call tO bacen BATCHPGM1 B 3 Free Format RPG TESTFREE B 4 Interactive Embedded SQL GETEXPSHQ I 5 Batch Embedded Dynamic SOL 6 Interactive Embedded Dynamic SQL with Subfile SOL100 I 7 Interactive RPGIII with calls to batch GETEXPSH I 8 Batch with CALLP Call with prototype ESTPRCIF B 9 Interactive with CALLB Call with bound in procedure ZSTESTINB 10 CRTPGM ZSTESTINB from modules NEWEXPSHB BATCHPGM1 TEST3 11 Batch as Service Program 12 13 Interactive program with abend 14 Interactive program with incorrect result 15 16 WebFaced Interactive program 17 3 Select Option to execute Program s and audit F3 Exit F5 WRKSPLF to review Audits C 2000 2002 Harkins Audit Software Inc Figure C 2 Select Option 3 to execute TESTFREE expanded program and p
70. isn t even certain of where the bug occurs stepper debuggers may not be able to help because the programmer doesn t know whete to put breakpoints To complicate matters further some bugs only occur under very particular input conditions that the programmer may not be able to replicate in a test environment or in attempting to reconstruct the exact data previously processed Thankfully RTPA is uniquely powerful for finding difficult software bugs with no programmer intervention required When a failure in a test or production environment can t be easily replicated in the lab or if it is infrequent enough to make stepper type debugging impractical auditing the program can be the best way to find and fix the program An audit enabled program shows everything that occurs before during and after the bug By searching for the audit file by execution time data values or specific operations a programmer can find and review the problem in complete detail and track back to the source or cause of the problem Improving Quality and Reliability As the demand for productivity increases and applications become more complex and critical most programmers also feel increased demand for program quality Many programmers have had to become experts in software testing and validation as part of their jobs The testing process can be slow and difficult in many cases particularly when testing software modules such as validating the values of data variables in subr
71. la NO Eee ed 5722WDS V5R4M0 060210 RN TBM ILE RPG QTEMP NEWEXPSH Command E CRTBNDRPG Issued by PHH Program TE NEWEXPSH av Text description SRCMBRTXT Source Member NEWEXPSH Source File ZSCOP INP Library OTEMP 5 8 A 37 Text description copied input RPG source to QTEMP Last Change 01 90 07 16394534 Generation severity level 10 Default activation group SIS Compiler options XRE GEN NOSECLVL SHOWC EXPDDS SETE NOSHOWSKP NOSRC V erac F3 Exit F12 Cancel F19 Left F20 Right F24 More keys Figure 2 5 Input compile for NEWEXPSH input source program Entering a P to the left of the Input will convert the WRKSPLF file to a searchable PDF on the IFS and display the input source program compile listing in searchable PFD if the required IBM software and Adobe Reader 7 0 is installed The RTPAPDF command may by used to concert RTPA audit spool file output file ZZAUDITP to searchable PDF on the IFS if the appropriate IBM software is installed RTPA for RPG User Manual 34 Type choices press Enter Spoolfile name Job name Usei Number S Spoolfile number MR Ser oder PDF document name BaseFont Pagesize F3 Exit F4 Prompt F24 More keys NEWEXPSH NEWEXPSH 056097 ALAST CURDIR GE ADEM AUT F12 Cancel Convert SCS SpoolFile into PDF RTPAPDF Name Name Name 000000 999999
72. movsw blanks BOL 010113 43400 11 11 14 070 2 494 C OR COUNTER 0 BOL 010113 43500 11 11 14 070 3 496 C endif E01 010113 43700 11 11 14 070 497 010113 43800 11 11 14 070 499 C 100 DIV 5 25 NET 30 01 000323 48400 11 11 14 070 19 500 C MVR FRACT 44 01 000323 48500 11 11 14 070 2500 502 GOT ORDER DETAIL PRINT IT 000514 44300 11 11 14 070 503 C EXCEPT PRTDET 234 000514 44400 11 11 14 070 505 GET THE CUSTOMER MASTER STORE RECORD 991225 44600 11 11 14 070 506 C Z ADD ODCUST CUCUST 991225 44700 11 11 14 070 1000 1000 507 C Z ADD ODSTOR CUSTOR 991225 44800 11 11 14 070 1 1 508 010118 44900 11 11 14 070 509 THIS ROUTINE CAUSES THE WRONG CUSTOMER TO BE DISPLAYED 010118 45000 11 11 14 070 510 IF THE ORDER DETAIL FILE HAS BEEN UPDATED TWICE AND ONLY TWICE 010118 45100 11 11 14 070 146 RTPA for RPG User Manual 511 FIND THE ERROR ON THE AUDIT REPORT BY 512 C UPDREC IFEQ 2 513 C ADD 514 C Z ADD 515 C MOVEL 2 1050 1 ALL A SCANNING FOR 2050 CUCUST 2050 CUSTOR 1 MSGDA 516 C MOVEL ALL B MSGDB BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB 517 call with parms 518 C CALL BATCHPGMI 11 11 14 114 519 C PARM MSGDA 520 C PARM MSGDB BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
73. ng maerore NS TENES Seqnbr 8 00 PGM ORDLINE Cc 41 Y 00 Change parameter ORDLINE 12 00 CHGVAR VAR amp ORDLINE VALUE 000150000001 ORDLINE 41 000150000001 d 1300 call RPGLE program NEWEXPSH and pass parameter ORDLINE 14 00 CALL PGM NEWEXPSH PARM amp ORDLINE ORDLINE 9 41 000150000001000000ABC STORES STORE 4522 Program NEWEXPSH New Expected Ship Date from Order Detail RPGIV Obj Lib NEWEXPSH NEWEXPSH Job 360073 User Profile PHH Source Type RPGLE Ile e 6 6 F3 Exit F12 Cancel F19 Left F20 Right F24 More keys Figure P 4 RTPA Query display of audit output for an entire logical job by execution time Display Spooled File Be EEE ZZAUDITS Page Line 80 44 e ouo Columns L 78 Bu cl peewee ene 2 Fields NEW SP Ot SAIS US S Program NEWEXPSH Field Cross Reference Fields NEWEXPSH Field T Len Dec Elem U R File Library Description CUNAME A 25 I Y CUSTMAST ZSAUDIT CUSTOMER NAME CUSNM A 39 X CUSTA A 2 I Y CUSTMAST ZSAUDI STATE CUSTAT A 2 JL CUSTMAST ZSAUDI STATUS CUSTNAMEV A 25 Y CUSTOR Ig 7 0 ies CUS MAST ZSAUDI STORE NUMBER CUTELE A 14 JE CUSTMAST ZSAUDIT TELEPHONE CUWEBA A 256 L CUSTMAST ZSAUDIT WEBA CUWEB1 A 25 JL CUSTMAST ZSAUDI WEB1 CUWEB2 A 25 1 CU
74. of Statements to Audit ssssssssseeeeeeenenen nennen 50 Conditional Auditing with Variable Values seems 51 Example of finding a transient error With RTPA L L L L L S 51 Overriding Compile Options ssie isie eindini enin iee ia aek nenne trennt trennen 54 Creating the Expanded Object Program with F10 sese 58 View Job Status o rester 59 RTPA Expansion Status Codes 0 nde ea etie enurese nada 60 Builtiln Flelp e Ate Saman ete dieere 61 Selecting multiple source members Mass compiles sene 62 Instant RTPA Program Auditing with the iRTPA command u 63 Using the RTPA Maintenance Menu to manage 68 RTPA Audit output in Character and Hexadecimal HEX seen 75 Chapter 5 Advanced Auditing Focused Auditing 79 Using the F11 Command Key to compile the input source eee 80 Using the F16 Command Key to audit desired variables seen 81 Chapter 6 Working with Audit Files 84 Reading Audit Files WRKSPLF and PDF files eene 84 Converting spool files to PDF files on the IFS sene nen 84 Searching the ZZAUDITP Audit file with the
75. the audit enabled executable object is executed it automatically produces audit output which is sent to the printer file ZZAUDITP Reviewing an Audit File The audit file is sent to the printer file ZZAUDITP You can print out that file or use WRKSPLF to display the spooled file Audit Statement Ordering By default RTPA audits some statements prior to execution and audits other statements after execution Data Modifying Statements By default RTPA audits data modifying statements i c ADD MULTIPLY MOVE CHAIN after they are executed The audit produced this way reflects the data results of the statement EVAL Statements The EVAL DOW and WHEN statements ate audited after the EVAL and a continuation statements i e AND OR for the EVAL are executed 45 RTPA for RPG User Manual Branching and Conditional Statements Branching and Conditional RPG operations i e EXSR GOTO IF RETURN are audited before the soutce statement is executed Special Case Uninitialized Fields Numeric fields defined as define storage DS fields data type Z or zoned decimal in RPGIII and data type S in RPGIV that are located in an IF statement are not audited prior to execution This is done to avoid possible decimal data errors Zoned decimal data types Z and S fields are audited in all other source program statements The DO UNTIL DOUXX RPGIII and DOU RPGIV operation statement code does not show the content of the variables No
76. videos Videos Server investors news contact The Power of Knowing H a r ki NS Audit Software home products services support company RTPA Videos RTPA Overview How to Install RTPA Advanced Program Auditing Techniques How to Make Source Programs Much Smarter How to Quickly Master Entire Applications Part 1 How to Quickly Master Entire Applications Part 2 How to Sately Implement Programs Into Production RTPA tor CLP Overview RTPA tor COBOL Overview RTPA Query Overview Summary by Execution Time Business Intelligence Metadata Creation with RTPA ry Internet FOR i ii gt RTPA for RPG User Manual 18 investors news contact The Power of Knowing Har kins Audit Software home products services support company home page videos Contact Information About Us GUI RTPA Videos GUI RTPA tor RPG with IBM WebFacing Employment GUI RTPA tor RPG with IBM HATS GUI RTPA with the WStt WebSetting Template Tool 12 Steel Balls Puzzle Solution and Interactive Game in the Java Language 12 Steel Ball Puzzle Solution in the C Language for any number of steel balls 12 Steel Balls Puzzle Solution in the Python Language 12 Steel Balls Puzzle Solution in the RPG Language with Full Electronic Program Auditing of program Processing 12 Steel Balls Puzzle Solution in the COBOL Language with Full Electronic Program Auditing of program Pro
77. 0 11 11 14 069 2 472 C AND ANSWER 7 OR BOL 010615 41300 11 11 14 069 7 473 C ANSWER 5 BOL 010615 41400 11 11 14 069 7 474 C Z ADD 3 COUNTER 01 010615 41500 11 11 14 070 3 475 C ENDIF E01 010615 41600 11 11 14 070 476 0 010615 41700 11 11 14 070 477 010615 41800 11 11 14 070 478 AUDIT RPGIV MOVEL PADDED WITH BLANKS STATEMENT 010522 41900 11 11 14 070 479 C MOVEL ALL M TESTML 20 001029 42000 11 11 14 070 MMMMMMMMMMMMMMMMMMMM 480 C MOVEL P LEFT TESTML 001029 42100 11 11 14 070 LEFT 481 010330 42200 11 11 14 070 482 all lower case statements 010330 42300 11 11 14 070 483 C movel ALL L testlo 20 010330 42400 11 11 14 070 LLLLLLLLLLLLLLLLLLLL 11 10 48 733 484 C z add 11111 aaaaaaaaaa 6 0 010330 42500 11 11 14 070 11111 485 C z add 2222222 bbbbbbbbbb 83 010618 42600 11 11 14 070 22222 000 486 C aaaaaaaaaa add bbbbbbbbbb cccccccccc 80 010330 42700 11 11 14 070 11111 22222 000 33333 487 s P 001029 42800 11 11 14 070 488 AUDIT RPGIV TIME STATEMENT 001029 42900 11 11 14 070 489 C TIME TIMENOW 60 001029 43000 11 11 14 070 111114 490 x 001029 43100 11 11 14 070 491 C movel t movsw 1 010530 43200 11 11 14 070 2 492 AUDIT RPGIV IF STATEMENT 010113 43300 11 11 14 070 493 C if
78. 0 11 11 32 493 42 65 107 724 C D MULT D2 D4 01 010624 66500 11 11 32 493 33343536373839404142121212 056057058059060061062063064065000000000 18481938203021242220231824182520262427300000000000000000000000000000000000000000 725 C 2 MULT D I WORK5 51 01 010624 66600 11 11 32 493 42 84 0 726 C D I MULT 5 WORK7 72 01 010624 66700 11 11 32 493 42 210 00 727 C I IFEQ 5 B02 010624 66800 11 11 32 493 10 730 C END E02 010624 67100 11 11 32 493 731 C D I IFEQ 7 B02 010624 67200 11 11 32 493 42 734 C END E02 010624 67500 11 11 32 493 735 C D I IFEQ D2 I B02 010624 67600 11 11 32 493 42 65 736 C D 2 OREQ D2 3 02 010624 67700 11 11 32 493 34 58 737 C D2 I ANDNE D3 I 02 010624 67800 11 11 32 493 65 107 738 C D4 I ANDEQ D3 3 02 010624 67900 11 11 32 493 2730 93 741 C END E02 010624 68200 11 11 32 493 742 C D I IFEQ 9 B02 010624 68300 11 11 32 493 42 745 C END E02 010624 68600 11 11 32 493 719 C DO 13 I 30 B01 010624 66000 11 11 32 493 11 720 C Z ADD I D I 01 010624 66100 11 11 32 493 11 11 721 C ADD 32 D I 01 010624 66200 11 11 32 494 43 722 C D I ADD 23 D2 I 01 010624 66300 11 11 32 494 43 66 723 C D I ADD D2 I D3 I 01 010624 66400 11 11 32 494 157 RTPA for RPG User Manual PAGE 43 66 109 724 C D MULT D2 D4 01 010624 66500 11 11 32 494 33343536373839404142431212 056057058059060061062063064065066000000 184819382030212422202318241825202624273028380000
79. 00 78900 79000 79100 79200 79300 79400 79500 79200 79300 79400 79500 79600 80000 80100 80200 80300 80400 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 32 32 32 32 32 32 32 32 32 32 32 32 32 32 11 32 513 513 513 513 513 513 513 513 513 513 514 CUAD2 514 514 514 514 CUAD2 THIRD FLOOR 11 11 11 11 11 11 11 11 11 11 32 32 32 32 32 32 32 32 32 32 514 514 514 514 514 514 514 514 514 514 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 80500 11 11 32 514 864 C add 123 45 workcounter 123 45 865 C EVAL Indx Indx 4 1 2 2 863 C DOW Indx lt ELEM LocatTotal 2 01 010812 01 010812 01 010812 80600 11 11 32 515 80400 11 11 32 515 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 80500 11 11 32 515 864 C add 123 45 workcounter 246 90 865 C EVAL Indx Indx 1 3 3 863 C DOW Indx lt ELEM LocatTotal 3 01 010812 01 010812 B01 010812 11 10 48 733 PAGE 80600 11 11 32 515 80400 11 11 32 515 00000000000000000000000000000000000000000000000000000
80. 00 103 0 Nay 001029 34400 16 54 00 103 MONIES 5 4 5 F3 Exit F12 Cancel F19 Left F20 Right F24 More keys Figure 7 6 Example of auditing File Key fields for a CHAIN operation 95 RTPA for RPG User Manual Documentation Only with Z C Comment Auditing The User can insert RTPA documentation comment statements to make the copied input source statement more readable The RTPA Documentation Only option only inserts documentation Z comment statements and no executable Z audit statements are inserted with this option Type choices press F5 to apply Types of Statements to Audit Option Externals Y File I O Y ranches Y onditionals X rithmetic operations Y Y O lt B e A M operations Audit calc comment statements Audit copybook subroutines Show all variable values L A A Y Incl Y Incl Y Incl Y Yes lude Y Incl Y Inclu ude de lude Y Incl Y Incl Y Incl Lude ude ude ude ZSPGMO1R Real Time Program Audit for RPG V4R3 PHH Job Audit Options Maintenance for this Expand Date 3 Time 1 18 07 75025329 F3 Exit F5 Apply F12 Cancel C To make Source Program more readable No RTPA ZS Audit Stmts are generated 2000 2002 Harkins Audit Software Inc pd ines of record data i 0 1 2 A All Fields udit Zoned Decimal variables Y Y Yes DS may not be initialized udit File Key Fields X MINER May be not initialize
81. 00 o cuad1 69 0126 00 o cuad2 95 0127 00 o cucity 121 0128 00 o custa 124 0129 00 o 132 prtrec 0130 00 o e prtfre 1 0131 00 o cucust z 7 0132 00 o custor z 15 0133 00 o cuname 42 0134 00 o cuad1 69 0135 00 o cuad2 95 0136 00 o fstore z 103 0137 00 o 132 prtfre kkkkkkkkkkkkkkkkk End of data kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk RTPA for RPG Audit Output TESTFREE Free Format RPG Batch Note This entire program execution and RTPA Audit took 0 032 ELAPSED second End Time 11 10 13 627 minus Start Time 11 10 13 595 Program TESTFREE Test Free format RPG specs Obj Lib ZSAUDITE Initiated 12 09 06 11 10 13 595 PAGE TESTFREE TESTFREE Job 026982 User Profile PHH Source File Library QRPGLESRC ZSAUDIT Line Do SrcId ChgDat Seq Time 50 get current time 060319 2900 11 10 13 595 51 c time times 6 0 030207 3000 11 10 13 595 111013 52 c eval cucust 4321 030207 3100 11 10 13 595 4321 53 c except audstr 030207 3200 11 10 13 595 54 start free form 060319 3300 11 10 13 595 56 sorder max 1234 56 020721 3500 11 10 13 595 1234 56 57 comment 1 030207 3600 11 10 13 595 120 RTPA for RPG User Manual 1 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 75 76 77 78 79 80 81 82 83 porder 1500 1500 comment 2 exsr moveit iorder 78 543 78 543 complex free form statement compute xorder xorder porder 13 45 1618 19 1500 this is a
82. 00000000000000000000000000000 18481938203000000000000000000000000000000000000000000000000000000000000000000000 11 10 48 733 725 C 2 MULT D I WORK5 51 01 010624 66600 11 11 32 485 35 70 0 726 C D I MULT 5 WORK7 72 01 010624 66700 11 11 32 485 35 175 00 727 C I IFEQ 5 B02 010624 66800 11 11 32 485 3 730 C END E02 010624 67100 11 11 32 485 731 C D I IFEQ 7 B02 010624 67200 11 11 32 485 35 734 C END E02 010624 67500 11 11 32 485 735 C D I IFEQ D2 I B02 010624 67600 11 11 32 485 35 58 736 C 955 2 OREQ D2 3 02 010624 67700 11 11 32 485 34 58 737 C D2 I ANDNE D3 I 02 010624 67800 11 11 32 485 58 93 738 C D4 I ANDEQ D3 3 02 010624 67900 11 11 32 485 2030 93 741 C END E02 010624 68200 11 11 32 485 742 C D I IFEQ 9 B02 010624 68300 11 11 32 485 35 745 C END E02 010624 68600 11 11 32 485 719 C DO 13 I 30 B01 010624 66000 11 11 32 485 4 720 C Z ADD I D I 01 010624 66100 11 11 32 485 4 4 721 C ADD 32 D I 01 010624 66200 11 11 32 485 36 722 C D I ADD 23 D2 I 01 010624 66300 11 11 32 485 36 59 723 C D I ADD D2 I D3 I 01 010624 66400 11 11 32 486 153 RTPA for RPG User Manual PAGE 36 59 95 724 C D MULT D2 6554 01 010624 66500 11 11 32 486 33343536231236121212121212 056057058059000000000000000000000000000 18481938203021240000000000000000000000000000000000000000000000000000000000000000 725 C 2 MULT 660 I WORK5 51 01 010624 66600 11 11 32 486 36 72 0 726 C 660
83. 00000000000000000000000000000000 725 C 2 MULT 660 I WORK5 51 01 010624 66600 11 11 32 494 43 86 0 726 C 660 I MULT 5 WORK7 72 01 010624 66700 11 11 32 494 43 215 00 11 10 48 733 727 C I IFEQ 5 B02 010624 66800 11 11 32 494 11 730 C END E02 010624 67100 11 11 32 494 731 C 660 I IFEQ 7 B02 010624 67200 11 11 32 494 43 734 C END E02 010624 67500 11 11 32 494 735 C 660 I IFEQ D2 I B02 010624 67600 11 11 32 494 43 66 736 C 660 2 OREQ D2 3 02 010624 67700 11 11 32 494 34 58 737 C 5572 I ANDNE D3 I 02 010624 67800 11 11 32 494 66 109 738 C D4 I ANDEQ D3 3 02 010624 67900 11 11 32 494 2838 93 741 C END E02 010624 68200 11 11 32 494 742 C 660 I IFEQ 9 B02 010624 68300 11 11 32 494 43 745 C END E02 010624 68600 11 11 32 494 719 C DO 13 I 30 B01 010624 66000 11 11 32 494 12 720 C Z ADD I 660 I 01 010624 66100 11 11 32 494 12 12 721 C ADD 32 660 I 01 010624 66200 11 11 32 494 44 722 C 660 I ADD 23 D2 I 01 010624 66300 11 11 32 494 44 67 723 C 660 I ADD D2 I D3 I 01 010624 66400 11 11 32 494 44 67 111 724 C D MULT D2 D4 01 010624 66500 11 11 32 494 33343536373839404142434412 056057058059060061062063064065066067000 18481938203021242220231824182520262427302838294800000000000000000000000000000000 725 C 2 MULT SD I WORK5 51 01 010624 66600 11 11 32 494 44 88 0 726 C 660 I MULT 5 WORK7 72 01 010624 66700 11 11 32 494 44 220 00 727 C I IFEQ 5 B02 010624 66800 11 11 32 494 12 730 C END
84. 0000000000000000000000000000000000000000000 363 010522 30400 11 11 12 862 364 AUDIT RPGIV DOW STATEMENT 000918 30500 11 11 12 862 365 C Z ADD ZERO COUNTER 20 000918 30600 11 11 12 862 0 366 C DOW COUNTER 6 B01 000918 30700 11 11 12 862 0 367 C ADD 1 COUNTER 01 000918 30800 11 11 12 862 1 366 C DOW COUNTER 6 B01 000918 30700 11 11 12 862 1 134 RTPA for RPG User Manual 367 C ADD 1 COUNTER 01 000918 30800 11 11 12 862 2 366 C DOW COUNTER BOL 000918 30700 11 11 12 862 2 367 C ADD 1 COUNTER 01 000918 30800 11 11 12 862 3 366 C DOW COUNTER BOL 000918 30700 11 11 12 862 3 367 C ADD 1 COUNTER 01 000918 30800 11 11 12 862 4 366 C DOW COUNTER BOL 000918 30700 11 11 12 862 4 367 C ADD 1 COUNTER 01 000918 30800 11 11 12 862 5 11 10 48 733 366 C DOW COUNTER 6 B01 000918 30700 111 11 12 862 5 367 C ADD 1 COUNTER 01 000918 30800 11 11 12 862 6 368 C ENDDO E01 000918 30900 111 11 12 862 369 000918 31000 11 11 12 862 370 AUDIT RPGIV select WHEN OTHER STATEMENTS 001029 31100 11 11 12 862 371 C SELECT B01 001029 31200 11 11 12 862 372 C WHEN COUNTER 6 X01 001029 31300 11 11 12 862 6 372 C WHEN COUNTER 6 X01 001029 31300 11 11 12 862 6 373 C Z ADD ZERO COUNTER 01 001029 31400 11 11 12 862 0 375 C ENDSL EO1 001029 31600 11 11 12 863 376 AUDIT RPGIV select
85. 0000000000000000000000000000000000000000000000000000000000000000000 80500 11 11 32 515 864 C add 123 45 workcounter 370 35 865 C EVAL Indx Indx 1 4 4 863 C DOW Indx lt ELEM LocatTotal 4 01 010812 01 010812 01 010812 80600 11 11 32 515 80400 11 11 32 515 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 80500 11 11 32 515 01 010812 01 010812 01 010812 80600 11 11 32 515 80400 11 11 32 516 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 80500 11 11 32 516 864 C add 123 45 workcounter 493 80 865 C EVAL Indx Indx 1 5 5 863 C DOW Indx lt ELEM LocatTotal 5 864 C add 123 45 workcounter 617 25 865 C EVAL Indx Indx 1 01 010812 01 010812 80600 11 11 32 516 RTPA for RPG User Manual 162 6 6 863 C DOW Indx lt ELEM LocatTotal BO1 010812 80400 11 11 32 516 6 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 864 C add 123 45 workcounter 01 010812 80500 11 11 32 516 740 70 865 C EVAL Indx Indx 1 01 010812 80600 11 11 32 516 7 7 863 C DOW Indx lt ELEM LocatTotal BO1 010812 80400 11 11 32 516 7 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 864 C add 123 45 workcounter 01 010812 8
86. 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 864 C add 123 45 workcounter 01 010812 80500 11 11 32 516 1481 40 865 C EVAL Indx Indx 1 01 010812 80600 11 11 32 516 13 13 866 C ENDDO E01 010812 80700 11 11 32 520 868 C Z ADD 45 NEXT 20 010812 80900 11 11 32 520 45 869 C Z ADD zero counter 010812 81000 11 11 32 520 0 870 C movel W CKASTA 1 010812 81100 11 11 32 520 W 11 10 48 733 PAGE 871 C DOW COUNTER 6 AND B01 010812 81200 11 11 32 520 0 828 C CKASTA W B01 010812 81300 11 11 32 520 W 873 C ADD 1 COUNTER 20 01 010812 81400 11 11 32 520 1 871 C DOW COUNTER 6 AND B01 010812 81200 11 11 32 520 163 RTPA for RPG User Manual 1 PAGE 828 CKASTA W 01 010812 81300 11 11 32 520 W 873 ADD 1 COUNTER 01 010812 81400 11 11 32 520 2 871 DOW COUNTER lt 6 AND B01 010812 81200 11 11 32 520 2 828 CKASTA W B01 010812 81300 11 11 32 520 W 873 ADD 1 COUNTER 01 010812 81400 11 11 32 520 3 871 DOW COUNTER lt 6 AND B01 010812 81200 11 11 32 520 3 828 CKASTA W B01 010812 81300 11 11 32 520 W 873 ADD 1 COUNTER 01 010812 81400 11 11 32 520 4 871 DOW COUNTER lt 6 AND 01 010812 81200 11 11 32 520 4 828 CKASTA W 01 010812 81300 11 11 32 520 W 873 ADD 1 COUNTER 01 010812 81400 11 11 32 520 5 871 DOW COUNTER lt 6 AND B01 010812 81200 111 11 32 522 5 828 CKASTA W B01 010812 81300 11 11 32 522 W 873 ADD 1 COUNTER 01 010812 81400 11 1
87. 01 010624 66300 11 11 32 483 34 57 723 C D 1 ADD D2 I D3 I 01 010624 66400 11 11 32 483 34 57 91 724 C D MULT D2 D4 01 010624 66500 11 11 32 483 33341806231236121212121212 056057000000000000000000000000000000000 18481938000000000000000000000000000000000000000000000000000000000000000000000000 725 C 2 MULT D I WORK5 51 01 010624 66600 11 11 32 483 34 152 RTPA for RPG User Manual 68 0 PAGE 726 C D I MULT 5 WORK7 72 01 010624 66700 11 11 32 483 34 170 00 727 C I IFEQ 5 B02 010624 66800 11 11 32 483 2 730 C END E02 010624 67100 11 11 32 483 731 C D I IFEQ 7 B02 010624 67200 11 11 32 483 34 734 C END E02 010624 67500 11 11 32 483 735 C D I IFEQ D2 I B02 010624 67600 11 11 32 483 34 57 736 C D 2 OREQ D2 3 02 010624 67700 11 11 32 483 34 0 737 C D2 I ANDNE D3 I 02 010624 67800 11 11 32 483 57 91 738 C D4 I ANDEQ D3 3 02 010624 67900 11 11 32 483 1938 0 741 C END E02 010624 68200 11 11 32 485 742 C D I IFEQ 9 B02 010624 68300 11 11 32 485 34 745 C END E02 010624 68600 11 11 32 485 719 C DO 13 I 30 B01 010624 66000 11 11 32 485 3 720 C Z ADD I D I 01 010624 66100 11 11 32 485 3 3 721 C ADD 32 D I 01 010624 66200 11 11 32 485 35 722 C D I ADD 23 D2 I 01 010624 66300 11 11 32 485 35 58 723 C D I ADD D2 I D3 I 01 010624 66400 11 11 32 485 35 58 93 724 C D MULT D2 D4 01 010624 66500 11 11 32 485 33343506231236121212121212 0560570580
88. 01 991225 000323 45200 11 45300 11 45400 11 45500 11 45600 11 45700 11 45800 11 051007 46000 11 46100 11 46200 11 46500 11 46600 11 46700 11 46800 11 46900 11 47000 11 47100 11 47200 11 47300 11 47400 11 47500 11 11 47700 11 47900 11 48000 11 48100 11 48200 11 48300 11 48400 11 48500 11 48600 11 48900 11 49100 11 11 14 070 11 14 070 11 14 070 11 14 070 11 14 070 11 14 070 11 14 070 45900 11 11 14 070 11 14 114 11 14 114 11 14 114 010118 46400 11 14 114 CUAD2 THIRD FLOOR 11 14 114 11 14 114 11 14 114 11 14 114 11 14 114 11 14 114 11 14 117 11 14 117 11 14 117 11 14 117 10 48 733 11 14 117 PAGE 11 14 117 11 14 117 11 14 117 11 14 117 11 14 117 11 14 117 11 14 117 11 14 117 11 14 117 11 14 117 RTPA for RPG User Manual 147 117 117 117 WRITE TIMEN 111114 495 READ TIMEN 111114 495 495 495 495 495 495 495 495 495 495 495 495 495 495 495 495 495 495 495 495 495 495 495 495 495 551 C DISPO2 TAG 000514 49200 11 11 14 552 C TIME TIMEN 6 0 START TIMO10501 49300 11 11 14 111114 553 C EXFMT NEWEXPD2 051007 49400 11 11 14 INO3 0 IN43 0 EXPMDY 011807 KCUSNO 0002050 KCUSNA XYZ STORE ARDMORE UDATE 120906 KSTORE 0000001 KORDER 0001500 KLINE 00002 553 C E
89. 026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 0090 0091 0092 0093 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 d scust 48 d fstore 55 d movesw2 62 c na c c c custkey klist get current time amp time eval except tart free form free sorder max 1234 56 comment 1 porder 1500 comment 2 exsr moveit iorder 78 543 54 0 61 0 63 cucus custo times cucust 4321 audstr complex free form statement compute xorder xorder porder 13 45 this is a continuation free form statement preceeded with 26 2 if porder lt 1500 iorder xorder porder 87 43 1103 5 comment 3 endif comment 4 zorder final porder iorder xorder sorder_max scust 1000 compound if group if porder gt 1500 or iorder xorder or xorder gt 1 1234 iorder xorder porder porder 2 87 43 1103 5 comment 3 endif setll scust custmast reade scust custmast dow not eof custmast fstore custor
90. 0500 11 11 32 516 864 15 865 C EVAL Indx Indx 1 01 010812 80600 11 11 32 516 8 8 863 C DOW Indx lt ELEM LocatTotal B01 010812 80400 11 11 32 516 8 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 864 C add 123 45 workcounter 01 010812 80500 11 11 32 516 987 60 865 C EVAL Indx Indx 1 01 010812 80600 11 11 32 516 9 9 863 C DOW Indx lt ELEM LocatTotal BO1 010812 80400 11 11 32 516 9 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 864 C add 123 45 workcounter 01 010812 80500 11 11 32 516 1111 05 865 C EVAL Indx Indx 1 01 010812 80600 11 11 32 516 10 10 863 C DOW Indx lt ELEM LocatTotal B01 010812 80400 11 11 32 516 10 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 864 C add 123 45 workcounter 01 010812 80500 11 11 32 516 1234 50 865 C EVAL Indx Indx 1 01 010812 80600 11 11 32 516 11 11 863 C DOW Indx lt ELEM LocatTotal B01 010812 80400 11 11 32 516 11 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 864 C add 123 45 workcounter 01 010812 80500 11 11 32 516 1357 95 865 C EVAL Indx Indx 1 01 010812 80600 11 11 32 516 12 12 863 C DOW Indx lt ELEM LocatTotal B01 010812 80400 11 11 32 516 12 0000000000000
91. 0800 11 11 32 505 1 769 C Z ADD 2 longindex 30 010627 71000 11 11 32 505 2 770 C Z ADD 4 shorter 3 0 010627 71100 11 11 32 505 4 771 C D longindex MULT 3 WORK5 5 1 010627 71200 11 11 32 506 34 102 0 772 C D longindex ifeq 2 BOL 010627 71300 11 11 32 506 34 774 C end E01 010627 71500 11 11 32 506 775 C d shorter add d Longindex 9954 shorter 010627 71600 11 11 32 506 36 34 70 776 test built in functions BIFs 010812 71700 11 11 32 506 TT w w 010812 71800 11 11 32 506 778 SUBST BIF 010812 71900 11 11 32 506 779 C eval Phone 6105551212 010812 72000 11 11 32 506 6105551212 781 C eval AreaCode SUBST Phone 1 3 SUBST BI010812 72200 11 11 32 506 610 6105551212 782 C eval Exchange SUBST Phone 4 3 SUBST BI010812 72300 11 11 32 506 555 6105551212 783 C eval Local SUBST Phone 7 SUBST BI010812 72400 11 11 32 506 1212 6105551212 784 Rm ee 010812 72500 11 11 32 506 785 SCAN REPLACE BIF 010814 72600 11 11 32 506 786 C eval CusNm Tom amp Jerry SUBST B 010814 72700 11 11 32 507 Tom amp Jerry 787 C eval ScanX scan amp CusNm SUBST B 010814 72800 11 11 32 507 160 RTPA for RPG User Manual 788 790 789 746 791 792 793 794 795 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 815 816 817 818 819 822 823 824 825 826 827 829 830 832 833 834 835 836 4 Tom
92. 1 i 20061126 oe 321C milt 100 ex 60 01 000000 26800 17 38 35 571 322 egpmy add my expndy MiDDYY 01 000000 26900 17 38 35 571 323 C endi f ODEXFD IFNE 0 E01 000000 27000 17 38 35 571 327 C z add zero sme 70 EVAL RESULT 000000 27400 17 38 35 571 328 eval 102286 pede expyy 000000 27500 17 38 35 571 expyr 000000 27800 17 38 35 571 112610 333 C EVAL STSC BLANKS 000000 28000 17 38 35 571 336 movel ME yen 1 000000 28300 17 38 35 571 337 movel v tee ine 1 000000 28400 17 38 35 571 338 C Setoff 33 000000 28500 17 38 35 571 339 C IF mer ine pes and B01 000000 28500 17 38 35 571 340 C ges OFF AND B01 000000 28700 17 38 35 671 341 C INLR OFF B01 000000 28900 17 38 35 571 342 C movel 2 piae 1 01 000000 28900 17 38 35 571 Search PDF Finished searching for exfmt Total instances found 14 se nen Search Results EXFMT NEW E EXFMT NEWEXPD1 000000 23700 17 38 3 E C EXFMT NEWEXPD2 000000 49400 17 38 3 ET C EXFMT NEWEXPD2 000000 49400 17 38 3 GY EXFMT NEWEXPD1 000000 23700 17 38 3 ET EXFMT NEWEXPD1 000000 23700 17 38 3 ET EXFMT NEWEXPD2 000000 49400 17 38 3 GY C EXFMT NEWEXPD2 000000 49400 17 38 3 ET C EXFMT NEWEXPD1 000000 23700 17 38 3 E C EXFMT NEWEXPD1 000000 23700 17 38 3 E C EXFMT NEWEXPD2 000000 49400 17 38 3 C EXFMT NEWEXPD2 000000 49400 17 38 3 Ej EXFMT NEWEXPD1 000000 23700 17 38 3 ET EXFMT NEWEXP
93. 1 15 CUAD1 15 B01 01 01 01 020706 3700 11 10 13 595 030207 3800 11 10 13 595 030207 3900 11 10 13 595 020618 4000 11 10 13 595 060319 4100 11 10 13 596 020721 4200 111 10 13 596 060319 4300 111 10 13 596 020721 4400 111 10 13 596 030207 4500 111 10 13 596 030207 4600 11 10 13 596 030207 4700 111 10 13 596 030207 4800 111 10 13 596 030207 4900 111 10 13 596 030207 5000 111 10 13 596 020721 5100 111 10 13 596 030207 5200 11 10 13 597 030218 5300 11 10 13 597 030218 5400 11 10 13 597 030218 5400 11 10 13 597 030218 5500 11 10 13 597 030218 5600 11 10 13 597 030218 5700 11 10 13 598 030218 5800 11 10 13 598 030218 5900 11 10 13 598 030218 6000 11 10 13 598 030207 6100 11 10 13 598 030207 6200 11 10 13 604 CORPORATE DRIVE CORPORATE DRIVE CORPORATE DRIVE CORPORATE DRIVE 030207 6400 11 10 13 605 030207 6500 11 10 13 605 060319 6600 11 10 13 605 030207 6700 11 10 13 605 030207 6800 11 10 13 610 CUAD1 423 MONTGOMERY AVENUE 01 030207 6500 11 10 13 610 060319 6600 11 10 13 610 CUAD2 CUAD2 CUAD2 CUAD2 CUAD2 RTPA for RPG User Manual 121 11 10 13 595 PAGE 2 88 except prtfre 01 030207 6700 11 10 13 610 89 reade scust custmast 01 030207 6800 11 10 13 610 1000 0001000 CUCUST 0001000 CUSTOR 0000002 CUNAME ABC STORES STORE 2 CUAD1 554 ARCH STREET CUAD2 CUCITY PHILADELPHIA CUSTA PA CUZIP 19025 86 fstore custor 01 030207 6500 11 10 13 610 2 2 87
94. 1 32 522 6 874 ENDDO E01 010812 81500 11 11 32 522 877 movel Np Qyes 010812 81800 11 11 32 522 1 878 movel 1 Q1stline 010812 81900 11 11 32 522 1 879 dou lstline yes or 01 010812 82000 11 11 32 522 836 IN33 OFF 01 010812 82100 11 11 32 522 881 movel 3 hold2 01 010812 82200 11 11 32 522 3 882 enddo EO1 010812 82300 11 11 32 522 883 EVAL COUNTER NEXT 010812 82400 11 11 32 522 58 45 840 15 2 010812 82500 11 11 32 522 885 movel E CKRTFL 010812 82600 11 11 32 523 E 886 movel N Qno 010812 82700 11 11 32 523 N 887 movel dii outpt 010812 82800 11 11 32 523 888 movel WMAR EMPL L1RPTN 010812 82900 11 11 32 523 WMAR EMPL 890 select 01 010812 83100 11 11 32 523 891 when LIRPTN WMAR EMPL OR X01 010812 83200 11 11 32 523 WMAR EMPL 892 LIRPTN RTPA EMPL X01 010812 83300 11 11 32 523 WMAR EMPL 891 when LIRPTN WMAR EMPL OR X01 010812 83200 11 11 32 523 WMAR EMPL 848 LIRPTN RTPA EMPL X01 010812 83300 11 11 32 523 WMAR EMPL 894 IF CKASTA W OR B02 010812 83500 11 11 32 523 W 895 CKASTA F OR B02 010812 83600 11 11 32 523 Ww 896 CKASTA X OR B02 010812 83700 11 11 32 523 W 897 CKRTFL E B02 010812 83800 11 11 32 523 E 898 EVAL outpt no 02 010812 83900 11 11 32 523 N N 899 ENDIF E02 010812 84000 11 11 32 523 904 ENDSL E01 010812 84500 11 11 32 523 11 10 48 733 906 EXSR stdsubroutinel 011129 84700 11 11 32 524 164 RTPA for RPG User Manual 908 C EXSR stdsubroutine2 011129 84900 11 11 90
95. 10 54 939 371 C SELECT B01 001029 31200 11 10 54 939 372 C WHEN COUNTER 6 X01 001029 31300 11 10 54 939 6 372 C WHEN COUNTER 6 X01 001029 31300 11 10 54 939 6 11 10 48 733 373 C Z ADD ZERO COUNTER 01 001029 31400 11 10 54 939 0 375 C ENDSL EO1 001029 31600 11 10 54 939 376 AUDIT RPGIV select WHEN OTHER STATEMENTS 010912 31700 11 10 54 940 377 C movel p mode 010912 31800 11 10 54 940 P 378 C z add 1 PHSCNO 010912 31900 11 10 54 940 1 379 C SELECT BO1 010912 32000 11 10 54 940 380 C WHEN mode P X01 010912 32100 11 10 54 940 P 381 C OR PHSCNO 1 X01 010912 32200 11 10 54 940 1 380 C WHEN mode P X01 010912 32100 11 10 54 940 P 337 C OR PHSCNO 1 X01 010912 32200 11 10 54 940 1 382 C Z ADD ZERO COUNTER 01 010912 32300 11 10 54 941 0 385 C ENDSL EO1 010912 32600 11 10 54 941 386 k rr 010912 32700 11 10 54 941 387 C if counter lt gt 0 B01 010912 32800 11 10 54 941 0 389 C endif E01 010912 33000 11 10 54 941 390 C movel R mode 010912 33100 11 10 54 941 R 391 C movel 3 RTYP 010912 33200 11 10 54 942 3 392 C SELECT B01 010912 33300 11 10 54 942 393 C WHEN mode R X01 010912 33400 11 10 54 942 R 394 C AND RTYP 3 X01 010912 33500 11 10 54 942 3 393 C WHEN mode R X01 010912 33400 11 10 54 943 R 350 C AND RTYP 3 X01 010912 33500 11 10 54 943 3 395 C Z ADD ZERO COUNTER 01 010912 33600 11 10 54 943 0 398 C ENDSL EO1 010912 33900 11 10 54 943 399 wu 001029 34000 11 10 54 943 400 A
96. 105 18 27 06 818 17 xorder 9 2 inz 0 070125 1106 18 27 06 818 117 RTPA for RPG User Manual 18 19 20 21 22 23 24 25 26 27 28 29 30 31 33 34 35 37 38 39 40 41 42 43 44 45 46 Input Source RPGLE program TESTFREE 0001 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 iorder rorder DSa DS fields x order 7 3 inz 0 6 3 inz 0 DSb is qualified data structure DSb border xorder iorder rorder ds Qualified 0 inz 0 2 inz 0 3 inz 0 3 inz 0 o oo o fill fields in qualifed DS dsa fields c c c c in free form DSb border 9193 Eval Eval Eval Eval fill qualifed DS DSb field border DSa aorder 1500 1500 DSa xorder 1234567 89 1234567 89 DSa iorder 7654 321 7654 321 DSa rorder 123 456 123 456 DSa aorder 13 45 150 0 26 2 DSa iorder 7654 321 V5R4 op code eval corr evaluate corresponding eval corr DSb DSa 000091931234567897654321000123456 000015001234567897654321000123456 c qualified DS names DSb c exit program c c z add z add z add z add Eval Return DSb border work80 9193 9193 DSb xorder work92 1234567 89 1234567 89 DSb iorder work73 7654 321 7654 321 DSb rorder work63 123 456 123 456 inlr on iorder and rorder corr
97. 14 068 21 00 7 3 429 C eval final answer counter 010610 37000 11 11 14 068 21 00 7 3 430 C eval final answer counter 010610 37100 11 11 14 068 21 00 7 3 431 C eval final answer counter 010610 37200 11 11 14 069 2 33 7 3 432 C eval final answer counter 010610 37300 11 11 14 069 2 33 7 3 433 C eval sum 4 6 counter 1555 010605 37400 11 11 14 069 1562 0 3 434 C eval total 4 6 sum 010603 37500 11 11 14 069 1572 1562 0 435 C eval sum 4 6 010603 37600 11 11 14 069 10 0 436 C eval total 4 sum 6 answer final net 010606 37700 11 11 14 069 82 10 0 7 2 33 112 437 x w 0 mv mv ee 010602 37800 11 11 14 069 438 C Z ADD 7 12 52 010617 37900 11 11 14 069 7 12 11 10 48 733 439 C Z ADD 163 23 gross 62 010617 38000 11 11 14 069 163 23 440 C z add 1444 2 difference 82 010617 38100 11 11 14 069 1444 20 441 C z add 43 8 interim 82 010617 38200 11 11 14 069 43 80 442 C z add 87 extra 50 010617 38300 11 11 14 069 87 443 C z add 105 extra2 50 010617 38400 11 11 14 069 105 444 C z add 17 more 82 010617 38500 11 11 14 069 17 00 445 C eval final answer counter 010617 38600 11 11 14 069 783 80 7 3 402 C CCCC DIFFERENCE 160 EXTRA 010617 39000 11 11 14 069 7 12 1444 20 87 403 C 188 INTERIM EXTRA2 010617 39000 11 11 14 069 43 80 105 404 C 33 15 GROSS 010617 39000 11 11 14 069 163 23 405 C MORE 010617 39000 11 11 14 069 17 00 450 C eval net counter cccc 01061
98. 17 38900 111 11 12 866 163 23 449 C MORE 010617 39000 11 11 12 866 17 00 452 C 44 GROSS EXTRA2 010617 39300 11 11 12 866 163 23 105 422 C Z ADD 3 COUNTER 01 010604 36300 11 11 12 866 3 423 C ENDIF EO1 010602 36400 11 11 12 866 424 C sum add total final 010604 36500 11 11 12 866 0 3115 3115 00 425 C eval final answer counter 5 010602 36600 11 11 12 866 15 00 7 3 426 C eval sum 4 6 2 1555 010602 36700 11 11 12 866 1563 0 427 C eval final answer counter 010610 36800 11 11 12 866 21 00 7 3 428 C eval final answer counter 010610 36900 11 11 12 866 21 00 7 3 429 C eval final answer counter 010610 37000 11 11 12 866 21 00 7 3 430 C eval final answer counter 010610 37100 11 11 12 868 21 00 7 3 431 C eval final answer counter 010610 37200 11 11 12 868 2 33 7 3 432 C eval final answer counter 010610 37300 11 11 12 868 2 33 7 3 433 C eval sum 4 6 counter 1555 010605 37400 11 11 12 868 1562 0 3 434 C eval total 4 6 sum 010603 37500 11 11 12 868 1572 1562 0 435 C eval sum 4 6 010603 37600 11 11 12 868 10 0 436 C eval total 4 sum 6 answer final net 010606 37700 11 11 12 869 136 RTPA for RPG User Manual PAGE PAGE 2 33 112 437 x mm mm ee 010602 37800 11 11 12 869 438 Z ADD 7 12 cccc 52 010617 37900 11 11 12 869 7 12 439 Z ADD 163 23 gross 62 010617 38000 11 11 12 869 163 23 440 z add 1444 2 difference 82 010617 38100 11 11 12 869 1444 20 441 z a
99. 17 88800 11 11 32 503 3 159 RTPA for RPG User Manual PAGE 948 C add L qq 5 0 01 0917 020917 88900 11 11 32 503 3 949 C 11 ifeq 4 B02 0917 020917 89000 11 11 32 503 3 952 C endif E02 9917 020917 89300 11 11 32 503 947 C do 5 11 30 BO1 0917 020917 88800 11 11 32 503 4 948 C add 1 qq 50 01 0917 020917 88900 11 11 32 503 4 949 C 11 ifeq 4 B02 0917 020917 89000 11 11 32 504 4 950 leavesr leaves the subroutine 0917 020917 89100 11 11 32 504 951 C leavesr 02 0917 020917 89200 11 11 32 504 752 C MOVE vat IN25 010625 69300 11 11 32 504 1 753 C Z ADD 11111111111111aaaaaaaaaaaaaa 10 0 010701 69400 11 11 32 504 1111111111 754 C Z ADD 22222222222222bbbbbbbbbbbbbb 13 2 010701 69500 11 11 32 504 22222222222 00 755 C Z ADD zero cccccccccccccc 10 1 010701 69600 11 11 32 504 0 756 C aaaaaaaaaaaaaaadd bbbbbbbbbbbbbbccccccccecccccec 010701 69700 11 11 32 504 1111111111 22222222222 00 333333333 0 757 C eval bbbbbbbbbbbbbb aaaaaaaaaaaaaa 122 14 2 010701 69800 11 11 32 505 1111111247 20 1111111111 758 C IN25 IFEQ ON BOL 010625 69900 11 11 32 505 1 759 C IN 27 OREQ OFF 01 010625 70000 11 11 32 505 0 760 C vI OREQ IN 27 01 010625 70100 11 11 32 505 11 110 48 733 761 C MOVE rI IN26 01 010625 70200 11 11 32 505 1 762 C END E01 010625 70300 11 11 32 505 763 C IN25 IFEQ IN27 BOL 010625 70400 11 11 32 505 1 0 765 C END EO1 010625 70600 11 11 32 505 766 C MOVE 1 IN25 010625 70700 11 11 32 505 1 767 C MOVE 1 IN 27 010625 7
100. 1999 270 add 1 year to start date 020623 21100 11 10 48 754 271 c employ dat adddur 1 years anniv dat 020623 21200 11 10 48 754 12 29 1992 12 29 1993 272 add 3 hours 22 minutes and 50 seconds to midnight 020623 21300 11 10 48 754 273 c T 00 00 00 adddur 3 hours end time 020623 21400 11 10 48 754 03 00 00 274 c adddur 22 minutes end time 020623 21500 11 10 48 754 03 22 00 275 c adddur 50 seconds end time 020623 21600 11 10 48 754 03 22 50 276 add 1000 microseconds to a time stamp 26 character date and time 020623 21700 11 10 48 754 277 c adddur 1000 ms total_time 020623 21800 11 10 48 758 0001 01 01 00 00 00 001000 RTPA for RPG User Manual 124 278 C 279 C Z ADD 14 25 Z ADD zero TESD 12 3 14 250 LocatTotal 11 10 48 733 010113 21900 11 10 48 758 PAGE 050415 22000 11 10 48 758 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 KORDER 1500 KLINE PEXPSH 0 PERROR KCUSNO 0 KSTORE 0 KCUSNA EXPMDY 0 TIMEN 60 111048 KLINE 00001 UDATE 120906 TIMEN 111048 KLINE 00002 UDATE 120906 TIMEN 111048 DONE DONE OORDER 1500 OLINE DISPO1 42 NO INDICATOR USED ON CHAIN chain by file name not record name 281 MOVE INPUT ORDER AND LINE TO KORDER AND LINE KEYED 282 C Z ADD PORDER 1500 283 C Z ADD PLINE 1 284 285 DISPLAY HEADING SCREEN 286 287 C DISPO1 TAG 288 CLEAR EXPECTED SHIP DATE AND ERROR
101. 2 32 512 32 512 32 512 32 512 32 512 76800 11 11 77000 11 11 32 512 32 512 32 512 77300 11 11 32 512 77500 11 11 32 512 32 512 32 513 32 513 ODREQD 20000317 RTPA for RPG User Manual 161 8376 if not found 839 C END 841 C if found 842 C eval IN82 on 1 843 C END 844 w 846 0 re 847 READ ALL CUSTOMER STORE RECORDS IN THE FILE 848 0m mm vm mm mr ree 849 C CUCUST SETLL CUSTREC1 0002050 850 C READ CUSTREC1 CUCUST 0002050 CUSTOR 0000000 CUNAME XYZ CORPORATE OFFICE CUSTA PA 851 C DOW not eof CUSTMAST 852 C EXCEPT PRTCUS 853 READ ANOTHER RECORD IN THE CUSTOMER FILE 854 C READ CUSTREC1 CUCUST 0002050 CUSTOR 0000001 CUNAME XYZ STORE CUSTA PA ARDMORE 851 C DOW not 56 CUSTMAST 852 C EXCEPT PRTCUS 853 READ ANOTHER RECORD IN THE CUSTOMER FILE 854 C READ CUSTREC1 855 C ENDDO 859 x 860 ELEM BIF 861 C Z ADD zero workcounter 00 862 C eval Indx 1 1 863 C DOW Indx lt ELEM LocatTotal 1 01 010812 EO1 010812 01 010812 01 010812 EO1 010812 010814 010814 010814 010814 010814 010814 CUAD1 555 ARCH STREET 01 010814 01 010814 010814 01 010814 CUAD1 122 MONTGOMERY AVE B01 010814 01 010814 010814 01 010814 OF E01 010814 010812 010812 2 010812 010812 B01 010812 77800 78000 78200 78300 78400 78500 78700 788
102. 2 47900 11 10 54 991 3996 111 222 333 444 555 666 777 888 539 C IN30 IFEQ OFF BO1 991225 48000 11 10 54 992 0 540 GOT CUSTOMER MASTER 991225 48100 11 10 54 992 541 C Z ADD CUCUST KCUSNO 01 001007 48200 11 10 54 992 1000 1000 542 C Z ADD CUSTOR KSTORE 01 010118 48300 11 10 54 992 1 1 543 C MOVEL CUNAME KCUSNA 01 000323 48400 11 10 54 992 ABC STORES INC ABC STORES INC 544 C MOVEL CUNAME PCUSNA 01 000323 48500 11 10 54 992 ABC STORES INC ABC STORES INC 545 C EXCEPT PRTCUS 01 000323 48600 11 10 54 992 548 C ENDIF EO1 991225 48900 11 10 54 992 550 DISPLAY DETAIL SCREEN 000323 49100 11 10 54 993 551 C DISPO2 TAG 000514 49200 11 10 54 993 552 C TIME TIMEN 60 010501 49300 11 10 54 993 111054 553 C EXFMT NEWEXPD2 051007 49400 11 10 54 993 WRITE INO3 0 IN43 0 EXPMDY 112605 KCUSNO 0001000 KCUSNA ABC STORES INC UDATE 120906 KSTORE 0000001 TIMEN 111054 KORDER 0001500 KLINE 00002 553 C EXFMT NEWEXPD2 051007 49400 11 11 11 149 READ INO3 0 IN43 0 EXPMDY 011807 KCUSNO 0001000 KCUSNA ABC STORES INC UDATE 120906 KSTORE 0000001 TIMEN 111054 KORDER 0001500 KLINE 00002 554 TEST F3 000323 49500 11 11 11 149 555 C INO3 CABEO ON DONE 000323 49600 11 11 11 149 0 557 VALIDATE CHANGED DATE AND UPDATE ORDER DETAIL 000323 49800 11 11 11 150 559 CONVERT EXPMDY FORMAT MMDDYY TO ODEXPD FORMAT YYYYMMDDYY 000323 50000 11 11 11 150 561 C Z ADD EXPMDY YY 20 YY 000323 50200 11 11 11 150 11807 7 562 C EXPMDY DIV 100 MMDD 40 MMDD 000323 54700 11 11 11 1
103. 2 CUNAME ABC STORES STORE 4522 CUAD1 231 70TH STREET CUAD2 CUCITY NEW YORK CUSTA NY CUZIP 10021 105 endif EO1 030207 8400 11 10 13 624 106 eval custor 999 is no store 999 030207 8500 11 10 13 624 999 107 chain custkey custmast chain on file name 030207 8600 11 10 13 624 00010000000999 108 if found custmast BOL 030207 8700 11 10 13 624 114 endif E01 030207 9300 11 10 13 625 115 end of free formne 060319 9400 11 10 13 625 117 c eval rorder iorder 98 020706 9600 11 10 13 625 1690 043 78 543 97 c 13 5 PORDER 030207 9700 11 10 13 625 1500 119 c eval cucust 1000 030207 9800 11 10 13 625 1000 120 c cucust setll custrec 030207 9900 11 10 13 625 0001000 121 read by record name 030207 10000 11 10 13 625 122 c cucust reade custrec 84 eof 020710 10100 11 10 13 626 N84 0001000 122 RTPA for RPG User Manual CUCUST 0001000 CUSTOR 0000000 CUNAME ABC STORES INC CUAD1 15 CORPORATE DRIVE CUAD2 CUCITY WEST CHESTER CUSTA PA CUZIP 19382 123 c in84 doweq off BO1 020617 10200 11 10 13 626 0 124 c except prtrec 01 030207 10300 11 10 13 626 125 c cucust reade custrec 84 01 020617 10400 11 10 13 626 N84 0001000 CUCUST 0001000 CUSTOR 0000001 CUNAME ABC STORES INC CUAD1 423 MONTGOMERY AVENUE CUAD2 CUCITY ARDMORE CUSTA PA CUZIP 19333 123 c in84 doweq off BO1 020617 10200 11 10 13 626 0 124 c except prtrec 01 030207 10300 11 10 13 626 125 c cucust reade custrec 84 01 020617 10400 11 10 13 626 N84 0001000 CUCUST 0001000 CUSTO
104. 3 50800 11 11 13 681 568 C ADD 20000000 Y4MMDD 01 000323 50900 11 11 13 681 20070118 569 C END EO1 000323 51000 11 11 13 681 570 C Z ADD Y4MMDD ODEXPD 000323 51100 11 11 13 681 20070118 20070118 571 COMPLEX IF STATEMENT 010614 51200 11 11 13 681 572 C IF COUNTER 0 and BO1 010614 51300 11 11 13 681 3 573 C COUNTER gt 5 AND B01 010614 51400 111 11 13 681 3 574 C COUNTER lt 3 OR ANSWER 6 AND B01 010614 51500 111 11 13 681 3 7 575 C COUNTER lt 2 B01 010614 51600 11 11 13 681 139 RTPA for RPG User Manual 3 576 C OR COUNTER 2 01 010614 51700 11 11 13 681 3 577 C AND ANSWER 7 OR B01 010614 51800 11 11 13 681 7 578 C ANSWER 5 B01 010614 51900 11 11 13 681 7 580 C ENDIF EO1 010614 52100 11 11 13 681 582 TEST FOR FIELD OVER 100 010411 52300 11 11 13 681 583 C MOVE ALL ALL 256 010411 52400 11 11 13 681 VAR ALL 1 I 100 FEAE HE HE HEHE E HE FE FE EE HE EE HE BERE BE AE HE FE FE AE BERE HE FE FE FE HE FE FE FE E HE FE FE EE HEHEHE E HE FE FE AE E HE FE FE FE HE HEHEHE HEHEHE VAR ALL 101 200 VAR ALL 201 256 584 C MOVE ALLY ALLS 256 010411 52500 11 11 13 681 VAR ALL 1 100 THE E HE FEFE FEE HE HE E
105. 300 11 10 54 987 483 C movel ALL L testlo 20 010330 42400 11 10 54 987 LLLLLLLLLLLLLLLLLLLL 484 C z add 11111 aaaaaaaaaa 6 0 010330 42500 11 10 54 987 11111 485 C z add 2222222 bbbbbbbbbb 83 010618 42600 11 10 54 988 22222 000 486 C aaaaaaaaaa add bbbbbbbbbb cccccccccc 80 010330 42700 11 10 54 988 11111 22222 000 33333 487 001029 42800 11 10 54 988 488 AUDIT RPGIV TIME STATEMENT 001029 42900 11 10 54 988 489 C TIME TIMENOW 60 001029 43000 11 10 54 988 111054 490 x 001029 43100 11 10 54 988 491 C movel pa movsw 1 010530 43200 11 10 54 988 2 492 AUDIT RPGIV IF STATEMENT 010113 43300 11 10 54 988 493 C if movsw blanks BOL 010113 43400 11 10 54 988 2 494 C OR COUNTER 0 BOL 010113 43500 11 10 54 988 3 496 C endif E01 010113 43700 11 10 54 989 497 010113 43800 11 10 54 989 499 C 100 DIV 5 25 NET 30 01 000323 48400 11 10 54 989 19 500 C MVR FRACT 44 01 000323 48500 11 10 54 989 2500 502 GOT ORDER DETAIL PRINT IT 000514 44300 11 10 54 989 503 C EXCEPT PRTDET 234 000514 44400 11 10 54 989 505 GET THE CUSTOMER MASTER STORE RECORD 991225 44600 11 10 54 989 506 C Z ADD ODCUST CUCUST 991225 44700 11 10 54 989 1000 1000 507 C Z ADD ODSTOR CUSTOR 991225 44800 11 10 54 990 1 1 508
106. 334 C eval answer expmdy expyy 11814 11807 7 335 w n 336 AUDIT RPGIV eval starting in extended factor 2 337 C eval answer expmdy expyy 11814 11807 7 338 w 339 C EVAL STSC BLANKS 342 C movel I Qyes 1 1 343 C movel I Q1stline 1 1 344 C setoff 33 345 C IF lstline yes and 1 1 346 C IN33 OFF AND 0 347 C INLR OFF 0 348 C movel rat hold2 1 2 349 C ENDIF 351 C dou lstline Byes or 308 C IN33 OFF 353 C movel St hold2 1 3 354 C enddo 355 C movel a hold2 1 4 356 AUDIT RPGIV 357 C eval IN50 ON 1 11 10 000323 990918 001007 001007 000909 000909 000909 030426 000918 ph234 030504 25 IS 25400 11 11 ODPRIC 0002515 ODQTY 0000003 BO1 ph234 030504 25700 11 11 E01 ph235 030504 26000 11 11 000909 26100 11 11 000323 26300 11 11 000317 26400 11 11 BO1 ph543 030504 26500 11 11 01 ph543 030504 26600 11 11 001029 31100 11 11 01 010330 26800 11 11 01 010330 26900 11 11 EO1 010330 27000 11 11 000917 27200 11 11 010113 27300 11 11 EVAL RESUO10113 27400 11 11 010522 27500 11 11 010522 27600 11 11 010522 27700 11 11 010522 27800 11 11 000917 27900 11 11 010730 28000 11 11 010730 28300 11 11 010730 28400 11 11 010730 28500 11 11 B01 010730 28600 11 11 B01 050118 28700 11 11 B01 050118 28800 11 11 01 010730 28900 11 11 E01 010730 29000 11 11 B01 PDDD 010814 29200 11 11 B01 PDDD 010814 29300 11 11 01 010730 29
107. 3800 11 11 13 681 5 5 598 C MOVSW OREQ 8 01 010429 53900 11 11 13 681 2 599 C MOVSW OREQ 19 01 010429 54000 11 11 13 681 2 600 C MOVSW OREQ c 01 010429 54100 11 11 13 681 2 601 C MOVSW OREQ D 01 010429 54200 11 11 13 681 2 602 C MOVSW OREQ HLD1 01 010429 54300 11 11 13 681 2 A 603 C MOVSW3 ANDNE MOVSW2 01 010429 54400 11 11 13 681 5 4 605 C END EO1 000323 54600 11 11 13 681 607 UPDATE ORDER DETAIL EXPECTED SHIP DATE 000323 54800 11 11 13 681 608 C ADD 1 UPDREC 6 0 010118 54900 11 11 13 681 2 609 C UPDATE ODETREC 000323 55000 11 11 13 681 ODORD 0001500 ODLINE 00002 ODCUST 0001000 ODSTOR 0000001 ODITEM Y2430 ODPRIC 0002515 ODQTY 0000003 ODREQD 20000317 ODEXPD 20070118 ODSHPD 00000000 ODINV 0000000 ODSTAT O ODX 611 WRITE UPDATED ORDER DETAIL TO A WORK FILE 000402 55200 11 11 13 683 11 10 48 733 PAGE 612 C CLEAR ODETWRK 000402 55300 11 11 13 683 613 C Z ADD ODORD WDORD 000402 55400 11 11 13 683 1500 140 RTPA for RPG User Manual 1500 614 C Z ADD ODLINE WDLINE 000402 55500 11 11 13 683 2 2 615 C Z ADD ODCUST WDCUST 000402 55600 11 11 13 683 1000 1000 616 C Z ADD ODSTOR WDSTOR 000402 55700 11 11 13 683 1 1 617 C MOVEL ODITEM WDITEM 000402 55800 11 11 13 683 Y2430 Y2430 618 C Z ADD ODPRIC WDPRIC 000402 55900 11 11 13 683 25 15 25 15 619 C Z ADD WDOTY 000402 56000 11 11 13 683 3 3 620 C Z ADD ODREQD WDREQD 000402 56100 11 11 13 683 20000317 20000317 621 C Z ADD ODEXPD WDEXPD 000402 56200 11 11 13 683
108. 4 135 RTPA for RPG User Manual PAGE 403 C ENDIF EO1 001029 34400 11 11 12 864 404 001029 34500 11 11 12 864 405 C if counter gt 0 BOL 010522 34600 11 11 12 865 406 C endif EO1 010522 34700 11 11 12 865 407 x w 010522 34800 11 11 12 865 408 C if counter lt gt 0 BOL 010522 34900 11 11 12 865 3 409 C endif EO1 010522 35000 11 11 12 865 410 010522 35100 11 11 12 866 411 AUDIT RPGIV EXTENDED FACTOR 2 CONDITIONAL AND OR COMPLEX STATEMENTS 010602 35200 11 11 12 866 412 C Z ADD 2 COUNTER 010602 35300 11 11 12 866 2 413 C Z ADD 7 answer 010602 35400 11 11 12 866 7 414 C Z ADD zero final 72 010607 35500 11 11 12 866 00 415 C Z sub zero sum 61 010704 35600 11 11 12 866 0 416 C Z ADD 3115 total 80 010604 35700 11 11 12 866 3115 11 10 48 733 417 C Z ADD 112 net 30 010607 35800 11 11 12 866 112 418 C IF COUNTER 0 B01 010602 35900 11 11 12 866 2 419 C OR COUNTER 2 B01 010602 36000 111 11 12 866 2 420 C OR COUNTER 4 B01 010602 36100 111 11 12 866 2 421 C AND ANSWER 7 B01 010602 36200 111 11 12 866 7 446 C CCCC DIFFERENCE 160 EXTRA 010617 38700 11 11 12 866 7 12 1444 20 87 447 C 188 INTERIM EXTRA2 010617 38800 11 11 12 866 1229 85 105 448 C 33 15 GROSS 0106
109. 4 4 4 4 4 4 4 4 4 4 4 4 498 4 4 ZSPGM64R Real Time Program Audit Query V4R3 View RTPA Audit Files or Summarize ZZAUDITP to ZZAUDITS C 2000 2002 Harkins Audit Software Inc 1 Select ZZAUDITP spool file s to be Summarized into ZZAUDITS press Enter 4 Select spool file s to be Deleted then press Enter Data in Char and Hex Y 5 Select spool file s to be Displayed then press Enter P Select ZZAUDITP or ZZAUDITS file s for PDF then press Enter S Select WRKSPLF Spool Files from execution of program in User Data Opt File User Queue User Data Pages Date Time 1 ZZAUDITP PHH OPRINT ORDERINQ i 01 28 08 14958 1 ZZAUDITP PHH NEWEXPSH 66 OL 28 08 14588 LAUD INS PHH BATCHPGM1 i 01 28 08 14558 o AANDE PHH BATCHPGM2 i 01 28 08 14958 1 ZZAUDITP PHH OPRIN ESTSOL 2 01 28 08 14 58 1 ZZAUDITP PHH ESTFREE 3 01 28 08 14958 1 ZZAUDITP PHH CUSTS OE 3 01 28 08 14 58 1 ZZAUDITP PHH ESICOES 5 01 28 08 14 58 1 ZZAUDITP PHH OPRIN ESTCOB7 01 28 08 14 58 IZ NW IIE PHH OPRINT GENESIS L 01 28 08 14 58 JL ZANE PHH OPRINT CLLETEST8 L 01 28 08 14 58 j ZZNUJD IL Lim PHH OPRIN SNE i 01 29 06 145568 IL AUDI PHH SELECWH 1 01 28 08 14 58 LAUD INE PHH CUSTSOR 3 01 28 08 14 58 1 ZZAUDITP PHH OPRIN ESI OBS 5 01 28 08 14 58 1 ZZAUDITP PHH OPRIN ESTCOB7 01 28 08 14 58 Enter Process F3 Exit F5 Refresh F6 Summary Options F10 Create ZZAUDITS F
110. 400 11 11 E01 PDDD 010814 29500 11 11 010730 29600 11 11 010522 29700 11 11 010522 29800 11 11 48 733 24500 11 11 24700 11 11 24800 11 11 24900 11 11 25000 11 11 25100 11 11 25200 11 11 14 058 25500 11 11 25600 11 11 PAGE 14 058 14 058 14 058 14 058 14 058 14 058 14 058 14 058 14 058 ODREQD 20000317 14 058 14 060 14 060 14 060 14 060 14 060 14 060 14 060 14 060 14 060 14 060 14 060 14 060 14 060 14 060 14 060 14 060 14 060 14 060 14 060 14 060 14 060 14 061 14 061 14 061 14 061 14 061 14 061 14 061 14 061 14 061 14 061 14 061 14 061 14 061 RTPA for RPG User Manual 142 358 C eval in55 OFF 010710 29900 11 11 14 061 359 C eval f IN55 OFF 010710 30000 11 11 14 061 360 C eval i in 60 ON 010710 30100 11 11 14 061 361 C eval IN 60 ON 010710 30200 11 11 14 061 11 10 48 733 PAGE 362 C eval IN OFF 010710 30300 11 11 14 061 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 363 010522 30400 11 11 14 061 364 AUDIT RPGIV DOW STATEMENT 000918 30500 11 11 14 061 365 C Z ADD ZERO COUNTER 20 000918 30600 11 11 14 061 0 366 C DOW COUNTER 6 BO1 000918 30700 11 11 14 061 0 367 C ADD 1 COUNTER 01 000918 30800 11 11 14 061 1 366 C DOW COUNTER 6 BO1 000918 30700 11 11 14 061 1 367 C A
111. 400 11 11 12 869 464 Z ADD 2 COUNTER 010615 40500 11 11 12 869 2 465 Z ADD 7 answer 010615 40600 11 11 12 869 7 466 Z ADD 14 2 gggggg 62 010615 40700 11 11 12 869 14 20 467 IF COUNTER 0 and gggggg 5 and BOL 010615 40800 11 11 12 869 2 14 20 468 COUNTER gt 5 AND BOL 010615 40900 11 11 12 869 2 469 COUNTER lt 3 OR ANSWER 6 AND BOL 010615 41000 11 11 12 869 2 7 470 COUNTER lt 2 BOL 010615 41100 11 11 12 869 2 471 OR COUNTER 2 BOL 010615 41200 11 11 12 869 2 472 AND ANSWER 7 OR BOL 010615 41300 11 11 12 869 7 473 ANSWER 5 BOL 010615 41400 11 11 12 869 7 474 Z ADD 3 COUNTER 01 010615 41500 11 11 12 869 137 RTPA for RPG User Manual 475 C ENDIF EO1 010615 41600 11 11 12 869 476 010615 41700 11 11 12 869 477 010615 41800 11 11 12 869 478 AUDIT RPGIV MOVEL PADDED WITH BLANKS STATEMENT 010522 41900 11 11 12 869 479 C MOVEL ALL M TESTML 20 001029 42000 11 11 12 869 MMMMMMMMMMMMMMMMMMMM 480 C MOVEL P LEFT TESTML 001029 42100 11 11 12 869 LEFT 481 010330 42200 11 11 12 869 482 all lower case statements 010330 42300 11 11 12 869 483 C movel ALL L testlo 20 010330 42400 11 11 12 870 LLLLLLLLLLLLLLLLLLLL 484 C z add 11111 aaaaaaaaaa 6 0 010330 42500 11 11 12 871 11111 485 C z add 2222222 bbbbbbbbbb 83 010618 42600 11 11 12 871 22222 000 486 C aaaaaaaaaa add bbbbbbb
112. 493 9 9 721 C ADD 32 660 01 010624 66200 11 11 32 493 41 722 C 660 I ADD 23 D2 I 01 010624 66300 11 11 32 493 41 64 723 C 660 1 ADD D2 I D3 I 01 010624 66400 11 11 32 493 41 64 105 724 C D MULT D2 6554 01 010624 66500 11 11 32 493 33343536373839404112121212 056057058059060061062063064000000000000 18481938203021242220231824182520262400000000000000000000000000000000000000000000 725 C 2 MULT 660 I WORK5 51 01 010624 66600 11 11 32 493 41 156 RTPA for RPG User Manual 82 0 PAGE 11 10 48 733 726 C D I MULT 5 WORK7 72 01 010624 66700 11 11 32 493 41 205 00 727 C I IFEQ 5 B02 010624 66800 11 11 32 493 9 730 C END E02 010624 67100 11 11 32 493 731 C D I IFEQ 7 B02 010624 67200 11 11 32 493 41 734 C END E02 010624 67500 11 11 32 493 735 C D I IFEQ D2 I B02 010624 67600 11 11 32 493 41 64 736 C D 2 OREQ D2 3 02 010624 67700 11 11 32 493 34 58 737 C D2 I ANDNE D3 I 02 010624 67800 11 11 32 493 64 105 738 C D4 I ANDEQ D3 3 02 010624 67900 11 11 32 493 2624 93 741 C END E02 010624 68200 11 11 32 493 742 C D I IFEQ 9 B02 010624 68300 11 11 32 493 41 745 C END E02 010624 68600 11 11 32 493 719 C DO 13 I 30 B01 010624 66000 11 11 32 493 10 720 C Z ADD I D I 01 010624 66100 11 11 32 493 10 10 721 C ADD 32 D I 01 010624 66200 11 11 32 493 42 722 C D I ADD 23 D2 I 01 010624 66300 11 11 32 493 42 65 723 C D I ADD D2 I D3 I 01 010624 6640
113. 5 C ENDSL EO1 010912 32600 11 11 14 063 386 010912 32700 11 11 14 063 387 C if counter lt gt 0 BO1 010912 32800 11 11 14 063 0 389 C endif EO1 010912 33000 11 11 14 063 143 RTPA for RPG User Manual PAGE 390 C movel R mode 1 010912 33100 11 11 14 063 R 391 C movel 13 RTYP 1 010912 33200 11 11 14 063 3 392 C SELECT B01 010912 33300 11 11 14 063 393 C WHEN mode R x01 010912 33400 11 11 14 063 R 394 C AND RTYP 3 x01 010912 33500 11 11 14 063 3 393 C WHEN mode R x01 010912 33400 11 11 14 063 R 350 C AND RTYP 3 x01 010912 33500 11 11 14 063 3 395 C Z ADD ZERO COUNTER 01 010912 33600 11 11 14 063 0 398 C ENDSL EO1 010912 33900 11 11 14 063 399 w E 001029 34000 11 11 14 063 11 10 48 733 400 AUDIT RPGIV IF STATEMENT 001029 34100 11 11 14 063 401 C IF COUNTER 0 B01 001029 34200 11 11 14 063 0 402 C Z ADD 3 COUNTER 01 001029 34300 11 11 14 063 3 403 C ENDIF EO1 001029 34400 11 11 14 063 404 xw P 001029 34500 11 11 14 063 405 C if counter gt 0 B01 010522 34600 11 11 14 063 3 406 C endif EO1 010522 34700 11 11 14 063 407 w 010522 34800 11 11 14 063 408 C if counter lt gt 0 BOL 010522 34900 11 11 14 064 3 409 C endif EO1 010522 35000 11 11 14 064 410
114. 5 Refresh F9 Retrieve F10 Cursor F11 Toggle F16 Repeat find F17 Repeat change F24 More keys Figure 7 8 RTPA documentation only Z C File description comments Columns L Edit ZSAUDITE QRPGLESRC SEU gt NEWEXPSH MA 2 oU Hu gt 21 HA tpe d Sk ee 6 nt 0488 00 Z C 0489 00 Z C Batch program with call to another batch program 0490 00 5 CALL BATCHPGMI 0491 00 e PARM QMSGDA 79 0492 00 PARM MSGDB 79 0493 00 e ENDIF 0494 00 ws 0495 00 0496 00 e CUSKEY CHAIN CUSTREC1 3 0497 00 z add eva aa 3 0 0498 00 C z add edu bb 3 0 0499 00 9 z add eub Sy GE 3 0 0500 00 9 z add Za An dd 3 0 0501 00 G z add mel 5 ee 3 0502 00 6 z add sell 6 iit 3 0 0503 00 e z add egt ur gg 3 0 0504 00 9 z add ed VB hh 3 0 F3 Exit F4 Prompt F5 Refresh F9 Retrieve F10 Cursor F11 Toggle F16 Repeat find F17 Repeat change F24 More keys Figure 7 9 RTPA documentation only Z C Called program description comments The RTPA inserted Z C comment statements can be very helpful to a programmer when reviewing an unfamiliar large program No RTPA Z audit statements are inserted in this document only RTPA expansion RTPA for RPG User Manual 97 Chapter 8 Auditing Very Large RPG and COBOL Programs This chapter provides guidance on how to get around the size limitations of the RPGIII compiler and the COBOL 400 compiler when auditing very large programs RTPA audit enables sou
115. 50 11807 118 563 C YY MULT 10000 Y4MMDD 8 0 00YY0000 000323 50400 11 11 11 150 7 70000 564 C ADD MMDD Y4MMDD OOYYMMDD 000323 50500 11 11 11 150 118 70118 565 C IFGT 40 B01 000323 50600 11 11 11 150 7 567 C ELSE X01 000323 50800 11 11 11 152 568 C ADD 20000000 Y4MMDD 01 000323 50900 11 11 11 152 20070118 569 C END EO1 000323 51000 11 11 11 152 570 C Z ADD Y4MMDD ODEXPD 000323 51100 11 11 11 152 20070118 20070118 571 COMPLEX IF STATEMENT 010614 51200 11 11 11 152 572 C IF COUNTER 0 and B01 010614 51300 11 11 11 152 3 573 C COUNTER gt 5 AND B01 010614 51400 111 11 11 152 3 574 C COUNTER lt 3 OR ANSWER 6 AND B01 010614 51500 11 11 11 152 3 7 575 C COUNTER lt 2 B01 010614 51600 11 11 11 152 3 576 C OR COUNTER 2 B01 010614 51700 11 11 11 152 3 577 C AND ANSWER 7 OR B01 010614 51800 111 11 11 152 7 578 C ANSWER 5 B01 010614 51900 11 11 11 152 7 11 10 48 733 PAGE 580 C ENDIF EO1 010614 52100 11 11 11 153 582 TEST FOR FIELD OVER 100 010411 52300 11 11 11 153 131 RTPA for RPG User Manual ALL ALL 256 010411 52400 11 11 11 153 1 101
116. 6 C EXFMT NEWEXPD1 051007 23700 11 11 14 058 READ INO3 0 IN42 0 KORDER 0001500 KLINE 00002 UDATE 120906 TIMEN 111113 297 TEST F3 000323 23800 11 11 14 058 298 C INO3 CABEO ON DONE 000323 23900 11 11 14 058 0 300 C UDATE CABEO 090100 DONE 010113 24100 11 11 14 058 120906 302 000323 24300 11 11 14 058 303 VALIDATE ORDER AND LINE 000323 24400 11 11 14 058 141 RTPA for RPG User Manual KORDER OORDER 1500 1500 KLINE OLINE 2 2 ODETREC 25 ON DISPOL 42 NO INDICATOR USED ON CHAIN chain by file name not record name AUDIT RPGIV CHAIN STATEMENT NO ERROR INDICATOR orderde 304 306 GET ORDER DETAIL RECORD FOR ORDER AND LINER 3076 Z ADD 308 C Z ADD 310 ORDKEY CHAIN 311 IN25 CABEQ 313 314 315 C ordkey chain 000150000002 ODORD 0001500 ODLINE 00002 ODCUST 0001000 ODSTOR 0000001 ODITEM Y2430 ODEXPD 20070118 ODSHPD 00000000 ODINVH 0000000 ODSTAT O ODX 316 C if not found 319 C END 320 w T 322 DID GET ORDER DETAIL RECORD 323 CONVERT ODEXPD FORMAT YYYYMMDD TO PEXPSH FORMAT MMDDYY 324 C odexpd ifne zero 20070118 325 C z add odexpd expmd 40 20070118 118 326 C odexpd DIV 10000 expyy 20 20070118 7 327 C expmd mult 100 expmdy 6 0 118 11800 328 C expmdy add expyy expmdy 11807 7 11807 329 C endif 331 w LWT 332 AUDIT RPGIV EVAL STATEMENT LOWER CASE 333 C z add zero answer 7 0 0
117. 7 39100 11 11 14 069 10 3 7 12 451 C eval interim answer cccc net difference 010617 39200 11 11 14 069 1229 85 7 7 12 10 1444 20 408 C 44 GROSS EXTRA2 010617 39300 11 11 14 069 163 23 105 453 010617 39400 11 11 14 069 454 C movel 27 movsw 1 010604 39500 11 11 14 069 2 455 AUDIT RPGIV IF STATEMENT with alpha extended factor 2 010604 39600 11 11 14 069 456 C if movsw 2 B01 010604 39700 11 11 14 069 2 457 C OR MOVSW 3 B01 010604 39800 11 11 14 069 2 458 C movel yt movsw 1 01 010604 39900 11 11 14 069 1 459 C endif E01 010604 40000 11 11 14 069 460 C movel 15 movsw 1 010604 40100 11 11 14 069 5 461 C if movsw 5 01 010604 40200 11 11 14 069 5 462 C endif E01 010604 40300 11 11 14 069 463 w w 0 mm mv eee 010604 40400 11 11 14 069 145 RTPA for RPG User Manual PAGE 464 C Z ADD 2 COUNTER 010615 40500 11 11 14 069 2 465 C Z ADD 7 answer 010615 40600 11 11 14 069 7 466 C Z ADD 14 2 gggggg 62 010615 40700 11 11 14 069 14 20 467 C IF COUNTER 0 and gggggg 5 and BOL 010615 40800 11 11 14 069 2 14 20 468 C COUNTER gt 5 AND BO1 010615 40900 11 11 14 069 2 469 C COUNTER lt 3 OR ANSWER 6 AND BOL 010615 41000 11 11 14 069 2 7 470 C COUNTER 2 BO1 010615 41100 11 11 14 069 2 471 OR COUNTER 2 BOL 010615 4120
118. 87 38 61 736 C 660 2 OREQ D2 3 02 010624 67700 11 11 32 487 34 58 731 C D2 I ANDNE D3 I 02 010624 67800 11 11 32 487 61 99 738 C D4 I ANDEQ D3 3 02 010624 67900 11 11 32 487 2318 93 741 C END E02 010624 68200 11 11 32 487 742 C 665 I IFEQ 9 B02 010624 68300 11 11 32 487 38 745 C END E02 010624 68600 11 11 32 490 719 C DO 13 I 30 B01 010624 66000 11 11 32 490 7 720 C Z ADD I 660 1 01 010624 66100 11 11 32 490 7 721 C ADD 32 660 1 01 010624 66200 11 11 32 490 39 7226 660 I ADD 23 D2 1 01 010624 66300 11 11 32 490 39 62 723 C 665 I ADD D2 I D3 I 01 010624 66400 11 11 32 490 39 62 101 724 C D MULT D2 D4 01 010624 66500 11 11 32 490 33343536373839121212121212 056057058059060061062000000000000000000 18481938203021242220231824180000000000000000000000000000000000000000000000000000 11 10 48 733 725 C 2 MULT 660 I WORK5 51 01 010624 66600 11 11 32 490 39 78 0 726 C 660 I MULT 5 WORK7 72 01 010624 66700 11 11 32 490 39 195 00 727 C I IFEQ 5 B02 010624 66800 11 11 32 490 7 730 C END E02 010624 67100 11 11 32 490 731 C 660 I IFEQ 7 B02 010624 67200 11 11 32 490 39 155 RTPA for RPG User Manual 734 C END E02 010624 67500 11 11 32 490 735 C 660 1 IFEQ D2 I B02 010624 67600 11 11 32 490 39 62 736 C 660 2 OREQ D2 3 02 010624 67700 11 11 32 490 34 58 737 C D2 I ANDNE D3 I 02 010624 67800 11 11 32 490 62 101 738 C D4 I ANDEQ D3 3 02 010624 67900 11 11 32 4
119. 9 c call TEST3 CALL BATC040624 85000 11 11 910 5666 BIF 011211 85100 11 11 911 C eval cucust 1000 011211 85200 11 11 1000 912 C CUCUST SETLL CUSTREC1 011211 85300 11 11 0001000 913 C CUCUST READE CUSTREC1 011211 85400 11 11 0001000 CUCUST 0001000 CUSTOR 0000000 CUNAME ABC STORES INC CUAD1 15 CORPORATE DRIVE CUSTA PA 914 C DOW not eof CUSTMAST B01 011211 85500 11 11 915 C EXCEPT PRTCUS 01 011211 85600 11 11 916 READ ANOTHER RECORD 011211 85700 11 11 917 C CUCUST READE CUSTREC1 01 011211 85800 11 11 0001000 CUCUST 0001000 CUSTOR 0000001 CUNAME ABC STORES INC CUAD1 423 MONTGOMERY AVENUE CUSTA PA 914 C DOW not eof CUSTMAST BO1 011211 85500 11 11 915 C EXCEPT PRTCUS 01 011211 285600 11 11 916 READ ANOTHER RECORD 011211 285700 11 11 917 C CUCUST READE CUSTREC1 01 011211 85800 11 11 0001000 CUCUST 0001000 CUSTOR 0000002 CUNAME ABC STORES STORE 2 CUSTA PA 914 C DOW not eof CUSTMAST 01 915 C EXCEPT PRTCUS 01 916 READ ANOTHER RECORD 917 C CUCUST READE CUSTREC1 01 0001000 CUCUST 0001000 CUSTOR 0000522 CUNAME ABC STORES STORE 522 CUAD1 231 CUSTA NY 914 C DOW not eof CUSTMAST 01 915 C EXCEPT PRTCUS 01 916 READ ANOTHER RECORD 917 C CUCUST READE CUSTREC1 01 0001000 918 C ENDDO OF EOL 920 c eval x 1 1 921 c eval srt x 34567 k 34567 922 c eval z 1 1 923 c eval sta z BC BC 925 c eval srt x trimr sta z BC BC 927 c eval srt x trimr srt x apos BC BC BC BC 884 c
120. 90 2418 93 741 C END E02 010624 68200 11 11 32 492 742 C 660 I IFEQ 9 B02 010624 68300 11 11 32 492 39 745 C END E02 010624 68600 11 11 32 492 719 C DO 13 I 30 B01 010624 66000 11 11 32 492 8 720 C Z ADD I 660 01 010624 66100 11 11 32 492 8 8 721 C ADD 32 660 I 01 010624 66200 11 11 32 492 40 722 C 660 I ADD 23 D2 I 01 010624 66300 11 11 32 492 40 63 723 C 660 I ADD D2 I D3 I 01 010624 66400 11 11 32 492 40 63 103 724 C D MULT D2 D4 01 010624 66500 11 11 32 492 33343536373839401212121212 056057058059060061062063000000000000000 18481938203021242220231824182520000000000000000000000000000000000000000000000000 725 C 2 MULT 660 I WORK5 51 01 010624 66600 11 11 32 492 40 80 0 726 C 660 I MULT 5 WORK7 72 01 010624 66700 11 11 32 492 40 200 00 727 C I IFEQ 5 B02 010624 66800 11 11 32 492 8 730 C END E02 010624 67100 11 11 32 492 731 C 660 I IFEQ 7 B02 010624 67200 11 11 32 492 40 734 C END E02 010624 67500 11 11 32 492 735 C 660 I IFEQ D2 I B02 010624 67600 11 11 32 492 40 63 736 C 555 2 OREQ D2 3 02 010624 67700 11 11 32 492 34 58 731 C D2 I ANDNE D3 I 02 010624 67800 11 11 32 492 63 103 738 C D4 I ANDEQ D3 3 02 010624 67900 11 11 32 492 2520 93 741 C END E02 010624 68200 11 11 32 492 742 C 660 I IFEQ 9 B02 010624 68300 11 11 32 492 40 745 C END E02 010624 68600 11 11 32 492 719 C DO 13 I 30 B01 010624 66000 11 11 32 493 9 720 C Z ADD I 660 01 010624 66100 11 11 32
121. 98 1 28 08 14 54 30 1 28 08 14 54 34 4 Insert 634479 3 812 1 28 08 14 54 35 1 28 08 14 54 43 8 Expand 634482 4 910 1 28 08 14 54 45 1 28 08 14 54 49 4 Source File QCBLSRC Object Lib Z AUDITE Declaratives Y Library Z AUDIT Audit JOBQ CBL Ver C CBL Audit OUTQ From To Audit JOBD LIBL From To JOBD Libr From To From To From To F3 Exit F14 Fields F15 Commands F16 Variables F19 Called Pgm F23 Pre audit C 2000 2002 Harkins Audit Software Inc C 2000 2002 Harkins Audit Software Inc Figure P 13 RTPA for COBOL Expansion of COBOL program GETEXPSH 12 RTPA for RPG User Manual RTPA for RPG User Manual Display Spooled File File ZZAUDITP Control Find KES Program GETEXPSH Get Expected Ship Date Order Detail COBOL 400 Obj Lib Z A Job 634377 User Profile PHH Source Type CBL Sour STMT SEQNBR A 1 2 NS AS LO STE 018500 000000 START SECTION 018600 000000 STARTUP 558 018700 PERFORM 100000 INIT PARA THRU 018800 100099 INIT PARA EXIT 020400 100000 INIT PARA 020500 INITIALIZE W S amp OPEN FILES 564 020600 MOVE SPACES TO WS FLAG AREA 020700 WS DSPLAY FORMAT NAME 565 020800 MOVE GETEXPSH TO FATLERR PROGID GETEXPSH 566 021000 MOVE OPEN TO FATLERR OPERATION OPEN 567 021100 MOVE GETEXPDSC TO FATLERR FILE NAME GETEXPDSC 568 021200 OPEN I O DISPLAY FILE 569 021400 MOVE ORDERDE TO FATLERR FILE NAME ORDERDE 570 021500 OPEN I O ORDERDE 571 021700 MOVE
122. AAAAA 520 C PARM MSGDB 79 BBBBBBBBBBBBBBBBBBBBBBBBBBBBB 0 ENDIF B SE 524 C CUSKEY CHAIN CUSTREC1 30 N30 00020500000001 CUCUST 0002050 CUSTOR 0000001 CUNAME XYZ STORE ARDMORE CUAD1 122 MONTG das 8 z add ei uw aa 3 V erac F3 Exit F12 Cancel F19 Left F20 Right F24 More keys Figure 2 12 Audit of CALL to program BATCHPGMI in program NEWEXPSH gt F3 Exit F10 View 4 Parameters for options 1 2 3 or command F11 View 2 F12 Cancel F22 Printers Work with All Spooled Files Type options press Enter 1 Send 2 Change 3 Hold 4 Delete 5 Display 6 Releas 7 Messages 8 Attributes 9 Work with printing status Device or Total Cice Opt File User Queue User Data SES Pages Page Copy NEWEXPSH PHH OPRINT RDY 36 JL NEWEXPSH PHH OPRINT RDY 142 1 QPRINT2 PHH QPRINT2 NEWEXPSH RDY ils 1 PHH OPRINT NEWEXPSH RDY 1 1 ZZAUDITP PHH OPRINT NEWEXPSH HLD 53 JL 5 ZZAUDITP PHH OPRINT BATCHPGM1 HLD 1 1 Bottom F24 More keys Figure 2 13 Display ZZAUDITP audit output of program BATCHPGM1 RTPA for RPG User Manual 41 Display Spooled File dren NE ZZAUDITP Page Line 1 1 Cone ap Wa Columns d 78 Find S ecd e a o UPON Dd else RO eee a Ore eee eee Program BATCHPGM1 Batch program with call to another batch program Obj Lib BATCHPGM1 BATCHPGM1
123. AAAAAAAAAAAAAAAAAAAAAAAA 6c PARM PARMB 79 010529 600 17 05 42 126 BBBBBBBBBBBBBBBBBBBBBBBBBBBBB 8 c MOVEL AAAAAAAA CHECK8 8 010827 800 17 05 42 131 AAAAAAAA 9c Z ADD 5 FIRST 20 000521 900 17 05 42 131 5 10 C Z ADD 14 2 SECND 3 2 000521 1000 17 05 42 131 4 20 11 C FIRST MULT SECND PROD 52 000521 1100 17 05 42 131 5 4 20 21 00 13 C ANSR IFNE 15 B01 000521 1300 17 05 42 131 0 14 C ANSR ANDNE 14 01 000521 1400 17 05 42 131 0 15 c AAAAAAAA OREQ CHECK8 01 010827 1500 17 05 42 131 AAAAAAAA 16 C 100 DIV 8 ANSR 30 01 000521 1600 17 05 42 131 12 17 C MVR FRACT 20 01 000521 1700 17 05 42 131 4 18 C END E01 000521 1800 17 05 42 131 20 C FRACT IFNE 0 01 000521 2000 17 05 42 132 4 21 C Z ADD FRACT PRTFLD 20 01 000521 2100 17 05 42 132 4 4 22 C END E01 000521 22800 17 05 42 131 24 C MOVEL ALL C MSGDC 051007 2400 17 05 42 132 CCCCCCCCCCCCCCCCCCCCCCCCCCCCC 25 C MOVEL ALL D MSGDD 051007 2500 17 05 42 132 DDDDDDDDDDDDDDDDDDDDDDDDDDDDD 26 C MOVEL ALL E MSGDE 051007 2600 17 05 42 132 EEEEEEEEEEEEEEEEEEEEEEEEEEEEE 27 call with parms 051007 2700 17 05 42 132 28 C CALL BATCHPGM2 051007 2800 17 05 42 132 29 C PARM MSGDC 40 051007 2900 17 05 42 132 CCCCCCCCCCCCCCCCCCCCCCCCCCCCC 30 C PARM MSGDD 50 051007 3000 17 05 42 132 DDDDDDDDDDDDDDDDDDDDDDDDDDDDD 31 C PARM MSGDE 60 051007 3100 17 05 42 132 EEEEEEEEEEEEEEEEEEEEEEEEEEEEE 32 C SETON LR 000324 3200 17 05 42 132 33 C RETURN 000316 3300 17 05 42 132 166 RTPA for RPG User Manual
124. AD DAYS P 7 00 Y ODSSY050 LD INP YYYYMMDD P 9 00 Y ODSSY050 LD OUT YYYYMMDD P 9 00 Y ODSSY050 OPERATION A 2 Y ODSSY050 WORK AREA G 8 Y A 1 CODE Y ODT CUSTOMER NUMBER P 7 00 CUSTOMER NUMBER Y ODT EXPECTED SHIP DATE P 9 00 EXPECTED SHIP DATE YYYYMM Y ODT INVOICE DATE P 9 00 INVOICE DATE YYYYMMDD Y ODT INVOICE NUMBER P 7 00 INVOICE NUMBER Y ODT ITEM CODE A 10 ITEM CODE Y ODT ITEM PRICE P 7 02 ITEM PRICE F3 Exit F12 Cancel Enter Accept choices and continue C 2000 2002 Harkins Audit Software Inc Figure P 15 RTPA for COBOL Audit Variables for program GETEXPSH Productivity Gains with RTPA Using RTPA auditing can save almost any programmer substantial amounts of time in many different kinds of programming activities Real Time Program Auditing is a powerful technique allowing programmers to more quickly learn legacy programs find bugs in software validate that new software functions correctly enhance programs and essentially eliminate guessing and speculation as to what happened or is happening Auditing is an intuitive process and RTPA is so easy to use that most programmers can be up and running with audit enabled programs within minutes of installing RTPA It is not uncommon for programmers to report that they solved a major problem the first day that they installed the software a problem that may have been plaguing them for a while but couldn t be found using of the conventional debug
125. Advantages of Auditing with RTPA sse eene nennen nennen nennen nnns 16 WhatRTPA Doesnt DO a sodai cia nth re dra tici rnb c etu aded 17 Document Converitlons tut at P epu a ee a a Ec 17 RTPA Web video presentations for programmer orientation sse 17 RTPA Online Demonstrations and Training U U uu uuu 19 RIPA Software Guarantee ru not a c e oa tia DOE E e Ua ERE PEE Gro 19 Harkins Audit Software Inc WebSite 5 c te tite bitrate uu ita aas 19 Chapter 1 Installing Real Time Program Audit 21 FREQUIFEMENUS 21 Step 1A Installing RTPA from CD l a a nnne nnne nnne nennen nnn 21 Step 1B Installing RTPA from a Downloaded File rarenrrnvrnnronvernnrnnvnrnnrenvernnrennerenrenenvenseneerensenesrensenenn 22 Step 2 Enter the RTPA for RPG License Key U U u 24 How to create a PDM User defined Option for RTPA u 24 How to create a private RTPA User Testing Library L L L L a 26 How to find the System i Processor Group with WRKLICINF eee 27 Chapter 2 Quick Start Guide 29 Expand the Sample Program U tnnt rennen ener nnne 29 Execute the Program iiss o uoi ae
126. BBBBBBBB 523 521 C ENDIF 11 11 14 114 524 C CUSKEY CHAIN N30 00020500000001 CUCUST 0002050 CUSTOR 0000001 CUSTA PA 525 C z add 526 C z add 527 C z add 528 C z add 529 C z add 530 C z add 531 C z add 532 C z add 533 C z add 534 C z add CUSTREC1 CUNAME XYZ STORE all 1 all 2 all 3 all 4 all 5 all 6 all 7 all 8 all 9 zeros aa 111 bb 222 cc 333 dd 444 ee 555 ff 666 gg 777 hh 888 ii 999 total 0 536 total aa bb cc dd ee ff gg hh ii 4995 111 222 333 44 538 c eval 539 C IN30 0 540 GOT CUSTOMER MASTER IFEQ 541 C Z ADD 542 C Z ADD 543 C MOVEL 544 C MOVEL 545 C EXCEPT 548 C ENDIF 550 DISPLAY DETAIL SCREEN 4 555 666 777 total aa bb cc dd ee ff gg hh 888 999 010118 B01 010118 01 051021 01 010118 01 051007 01 051007 040918 GRAM 01 01 040624 01 040624 E01 010118 30 30 IS NOT000717 CUAD1 122 MONTGOMERY AVE 3996 111 222 333 444 555 666 777 888 OFF CUCUST 2050 CUSTOR 1 CUNAME KCUSNO 2050 KSTORE 1 KCUSNA XYZ STORE ARDMORE CUNAME XYZ STORE PCUSNA XYZ STORE ARDMORE PRTCUS XYZ STORE 0 050102 0 050102 0 050102 0 050102 0 050102 0 050102 0 050102 0 050102 0 050102 0 050102 050102 050102 B01 991225 991225 01 001007 01 010118 01 000323 01 000323 01 000323 OFF E
127. BBBBBBBBBBBBBBBBBBBBB 517 call with parms 815 CALL BATCHPGMI 519 PARM MSGDA 18 AAAAAAAAAAAAAAAAAAAAAAAAAAAAA More F3 Exit F12 Cancel F19 Left F20 Right F24 More keys Figure 4 7 The transient error of customer 2050 was caused by source statement 513 Overriding Compile Options RTPA allows you to override the normal compile options for this Job when creating the audit enabled program object Program source compile overrides for RTPA auditing are at three levels 1 The input soutce program may have Header specifications compile override statements 54 RTPA for RPG User Manual e exitum E 6 76 Edit ZSAUDIT QRPGLESRC SEU gt NEWEXPSH PME HKeywords tpt L D L L e be ese ese eee bbb bbb ote bs b AOCkckckck ck ckck ck kck ck kk Beginning of data KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK 0001 00 H title Text Advanced RPGIV operations and Built In Functions BIFs 0002 00 H DATEDIT MDY 0003 00 H indent 0004 00 H altseq NONE 0005 00 H option srcstmt Nodebugio 0006 00 O07 00 7s 0008 00 DATE LAST CHANGED 01 17 01 PROJECT 0009 00 THIS IS AN RPGIV SOURCE PROGRAM FOR THE IBM AS 400 COMPUTER 0010 00 THIS RPGIV SOURCE PROGRAM USES SOME NEW RPGIV CODING TECHNIQUES OOLL 00 5 OOLA OG w OOLS 00 PROGRAM NEWEXPSH NEW EXPECTED SHIP DATE FOR ORDER LINE 0014
128. CODE 289 C Z ADD ZERO 290 C MOVEL BLANKS 291 C Z ADD ZEROS 292 C Z ADD ZEROS 293 C MOVEL BLANKS 294 C Z ADD ZERO 295 C TIME 296 C EXFMT NEWEXPD1 IN03 0 IN42 0 KORDER 0001500 296 C EXFMT NEWEXPD1 IN03 0 IN42 0 KORDER 0001500 297 TEST F3 298 C INO3 CABEQ ON 0 300 C UDATE CABEQ 090100 120906 302 303 VALIDATE ORDER AND LINE 304 306 GET ORDER DETAIL RECORD FOR ORDER AND LINE 307 C Z ADD KORDER 1500 308 C Z ADD KLINE 2 309 310 ORDKEY CHAIN ODETREC 311 IN25 CABEO ON 313 314 AUDIT RPGIV CHAIN STATEMENT NO ERROR INDICATOR 315 C ordkey chain orderde 000150000002 ODORD 0001500 ODLINE 00002 ODCUST 0001000 ODSTOR 0000001 ODITEM Y2430 ODEXPD 20051126 ODSHPD 00000000 ODINVH 0000000 ODSTAT O ODX 011227 22200 11 10 48 760 020623 22300 11 10 48 760 001007 000323 000323 000323 000514 000514 000514 000514 001002 001002 000323 000323 010501 051007 051007 000323 000323 010113 000323 000323 000323 990918 001007 001007 000909 25 000909 000909 030426 000918 25 ph234 030504 22400 22500 22600 22700 22800 22900 23000 23100 23200 23300 23400 23500 23600 23700 23700 23800 23900 24100 24300 24400 24500 24700 24800 24900 25000 25100 25200 25400 25500 25600 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11
129. D LINE KEYED PORDER 1500 PLINE CLEAR EXPECTED SHIP DATE AND ERROR CODE ZERO BLANKS ZEROS ZEROS BLANKS ZERO NEWEXPD1 KORDER 1500 KLINE PEXPSH 0 PERROR KCUSNO 0 KSTORE 0 KCUSNA EXPMDY 0 TIMEN 111048 KLINE 00001 UDATE 120906 TIMEN 111048 NEWEXPD1 KLINE 00002 UDATE 120906 TIMEN 111048 ON 090100 DONE DONE Figure 2 9 Audit Output File for NEWEXPSH 001007 000323 000323 000323 000514 000514 000514 000514 001002 001002 000323 000323 010501 051007 051007 000323 000323 010113 22400 22500 22600 22700 22800 22900 23000 23100 23200 23300 23400 23500 23600 23700 23700 23800 23900 24100 11 11 11 11 11 11 11 11 11 11 11 11 11 11 il 11 11 11 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 48 48 48 48 48 48 48 48 48 54 54 54 54 761 761 48 48 48 48 761 761 761 761 761 761 761 761 761 48 761 761 761 917 917 917 917 WRITE The RTPA audit output for RPGLE shows the exact time the statement was executed to the millisecond The EXFMT execute Format instruction is a WRITE to the screen then a READ from the screen with keyed data or command keys RTPA audits both the WRITE and the READ with the exact times of
130. D1 000000 23700 17 38 4 345 C dou eistline eyes or B0 FOOD 302 FINS B01 FOOD 347 C move F held 1 01 348 C enddo DOW COUNTER 6 E01 FOOD 349 movel ut halde 1 351 C eval INSO lt 11 00 x 8 50 in lt TI gt F s E El 14 4 at n HP Done Use Advanced Search Options s Find a word in the current PDF document RTPA for RPG User Manual 116 Input Source RPGLE program TESTEVALCO Test EVAL CORR OP CODE V5R4 Columns 6 76 Edit ZSAUDIT QRPGLESRC SEU gt TESTEVALCO FMT D DName ETDsSFrom To L 1Dc Keywordst k K Beginning of data kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk 0001 00 d DSa ds Qualified 0002 00 d aorder 8 0 inz 0 0003 00 d xorder 9 2 inz 0 0004 00 d iorder 7 3 inz 0 0005 00 d rorder 9 3 inz 0 0006 00 0007 00 d DSb ds Qualified 0008 00 d border 8 0 inz 0 0009 00 d xorder 9 2 inz 0 0010 00 d iorder 7 3 inz 0 0011 00 d rorder 9 3 inz 0 0011 01 c Time Timen 6 0 0011 02 audit the RPGLE V5R4 new Op code eval corr 0011 03 DSa is a qualified data structure 0011 04 DSa ds Qualified 0011 05 aorder 8 0 inz 0 0011 06 xorder 9 2 inz 0 0011 07 iorder 7 3 inz 0 0011 08 rorder 6 3 inz 0 0011 09 DSa DS fields xorder iorder and rorder correspond with DSb DS 0011 10 DSb is a qualified data structure 0011 11 DSb ds Qualified 0011 12 border
131. D7D8D9E2E3EA4E5E6E7E8E9405A7C7B D2D3D4D5D6D7D8D9E2E3EA4E5E6E7E8E9405A7C7B 30 eval result szChars KLMNOPQRSTUVWXYZ KLMNOPQRSTUVWXYZ Bill endif 02 32 read datafile 02 File Key BE enddo E02 34 Eva imi ESO TI 01 i 35 return E01 Figure 4 32 CVTTOHEX sample source program RTPA audit output 77 RTPA for RPG User Manual Display Spooled File File ZZAUDITS Page Control Colum Find GA Hs Ke estere li sme cenetsh ster Dime leges e e Teteres ee Ge ker rer ke Program CVTTOHEX Convert Character to Hex Data in PF DATAFILE Obj Lib ZSAUDITE Initiated 6 17 08 CVTTOHEX CVTTOHEX Job 904405 User Profile PHH Source Type RPGLE X Source File Library QRPGLESRC Line Do SrcId gl Source program example from www rpgworld com 22 read datafile File 00002 Key DATA 1234567890ABCDEFGHIJ 23 dow not eof datafile 24 convert character to hex 25 cvthc szHex data Slen data 2 B01 1234567890ABCDEFGHIJ 1234567890ABCDEFGHIJ 26 eval result szHex FIF2F3F4F5F 6F 7F 8F 9FOC1C2C3C4C5C6C7C8C9D1 F1F2F3F4F5F6F7F8F9FOC10C2C3C4C5C6C7C8C9D1 27 if szHex lt gt blanks 01 FIF2F3F4F5F 6F 7F 8F 9FOC1C2C3C4C5C6C7C8C9D1 28 convert hex to character 01 29 cvtch szChars szHex 1len TrimR szHex B02 F1F2F3F4F5F6F7F8F9FOC10C2C3C4C5C6C7C8C9D1 F1F2F3F4F5F6F7F8F9FOC10C2C3C4C5C6C7C8C9D1 30 eval result szChars 1234567890ABCDEFGHIJ 1234567890ABCDEFGHIJ Sil
132. DD 1 COUNTER 01 000918 30800 11 11 14 061 2 366 C DOW COUNTER 6 BO1 000918 30700 11 11 14 061 2 367 C ADD 1 COUNTER 01 000918 30800 11 11 14 061 3 366 C DOW COUNTER 6 B01 000918 30700 11 11 14 061 3 367 C ADD 1 COUNTER 01 000918 30800 11 11 14 061 4 366 C DOW COUNTER lt 6 B01 000918 30700 11 11 14 061 4 367 C ADD 1 COUNTER 01 000918 30800 11 11 14 061 5 366 C DOW COUNTER lt 6 B01 000918 30700 11 11 14 061 5 367 C ADD 1 COUNTER 01 000918 30800 11 11 14 061 6 368 C ENDDO E01 000918 30900 11 11 14 061 369 000918 31000 11 11 14 063 370 AUDIT RPGIV select WHEN OTHER STATEMENTS 001029 31100 11 11 14 063 371 C SELECT B01 001029 31200 11 11 14 063 372 C WHEN COUNTER 6 X01 001029 31300 11 11 14 063 6 372 C WHEN COUNTER 6 X01 001029 31300 11 11 14 063 6 373 C Z ADD ZERO COUNTER 01 001029 31400 11 11 14 063 0 375 C ENDSL EO1 001029 31600 11 11 14 063 376 AUDIT RPGIV select WHEN OTHER STATEMENTS 010912 31700 11 11 14 063 377 C movel P mode 1 010912 31800 11 11 14 063 P 378 C z add 1 PHSCNO 10 010912 31900 11 11 14 063 1 379 C SELECT B01 010912 32000 11 11 14 063 380 C WHEN mode P X01 010912 32100 11 11 14 063 P 381 C OR PHSCNO 1 X01 010912 32200 11 11 14 063 1 380 C WHEN mode P X01 010912 32100 11 11 14 063 P 337 C OR PHSCNO 1 X01 010912 32200 11 11 14 063 1 382 C Z ADD ZERO COUNTER 01 010912 32300 11 11 14 063 0 38
133. DD 12345678 ODEXPD 80 010807 60900 11 11 32 476 12345678 670 C ODEXPD DIV 10000 EXPYY 20 010703 65500 11 11 32 476 12345678 34 672 C 100 DIV 5 25 NET 30 010703 65700 11 11 32 476 19 673 C MVR FRACT 4 4 010703 65800 11 11 32 476 2500 11 10 48 733 PAGE 675 C GROSSAAAAAAAAADIV HOURSBBBBBBBBBRATECCCCCCCCCC 52 01 010624 66000 11 11 32 477 514 22 40 000 12 85 676 C MVR LEFTDDDDDDDDDD 44 01 010624 66100 11 11 32 477 2200 678 C ODEXPD DIV 10 YYYY 40 01 010624 66300 11 11 32 477 12345678 4567 679 w O 010113 62000 11 11 32 477 680 READ AND PRINT ALL CUSTOMER STORE RECORDS FOR DISPLAYED CUST 010113 62100 11 11 32 477 681 010113 62200 11 11 32 477 683 C CUCUST SETLL CUSTREC1 010113 62400 11 11 32 477 0002050 684 C CUCUST READE CUSTREC1 84 010113 62500 11 11 32 477 N84 0002050 CUCUST 0002050 CUSTOR 0000000 CUNAME XYZ CORPORATE OFFICE CUAD1 555 ARCH STREET CUAD2 CUSTA PA 685 C IN84 DOWEQ OFF BO1 010113 62600 11 11 32 477 0 686 C EXCEPT PRTCUS 01 010113 62700 11 11 32 477 687 READ ANOTHER RECORD 010113 62800 11 11 32 477 688 C CUCUST READE CUSTREC1 84 01 010113 62900 11 11 32 477 N84 0002050 CUCUST 0002050 CUSTOR 0000001 CUNAME XYZ STORE ARDMORE CUAD1 122 MONTGOMERY AVE CUAD2 THIRD FLOOR CUSTA PA 685 C IN84 DOWEQ OFF BO1 010113 62600 11 11 32 477 0 686 C EXCEPT PRTCUS 01 010113 62700 11 11 32 477 687 READ ANOTHER RECORD 010113 62800 11 11 32 477 688 C C
134. E ALL ALL 256 010411 52400 11 11 14 VAR ALL 1 PRET REET RR TREE HE FE FE FE RAE FE FE AE AE AE AE E HE HE HE FE EEE HEHEHE FE FE FE AE AE AE FE AE AEE E E EEE AE FE AE E E HE EEE HEHEHE VAR ALL 101 FEFE HE FE AE AE AE E EAE HEHEHE HE HE HE FE FE FE FE RHE AE FE AE AE AE AE E HE HE HE FE FE HE FE FE FE FE FE AE AE FEAE E E E E E HE HE HE FE FE FE FE FE FE FE FE FE AE FE EE E E HE HE HE FE FE FE FE FE FE FE FE AE FE AE E E HE HE HE HE FE HEHEHE VAR ALL 201 256 584 C MOVE ALLA ALL 256 010411 52500 11 11 14 VAR ALL 1 FEFE FE HE AE AE AE AE EAE EHEHEHE HE HE FE FE FE FE RHE RAT E AE E HE HE HE FE FE HE FE RHE HHH THT RRR HE HE HE FE FE FE FE HR HRT RA E E EE HE FE FE FE FE RAH RH AE E EHE HE HE HE RTH RH RH BH VAR ALL 101 FEFE FE HH BH BE EHE FE FE FE RHE AE FE AE AE AE AE EHE HE HE FE RT FE FE FE FE FE AE FEAE BH E E HE HE HE FE FE FE FE FE FE FE FE FE FE FE EE E E HE HE HE FE FE FE FE EEE FE FE AE E E HE HE HE HE HE HEHEHE VAR ALL 201 256 VAR ALL 1 FEFE FE FE AE AE AE E EAEE HEHE HE HE HE FE RAE RHE AE FE AE AE AE AEE HE HE HE FE FE HE FE FE FE FE FE FE AE RT E E E HE HE HE FE FE FE FE FE FE AE FE FE AE FEE E E E E HE HE FE FE FE FE FE FE FE FE AE FE AE AE E HE HE HE HE HE HE HEHE HEHEHE VAR ALL 101 FEFE FE AE
135. E HE FE EA FE FE EAE EA EA AE HE HE EA HE FE FE FE HE HE FE FE EA BERE ETE EHE HEHEHE AE HE FE AE EHE HE HEEE HE HE HEHE HE HEHHE VAR ALL 101 200 THEE HE HE EE HIE EIE HERE HE EE E FE FE FE AE HE FE HE HE FE FE FE HE FE FE FE HE HE FE FE E HE FE FE FE HE FE FE FE E HE IEEE IEEE FE FE IEEE BEBE BE HEHEHE VAR ALL 201 256 VAR ALLS 1 100 FERRE EEE E HE HE FEAE HE HE FEAE E BERE EAE EA BIER IE A HE FE AE E HE AA A HEHEHE EEE EEE EEE HEHEHE VAR ALLS 101 200 FEAE EHE HEHE E HE FEFE FE E HE HE FE AE E HE FE FE HE HE FE FE AE HE FE FE FE E HE FE FE BIER HE HE FE FE FE HE FE FE FE HE HE FE FE HEHEHE E FE FE FE AE E FE FE FE E HE HEHEHE HEHEHE VAR ALL 201 256 586 C MOVE 12 MOVSW 010429 52700 11 11 13 681 2 587 C MOVE 3 MOVSW1 1 010429 52800 11 11 13 681 3 588 C MOVE ur MOVSW2 1 010429 52900 11 11 13 681 4 589 C MOVE vB MOVSW3 1 010429 53000 11 11 13 681 5 590 C MOVE 15 MOVSWA 1 010429 53100 11 11 13 681 5 591 C MOVE A HLD1 1 010429 53200 11 11 13 681 A 593 C EXPMDY IFEQ UDATE 01 010420 53400 11 11 13 681 11807 120906 594 C MOVSW ANDEQ BLANK 01 000514 53500 11 11 13 681 2 595 C MOVSW OREQ 5 01 010429 53600 11 11 13 681 2 596 C MOVSW1 OREQ MOVSW2 01 010429 53700 11 11 13 681 3 4 597 C MOVSW3 ORNE MOVSWA 01 010429 5
136. EE ONS Bottom F13 How to use this display Figure 2 6 Convert RTPA input source program NEWEXPSH compile into PDF in the IFS Spool file NEWEXPSH convetted into NEWEXPSH pdf in the System 1 IFS The Expanded RTPA compile listing shows the inserted RTPA Z audit statements from the copied input soutce member which is always in a source member in library Z AUDITE Execute the Program Execute the audit enabled program NEWEXPSH using the expanded obkect program in library Z AUDITE by typing on the command line CALL ZSTESTIN This is a CLP that calls program NEWEXPSH passing order number and line number parameters RTPA for RPG User Manual 35 NEWEXPSH Sample RPG program for Auditing 1 30 07 16 59 29 Customer 1000 ABC STORES STORE 522 Store 522 Order Number 1500 Line Number 1 Expected Ship Date 3 19 07 F3 Exit Enter Change expected ship date Figure 2 7 The audit enabled program NEWEXPSH executes recording audits in real time Review the Audit File RTPA audit output file ZZAUDITP The NEWEXPSH program object created an audit file in printer file ZZAUDITP which you will identify by the user data NEWEXPSH in the user outq or whatever the outq was specified in the RTPA main screen Use the IBM WRKSPLF command to display the audit file At the command line type WRKSPLF 36 RTPA for RPG User Manual
137. F12 Cancel Press Enter to continue System APPCON Job description RTPA Library OGPL User profile ROD CL syntax check NOCHK Hold on job queue NO End severity 30 Job date SYSVAK Job switches 5 00000000 Inquiry message reply ROD Job priority on job queue 5 Job queue RTPA Library A e QGPL Output priority on output queue 5 Printer device USRPRF Output queue USRPRF Library Moner Press Enter to continue F3 Exit F12 Cancel Figure D 4 Sample Job Description RTPA Display Job Description System APPCON Job description RTPA Library OGPL Message logging Level 4 Severity 0 Text de NOU JE SI Log CL program commands NO Job log output SYSVAL Accounting code USING TRE Print text SYSVAL Routing data Request data NONE MONIES RTPA for RPG User Manual 114 Display Job Description System APPCON Job description RTPA Library OGPL DDMECONVOeRS IE e cR M E SEN KEEP Device recovery action NE EE SYSVAL TimnerskieesendpookN EEE TES ZA Job message queue maximum size 1 SYSVAL WO message queue scwilil dito EEE SYSVAL Adovwamaltaplefehreads EE NO e NSEGQSEOUDpSe toe bea Ure bee TUE DE qq NONE SPeoTeqa ra kente teman ENE SOWIE TED Ser AE RTPA jobd Bottom Press Enter to continue
138. F3 Exit F12 Cancel 115 RTPA for RPG User Manual Appendix E RTPA Audit Output Examples Examples of Input RPG programs and RTPA Audit Output Adobe Reader Frie Edit View Document Tools Window Help 17 38 32 467 PAGE 2 287 C MWEL BLANKS KCUSNA 000000 23400 17 38 32 469 288 C Z ADD ZERO EXPHDY 000000 23500 17 38 32 469 280 C TIME TIMEN 60 START TIME 000000 23600 17 38 32 469 173832 290 C EN NEWEXFD1 000000 23700 17 38 32 469 WRITE INO3 0 N42 O KORDER KLINE 00001 UDATE 101905 TIMEN 172832 000000 23700 17 38 35 568 READ 000000 23900 17 38 35 568 290 C EXEWT NEWEXPD1 1NO03 0 IN42 O KORDER 0001500 KLINE 00002 UDATE 101905 TIMEN 172832 292 C INO3 CABEQ DONE zc MATE CABEQ 090100 DONE 000000 24100 17 38 35 568 301 L ADD WORDER OCRDER 000000 24800 17 38 35 568 1500 302 C LA KLINE OLINE 000000 24900 11 38 35 568 2 300 C ordkey pg ain erderde 25 1S NOT FOUND ph234 000000 25600 17 38 35 568 ODORD O001500 COLINE 00002 ODCUST 0001000 ODSTOR 0000001 ODITEM V2430 ODPRIC 0002515 ODGTY 0000003 ODREQD 20000317 ODEXPD 20051 310 if not amp fcund B01 ph234 000000 25700 17 38 35 570 313 C END E01 ph235 000000 26000 17 38 35 570 HE ode ifne zero CHECK FOR ZERO Fh543 000000 26500 17 38 35 570 319 z ai o cedex expnd 40 MIDD ph 43 000000 26800 17 38 35 570 1 1126 j 3200 ode 10000 ex 20 vw 000000 31100 17 38 35 57
139. H inr BeOS ite eet thd th th thd tte ESEHEHESEHEREEHESERESESEIESESEHEREHEAESEHEAEHEH ESEHESEHIESESEHEAEAI ACkckckck ck ckck ck kc ck ck kk Beginning of data KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK 0001 00 H title Text Advanced RPGIV operations and Built In Functions BIFs 0002 00 H DATEDIT MDY OOO SOOM es 0004 00 H altseq NONE 0005 00 H option srcstmt Nodebugio 0006 00 9007500 0008 00 DATE LAST CHANGED 01 17 07 PROJECT abcdef 0009 00 THIS IS AN RPGIV SOURCE PROGRAM FOR THE IBM System i COMPUTER 0010 00 THIS RPGIV SOURCE PROGRAM USES SOME NEW RPGIV CODING TECHNIQUES DOLL OQ Q 032 OO s 993L9 OO PROGRAM NEWEXPSH NEW EXPECTED SHIP DATE FOR ORDER LINE 0014 00 AUTHOR PAUL H HARKINS QS DATE 08 15 05 OO PROJECT RTPA F3 Exit F4 Prompt F5 Refresh F9 Retrieve F10 Cursor F11 Toggle F16 Repeat find F17 Repeat change F24 More keys C O mur 8 ClOmuP SOVER Figure D 1 RTPA expanded source with Z Audit statements is in library ZSAUDITE Z AUDITE QRGLESRC Columns i Edit ZSAUDITE QRPGLESRC SEU gt NEWEXPSH o Ce 405000 CLONO1Factorl 0pcode amp ExtFactor2 Result Len D H 0346 00 6 adddur 22 minutes end time 0347 00 Z Z ADD 26 ZSSRC 0348 00 Z C EXSR ZSGENS 0349 00 28 C NOL EXCEPT Z 00026 0350 00 6 adddur 50 seconds end time 0351 00 ZS 5 Z ADD 2 ZSSRC 952 00 ZS G EXSR ZSGENS 03553 00 AG C NOL EXCEPT Z 00027 0354 00 add 1000
140. Harkins Audit Software OM REAL TIME PROGRAM AUDIT RTPA for RPG RTPA for CL RTPA for COBOL RTPA Query United States Patent No 6 775 827 Australian Patent Patent No 778165 User Manual VAR3 Copyright O 2003 All Rights Reserved Harkins Audit Software Inc 816 Daisy Lane West Chester PA 19382 www harkinsaudit com Telephone 888 350 9148 610 431 1755 Fax 610 436 1249 Technical Support support Qharkinsaudit com pharkins harkinsaudit com paulhark aol com Sales sales harkinsaudit com Paul Harkins email paulhark aol com RTPA Version V4R3 Last Updated 06 10 08 OS 400 Versions V5R3 through V6R1 IBM Supported Releases Table of Contents siewcarcaudwanSuvucuswebvuuseawenueusuuddudveseuwuuusutweueucadawsuuusbuauaubuuuwuud unksnsseuegenhounnen RTPA and Auditing The i ere ete ea 1 RTPA Auditing of RPG CL and COBOL sse ener nennen nennen nete 2 RTPA Query for PDF of all Job audit output by Execution 3 Productivity Gains with TP see en cientes reine ite ar dod eie de EE 14 Demystifying Legacy Programs eese dites tide e de ia dos ds an duas 14 Faing Sotware Giles Su u ua Sa qd e dura ined 15 Improving Quality and Reliability essen 15 Creating Web GUI Reports from program data and logic sese 15
141. INTERIM EXTRA2 010617 38800 11 10 54 944 00 0 448 C 33 15 GROSS 010617 38900 11 10 54 944 00 449 C MORE 010617 39000 11 10 54 944 00 452 C 44 GROSS EXTRA2 010617 39300 11 10 54 944 00 0 11 10 48 733 422 C Z ADD 3 COUNTER 01 010604 36300 11 10 54 963 3 423 C ENDIF EO1 010602 36400 11 10 54 963 424 C sum add total final 010604 36500 11 10 54 963 0 3115 3115 00 425 C eval final answer counter 5 010602 36600 11 10 54 964 15 00 7 3 426 C eval sum 4 6 2 1555 010602 36700 11 10 54 964 1563 0 427 C eval final answer counter 010610 36800 11 10 54 964 21 00 7 3 428 C eval final answer counter 010610 36900 11 10 54 964 21 00 7 3 429 C eval final answer counter 010610 37000 11 10 54 964 21 00 7 3 430 C eval final answer counter 010610 37100 11 10 54 964 21 00 7 3 431 C eval final answer counter 010610 37200 11 10 54 964 2 33 7 3 432 C eval final answer counter 010610 37300 11 10 54 964 2 33 7 3 433 C eval sum 4 6 counter 1555 010605 37400 11 10 54 964 1562 0 3 434 C eval total 4 6 sum 010603 37500 11 10 54 965 1572 1562 0 435 C eval sum 4 6 010603 37600 11 10 54 965 10 0 436 C eval total 4 sum 6 answer final net 010606 37700 11 10 54 965 82 10 0 7 2 33 112 437 w 010602 37800 11 10 54 965 438 C Z ADD 7 12 ccce 52 010617 37900 11 10 54 965 7 12 439 C Z ADD 163 23 gross 62 010617 38000 11 10 54 965 163 23 440 C add 1444 2 difference
142. ITE Copybook source copied into RPG source programs with the COPY statement are audited unless excluded with RTPA an option 60 RTPA for RPG User Manual Built In Help Real Time Program Audit provides full cursor sensitive online help text support RTPA online help allows the user to review detailed information about the screens important screen fields and command keys get online help place the cursor at the field where you want help information and then press F1 ZSPGMO1R Real Time Program Audit for RPG V4R3 HO11GEN Select Program to Audit Help Use this screen to select the source program to audit and select options for the audit Press F10 to create the audit enabled object or F11 to access advanced auditing functions Member Name File Name Library Name Specifies the source member to audit enable along with its location Type F4 in the Member Name field to select the source member using PDM Audit Profile The name of the set of audit preferences to use Type F4 in the Audit Profile field to list available audit profile or use F6 to override the selected audit profile Audit File Outq The output queue on which to place the audit file SAME causes the audit file to be created on the default outq of the executing program object Object to Library TOLIB The library in which the audit enabled object is created Figure 4 14 RTPA Help Text 61 RTPA
143. KORDER OORDER 001007 24800 11 11 12 858 1500 1500 308 C Z ADD KLINE OLINE 001007 24900 11 11 12 858 2 2 309 000909 25000 11 11 12 858 133 RTPA for RPG User Manual 310 ORDKEY CHAIN 311 IN25 CABEQ 313 314 315 C ordkey chain 000150000002 ODETREC ON 25 DISPOL 42 NO INDICATOR USED ON CHAIN chain by file name not record name AUDIT RPGIV CHAIN STATEMENT NO ERROR INDICATOR orderde ODORD 0001500 ODLINE 00002 ODCUST 0001000 ODSTOR 0000001 ODITEM Y2430 ODEXPD 20070118 ODSHPD 00000000 ODINV 0000000 ODSTAT O ODX 000909 000909 030426 000918 ph234 030504 25100 25200 25400 25500 25600 11 11 11 11 11 11 11 11 11 11 ODPRIC 0002515 ODQTY 0000003 12 12 12 12 12 ODREQD 20000317 858 858 858 858 858 PAGE 316 C if not found 01 ph234 030504 25700 11 11 12 858 319 C END EO1 ph235 030504 26000 11 11 12 858 320 000909 26100 11 11 12 858 322 DID GET ORDER DETAIL RECORD 000323 26300 11 11 12 858 323 CONVERT ODEXPD FORMAT YYYYMMDD TO PEXPSH FORMAT MMDDYY 000317 26400 11 11 12 858 324 C odexpd ifne zero BO1 ph543 030504 26500 11 11 12 858 20070118 325 C z add odexpd expmd 40 01 ph543 030504 26600 11 11 12 858 20070118 118 11 11 12 858 334 C eval answer expmdy expyy 010522 27500 11 11 12 861 11814 11807 7 335
144. MOVEL PARMIN PARMRE 990918 19200 11 10 48 752 000150000001 000150000001 247 start free form 061201 19301 11 10 48 752 249 now in free form RPG 061201 19401 11 10 48 752 250 torder 1500 020623 19500 11 10 48 752 1500 251 iorder 78 543 020623 19600 11 10 48 752 78 543 252 value of iorder has now been computed 061201 19601 11 10 48 752 253 xorder torder 13 45 020623 19700 11 10 48 753 1618 19 1500 254 this is a continuation free form statement preceeded with 061201 19701 11 10 48 753 255 26 2 iorder 020623 19800 11 10 48 753 78 543 256 end of free form 061201 19801 11 10 48 753 258 resume fixed format calc statements 061201 19901 11 10 48 753 259 c eval rorder iorder 98 020623 20000 11 10 48 753 176 543 78 543 260 add 30 days to start date to get end date 020623 20100 11 10 48 753 261 c start date adddur 30 days end date 020623 20200 11 10 48 753 1998 12 18 1999 01 17 262 add 1 month to end date 020623 20300 11 10 48 753 263 c adddur 1 months end date 020623 20400 11 10 48 753 1999 02 17 264 extract day number from date 050516 20500 11 10 48 754 265 c extrct end date D dayno 20 dd 050516 20600 11 10 48 754 1999 02 17 17 266 extract month number from date 050517 20700 11 10 48 754 267 c extrct end date M Month no 20 mm 050517 20800 11 10 48 754 1999 02 17 2 268 extract year number from date 050517 20900 11 10 48 754 269 c extrct end date Y Year no 40 ccyy 050517 21000 11 10 48 754 1999 02 17
145. NTS WITH AND OR 010429 57100 11 11 11 163 631 C aaaaaaaaaa ifeq bbbbbbbbbb B01 010429 57200 11 11 11 164 11111 22222 000 632 C UPDREC andeq YY 01 010429 57300 11 11 11 164 1 7 637 C END E01 010429 57800 11 11 11 164 639 REDISPLAY FIRST SCREEN 000323 58000 11 11 11 164 640 C GOTO DISPO1 000514 58100 11 11 11 164 287 C DISPO1 TAG 000514 22800 11 11 11 164 288 CLEAR EXPECTED SHIP DATE AND ERROR CODE 000514 22900 11 11 11 164 289 C Z ADD ZERO PEXPSH 000514 23000 11 11 11 164 0 290 c MOVEL BLANKS PERROR 000514 23100 11 11 11 164 291 C Z ADD ZEROS KCUSNO 001002 23200 11 11 11 164 0 292 C Z ADD ZEROS KSTORE 001002 23300 11 11 11 164 0 293 C MOVEL BLANKS KCUSNA 000323 23400 11 11 11 164 294 C Z ADD ZERO EXPMDY 000323 23500 11 11 11 164 0 295 C TIME TIMEN 6 0 010501 23600 11 11 11 164 111111 296 C EXFMT NEWEXPD1 051007 23700 11 11 11 164 WRITE IN03 0 IN42 0 KORDER 0001500 KLINE 00002 UDATE 120906 TIMEN 111111 296 C EXFMT NEWEXPD1 051007 23700 11 11 12 858 READ INO3 0 IN42 0 KORDER 0001500 KLINE 00002 UDATE 120906 TIMEN 111111 297 TEST F3 000323 23800 11 11 12 858 298 C INO3 CABEQ ON DONE 000323 23900 11 11 12 858 0 300 c UDATE CABEQ 090100 DONE 010113 24100 11 11 12 858 120906 302 x 000323 24300 11 11 12 858 303 VALIDATE ORDER AND LINE 000323 24400 11 11 12 858 304 000323 24500 11 11 12 858 306 GET ORDER DETAIL RECORD FOR ORDER AND LINER 990918 24700 11 11 12 858 307 C Z ADD
146. OR KSTORE 01 010118 48300 11 11 12 876 1 1 543 C MOVEL CUNAME KCUSNA 01 000323 48400 11 11 12 876 ABC STORES INC ABC STORES INC 544 C MOVEL CUNAME PCUSNA 01 000323 48500 11 11 12 876 ABC STORES INC ABC STORES INC 545 C EXCEPT PRTCUS 01 000323 48600 11 11 12 876 548 C ENDIF EO1 991225 48900 11 11 12 876 550 DISPLAY DETAIL SCREEN 000323 49100 11 11 12 876 551 C DISP02 TAG 000514 49200 11 11 12 876 552 C TIME TIMEN 60 010501 49300 11 11 12 876 111112 553 C EXFMT NEWEXPD2 051007 49400 11 11 12 876 WRITE INO3 0 IN43 0 EXPMDY 011807 KCUSNO 0001000 KCUSNA ABC STORES INC UDATE 120906 KSTORE 0000001 TIMEN 111112 KORDER 0001500 KLINE 00002 553 C EXFMT NEWEXPD2 051007 49400 11 11 13 678 READ INO3 0 IN43 0 EXPMDY 011807 KCUSNO 0001000 KCUSNA ABC STORES INC UDATE 120906 KSTORE 0000001 TIMEN 111112 KORDER 0001500 KLINE 00002 554 TEST F3 000323 49500 11 11 13 681 555 C INO3 CABEO ON DONE 000323 49600 11 11 13 681 0 557 VALIDATE CHANGED DATE AND UPDATE ORDER DETAIL 000323 49800 11 11 13 681 559 CONVERT EXPMDY FORMAT MMDDYY TO ODEXPD FORMAT YYYYMMDDYY 000323 50000 11 11 13 681 561 C Z ADD EXPMDY YY 20 YY 000323 50200 11 11 13 681 11807 7 562 C EXPMDY DIV 100 MMDD 40 MMDD 000323 54700 11 11 13 681 11807 118 563 C YY MULT 10000 Y4MMDD 8 0 00YY0000 000323 50400 11 11 13 681 7 70000 564 C ADD MMDD Y4MMDD OOYYMMDD 000323 50500 11 11 13 681 118 70118 11 10 48 733 PAGE 565 C IFGT 40 B01 000323 50600 11 11 13 681 7 567 C ELSE X01 00032
147. OR ON THE AUDIT REPORT BY SCANNING FOR 2050 010118 45200 11 11 12 872 512 C UPDREC IFEQ 2 BOL 010118 45300 11 11 12 872 1 521 C ENDIF E01 010118 46200 11 11 12 872 523 010118 46400 11 11 12 872 524 C CUSKEY CHAIN CUSTREC1 30 000717 46500 11 11 12 872 N30 00010000000001 CUCUST 0001000 CUSTOR 0000001 CUNAME ABC STORES INC CUAD1 423 MONTGOMERY AVENUE CUAD2 CUSTA PA 525 C z add all 1 aa 30 050102 46600 11 11 12 872 111 526 C z add all 2 bb 30 050102 46700 11 11 12 872 222 527 C z add all 3 cc 30 050102 46800 11 11 12 872 333 528 C z add all 4 dd 30 050102 46900 11 11 12 872 444 529 C z add all 5 ee 30 050102 47000 11 11 12 872 555 530 C z add all 6 ff 30 050102 47100 11 11 12 872 666 138 RTPA for RPG User Manual 531 C z add all 7 gg 30 050102 47200 11 11 12 872 777 532 C z add all 8 hh 30 050102 47300 11 11 12 876 888 533 C z add all 9 ii 30 050102 47400 11 11 12 876 999 534 C z add zeros total 80 050102 47500 11 11 12 876 0 536 total aa bb cc dd ee ff gg hh ii 050102 47700 11 11 12 876 4995 111 222 333 444 555 666 777 888 999 538 c eval total aa bb cc dd ee ff gg hh 050102 47900 11 11 12 876 3996 111 222 333 444 555 666 777 888 539 C IN30 IFEQ OFF 01 991225 48000 11 11 12 876 0 540 GOT CUSTOMER MASTER 991225 48100 11 11 12 876 541 C Z ADD CUCUST KCUSNO 01 001007 48200 11 11 12 876 1000 1000 542 C Z ADD CUST
148. PG User Manual The COBOL ILE compiler has design constraints that limit a typical COBOL ILE source program to approximately 60 000 to 65 000 source statements Larger COBOL ILE RPG programs may cause a compiling error The actual number of COBOL source statements allowed fot a successful compile of an COBOL 400 or COBOL ILE source program depends on the design constraints of each phase of the COBOL compiler and the source statements used in the source program RTPA for COBOL provides the capability to expand COBOL 400 source programs Source type CBL and SQLCBL as COBOL ILE programs source type CBLLE and SQLCBLLE automatically by entering a Y in the Compile CBL as CBLLE option without changing the input program source type Compile CBL as CBLLE Y Y N ZSCOBO1R Real Time Program Audit for COBOL V4R3 Date 6 11 08 PHH Select Program to Audit Time 11 11 46 Type choices press F10 Input Source Member Name TESTCOBS Name generic ALL F4 List Kle Name ni n te ee eee coe QCBLLESRC Name Nane 5 n 6 ZSAUDIT Name Cloject vo ii an y o s s s s o ZSAUDITE Name Create AS a s 2 a 2 PGM MOD auditime Touto 5 o OSME Name SAME Max Audit Pages a s o LOQQQ 1 99999 pgm compilen rS ro nei Eibrary Names 5 56 5 6 6 5 Name Compile CBL as CBLLE Y Y N Audit Compile Listing Stmts to 1 99999 Only to to to EG F2
149. Pages s a s 6 a o 15000 199999 JOD woe jos ee les j jej B MUN IT C 4 Name Audit Compile Listing Stmts o to 1 99999 Only EO TO to to F1 Help F8 Conditional Auditing F9 Maintenance Menu F18 Job History F24 More Keys C 2000 2002 Harkins Audit Software Inc Figure 4 22 Selecting the RTPA Maintenance Menu from the RTPA main selection screen 68 RTPA for RPG User Manual ZSPGMOIR Real Time Program Audit for RPG V4R3 Date 2 05 07 PHH Select Program to Audit aues digg Type choices press F10 Input Source Memb RTPA Maintenance Menu File Name Library Name Enter option press enter Object to Library 1 User Profile Maintenance Create As 2 User Standard Audit Options Maintenance 3 RPGIII Operation Code Maintenance Audit File Outq 4 RPGIV Operation Code Maintenance Max Audit Pages 5 Standard Subroutines to be bypassed for Auditing 6 Create User RTPA Testing Library first in Libl 7 WRKSPLF Audit Compile Lis 8 Delete Spooled Files for Current User Sign On Only 9 WRKSBMJOB JOB Optionf Clear RTPA Expanded Objects in Lib ZSAUDITE Fl Help F F3 Exit for All Users with CALL ZSCLRFIL F18 Job History Figure 4 23 RTPA Maintenance Menu Options and features RTPA Maintenance Menu Options and Features 69 RTPA for RPG User Manual 1 User Profile Maintenance RTPA User Profile Maintenance
150. R 0000002 CUNAME ABC STORES STORE 2 CUAD1 554 ARCH STREET CUAD2 CUCITY PHILADELPHIA CUSTA PA CUZIP 19025 11 10 13 595 PAGE 3 123 c in84 doweq off BO1 020617 10200 11 10 13 626 0 124 c except prtrec 01 030207 10300 11 10 13 626 125 c cucust reade custrec 84 01 020617 10400 11 10 13 626 N84 0001000 CUCUST 0001000 CUSTOR 0000522 CUNAME ABC STORES STORE 522 CUAD1 231 70TH STREET CUAD2 CUCITY NEW YORK CUSTA NY CUZIP 10021 123 c in84 doweq off BO1 020617 10200 11 10 13 626 0 124 c except prtrec 01 030207 10300 11 10 13 626 125 c cucust reade custrec 84 01 020617 10400 11 10 13 626 84 0001000 126 c enddo EO1 020617 10500 11 10 13 626 127 c eval inlr on 030207 10600 11 10 13 626 1 128 exit program 060319 10700 11 10 13 627 129 c return 030207 10800 11 10 13 627 RTPA for RPG Audit Output NEWEXPSH Interactive RPGLE Fixed Format and Free Format RPG Note The RTPA Audit Output line is actually 198 positions not 80 positions so some of the audit output has been truncated Note RTPA audit output records the exact moment in time that each statement is executed and the contents of each field input by the online User and the User ID 296 C EXFMT NEWEXPD1 051007 23700 11 10 48 761 WRITE INO3 0 IN42 0 KORDER 0001500 KLINE 00001 UDATE 120906 TIMEN 111048 296 C EXFMT NEWEXPD1 051007 23700 11 10 54 917 READ INO3 0 IN42 0 KORDER 0001500 KLINE 00002 UDATE 120906 TIMEN 111048 Program NEWEXPSH New Expected Ship Date RPGIV Obj
151. RPG RPGMOD RPGLE SQLRPGLE and SQLRPGMOD RTPA for RPG will not work on extremely large programs that are very close to the maximum number of lines that the IBM RPG compiler will accept See Chapter 8 Auditing Very Large RPG Programs for more information The RPG ILE compiler does compile large programs but still has some compiler limits primarily due to the half word 32K limits on strings of elements in the compiler The same is true with the limit of 32K statements for the source program member and some editors such as SEU which could otherwise support 99 999 source statements without these design limitations 4GL languages and code generators such as RTPA for RPG typically generate very large source programs Does RTPA audit freeform RPG Yes RTPA audits freeform free format RPG as in the following example Source Code Fragment 0100 00 free 0101 00 torder 1500 0102 00 iorder 78 543 0103 00 xorder torder 13 45 0104 00 26 2 iorder 0105 00 end free Audit File Fragment 0201 torder 1500 1500 0202 iorder 78 543 78 543 0203 xorder torder 13 45 1618 19 1500 0204 26 2 iorder 78 543 102 RTPA for RPG User Manual Why did RTPA fail to expand the program correctly Please make sure that the program compiles properly prior to submitting the program to RTPA RTPA uses the AS 400 s native compiler if the program won t compile without RTPA it won t comp
152. RTPA command with keyed program name to be expanded The Enter key is pressed and the TESTFREE program is submitted for RTPA expansion The RTPA Job History Summary screen is immediately displayed bypassing the RTPA main selection screen and the status of the submitted job is shown 64 RTPA for RPG User Manual ZSPGMOIR Real Time Program Audit for RPG V4R3 Date 2 05 07 PHH Job History times 12222805 Type option press Enter 4 Delete 5 Display O Program Job Status Program Name Job Date Time TESTFREE 8 EXPN OK Test Free format RPG specs 058924 2 05 07 12821356 F3 Exit F5 Refresh Subfile F12 Cancel C 2000 2002 Harkins Audit Software Inc Figure 4 18 Display of the submitted program or programs for RTPA expansion for the User The RTPA current expansion status may be displayed by pressing the enter key or the command 5 key The RTPA Expand Status is 1 for the submit of the input RPG source program for a compile The RTPA Expand Status is 8 for the successful compile of the expanded source Ready for auditing 65 RTPA for RPG User Manual ZSPGMOIR Real Time Program Audit for RPG V4R3 Date 2 05 07 PHH Job History mor 2205 Type option press Enter 4 Delete 5 Display O Program Job Status Program Name Job Date Time TESTFREE 8 EXPN OK Test Free format RPG specs 059924 2 05 07 12521256 F3 Exit F5 Refresh Subfile F12 Cancel C 2000 2002 Harkins Audit Software
153. STMAST ZSAUDIT WEB2 CUWEB3 A 25 JL CUSTMAST ZSAUDI WEB3 CUWEB4 A 25 1 CUSTMAST ZSAUDIT WEB4 CUWEB5 A 50 L CUSTMAST ZSAUDIT WEBS Morem F3 Exit F12 Cancel F19 Left F20 Right F24 More keys Figure P 5 RTPA Query display of an Audited Program Field Cross Reference 6 RTPA for RPG User Manual 25 IN 345 EXFMT F3 Exit F12 Cancel F19 Left File ZZAUDITS Controli EG aka payaa Files NEW ES de Program NEWEXPSH Files Cross Reference Library ZSAUDIT ZSAUDIT ZSAUDIT ZSAUDIT Files NEWEXPSH File U A Device Record CUSTMAST I DISK CUSTREC1 NEWEXPDS 6 WORKSTN NEWEXPD1 NEWEXPDS 6 WORKSTN NEWEXPD2 ORDERDE U DISK ODETREC ORDERWK O DISK ODETWRK OPRINT PRINTER QPRINT2 O PRINTE Program NEWEXPSH Fileio Cross Reference Fileio NEWEXPSH Line Source Statement STEN NEWEXPD1 F20 Right Display Spooled File Page Line 83 28 Columns i 78 DR D ORE an Type File Name PHY Customer Master File DSP Screens for NEWEXPSH RPG DSP Screens for NEWEXPSH RPG PHY Order ju Quee PRT Defaul PRT Defaul Detail File for RPGIII Detail Output Work Fil Le socal cuntur joan dE Le SOG quum dale ror More F24 More keys Figure P 6 RTPA Query display of an Audited Program Files Cross Reference Fileio NEWEXPSH Line Source Statement File sss ZZAUDITS Control
154. TPA for RPG User Manual correctly created using this information to create BI graphical GUI reports from key existing management displays Reports The program printer file I O statements and printer file output variable and print positions as actually used in the executing program the first time a printer source statement is executed This illustrates the printer report s as created including the program variable names and the output print positions for both externally defined and internally defined Output specifications printer files Business Intelligence BI Metadata may be easily and correctly created using this information to create BI graphical GUI reports from key existing management reports Level The program start time program name program type and the program call stack level as actually executed in the executing logical job are displayed in the sequence the programs are initiated Additionally the ZZAUDITS summary audit output and the ZZAUDITP audit output of program execution may be searched by ANY full or partial data value or source statement executed Program Finds the first audit heading audit line for each program and the moment of time the program starts execution File Finds the next program file I O statement that is executed in the program including the File name and the key field values and the record field values Call Finds the next program call statement to begin execution of the called program
155. TPA from CD If you are installing RTPA from an optical disk CD please follow these instructions If you are installing RTPA from a downloaded file please skip to the next section Step 1B Installing RTPA from a Downloaded File Sign on as QSECOFR Put the RTPA for RPG LODRUN CD in the iSeries AS 400 CD reader Enter the following command at the command line to start the installation process LODRUN OPT 21 RTPA for RPG User Manual The following screen will be displayed IRMD01 Real Time Program Audit for RPG V4R3 Install Program Select one of the following choices press Enter 1 Install Product Overwrite 2 Update Product 3 Uninstall Product Option O0 F3 Exit C 2000 2002 Harkins Audit Software Inc Figure 1 1 RTPA LODRUN Screen Choose option 1 to install RTPA At the next screen press Enter while RTPA copies itself onto your computer When the procedure is complete you will see the following screen IRMD02 Real Time Program Audit for RPG V4R3 INSTALL RTPA Press Enter to continue Bac TIR DI cot V ANZ ORTU DIS ME Restore new versgion of product qe E es y Put command RTPA and printer file in QGPL F3 Exit C 2000 2002 Harkins Audit Software Inc Figure 1 2 RTPA LODRUN Installation Successful Step 1B Installing RTPA from a Downloaded File If you are installing RTPA from a downloaded file please follow t
156. UCUST READE CUSTREC1 84 01 010113 62900 11 11 32 477 84 0002050 689 C ENDDO OF E01 010113 63000 11 11 32 477 691 C CALL Z PGMO1C GET USER 000402 63200 11 11 32 477 11 11 32 477 692 C PARM USERNA 50 000402 63300 11 11 32 477 RTPA paul harkins 693 C MOVEL USERNA KPGMRN 50 PROGRAMM 000402 63400 11 11 32 478 RTPA paul harkins RTPA paul harkins 695 EXIT PROGRAM 000402 63600 11 11 32 478 696 C Z ADD EXPMDY PEXPSH EXP SHIP 000323 63700 11 11 32 478 0 0 697 C MOVEL PARMRE PARMIN NOW 4 FIEO00302 63800 11 11 32 478 000150000001000000XYZ STORE ARDMORE 000150000001000000XYZ STORE ARDMORE 700 C Z ADD 1 i 30 010703 64100 11 11 32 478 701 C Z ADD 3 30 010703 64200 11 11 32 478 702 C Z ADD 7 AE 30 010703 64300 11 11 32 478 703 C Z ADD 13 iind 30 010703 64400 11 11 32 478 704 C Z ADD 05 iunt 30 010703 64500 11 11 32 479 705 C Z ADD 123 D 05 010703 64600 11 11 32 479 706 C Z ADD 6 an 010703 64700 11 11 32 479 707 C Z ADD 18 010703 64800 11 11 32 479 18 151 RTPA for RPG User Manual PAGE 709 C eval final answer counter 010703 65000 11 11 32 479 10 00 7 3 711 C eval d i answer counter 010703 65200 11 11 32 479 10 7 3 713 C eval final answer counter 6 010703 65400 11 11 32 479 16 00 7 3 714 C eval d kkkkkkkkk D I D 5 COUNTER 010703 65500 11 11 32 479 36 10 23 3 715 C eval d 2 D I counter D J 010703 65600 11 11 32 479 31 10 3 18 716 C eval d 2 SSD I D 4
157. UDIT RPGIV IF STATEMENT 001029 34100 11 10 54 943 401 C IF COUNTER 0 B01 001029 34200 11 10 54 943 0 402 C Z ADD 3 COUNTER 01 001029 34300 11 10 54 943 3 403 C ENDIF EO1 001029 34400 11 10 54 943 404 001029 34500 11 10 54 943 405 C if counter gt 0 B01 010522 34600 11 10 54 943 3 406 C endif E01 010522 34700 11 10 54 943 407 kuu 010522 34800 11 10 54 943 408 C if counter lt gt 0 B01 010522 34900 11 10 54 943 3 409 C endif E01 010522 35000 11 10 54 944 127 RTPA for RPG User Manual PAGE 410 010522 35100 11 10 54 944 411 AUDIT RPGIV EXTENDED FACTOR 2 CONDITIONAL AND OR COMPLEX STATEMENTS 010602 35200 11 10 54 944 412 C Z ADD 2 COUNTER 010602 35300 11 10 54 944 2 413 C Z ADD 7 answer 010602 35400 11 10 54 944 7 414 C Z ADD zero final 72 010607 35500 11 10 54 944 00 415 C Z sub zero sum 61 010704 35600 11 10 54 944 0 416 C Z ADD 3115 total 80 010604 35700 11 10 54 944 3115 417 C Z ADD 112 net 30 010607 35800 11 10 54 944 112 418 C IF COUNTER 0 B01 010602 35900 11 10 54 944 2 419 C OR COUNTER 2 B01 010602 36000 11 10 54 944 2 420 C OR COUNTER 4 B01 010602 36100 11 10 54 944 2 421 C AND ANSWER 7 B01 010602 36200 11 10 54 944 7 446 C CCCC DIFFERENCE 160 EXTRA 010617 38700 11 10 54 944 00 00 0 447 C 188
158. VAR ALLS VAR ALLS VAR ALLS 201 256 586 C MOVE 587 C MOVE 588 C MOVE 589 C MOVE 590 C MOVE 591 C MOVE 593 C EXPMDY IFEQ 11807 594 C MOVSW ANDEQ 2 595 C MOVSW OREQ 2 596 C MOVSW1 OREQ 3 597 C MOVSW3 ORNE 5 598 C MOVSW OREQ 2 599 C MOVSW OREQ 2 600 C MOVSW OREQ 2 601 C MOVSW OREQ 2 602 C MOVSW OREQ 2 603 C MOVSW3 ANDNE 5 605 C END 607 UPDATE ORDER DETAIL EXPECTED SHIP DATE 608 C ADD 609 C UPDATE ODORD 0001500 ODLINE 00002 ODCUST 0001000 ODSTOR 0000001 ODITEM Y2430 ODEXPD 20070118 ODSHPD 00000000 ODINV 0000000 ODSTAT O ODX ODETREC 01 01 01 01 01 01 01 01 01 01 01 EO1 0 010429 010429 010429 010429 010429 010429 010420 000514 010429 010429 010429 010429 010429 010429 010429 010429 010429 000323 000323 010118 000323 52700 52800 52900 53000 53100 53200 53400 53500 53600 53700 53800 53900 54000 54100 54200 54300 54400 54600 54800 54900 55000 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 ODPRIC 0002515 ODQTY 0000003 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 153
159. WHEN OTHER STATEMENTS 010912 31700 11 11 12 863 377 C movel P mode 010912 31800 11 11 12 863 P 378 C z add 1 PHSCNO 010912 31900 11 11 12 863 1 379 C SELECT B01 010912 32000 11 11 12 864 380 C WHEN mode P X01 010912 32100 11 11 12 864 P 381 C OR PHSCNO 1 X01 010912 32200 11 11 12 864 1 380 C WHEN mode P x01 010912 32100 11 11 12 864 P 337 C OR PHSCNO 1 X01 010912 32200 11 11 12 864 1 382 C Z ADD ZERO COUNTER 01 010912 32300 11 11 12 864 0 385 C ENDSL EO1 010912 32600 11 11 12 864 386 010912 32700 11 11 12 864 387 C if counter lt gt 0 B01 010912 32800 11 11 12 864 0 389 C endif EO1 010912 33000 11 11 12 864 390 C movel R mode 010912 33100 11 11 12 864 R 391 C movel 3 RTYP 010912 33200 11 11 12 864 3 392 C SELECT BO1 010912 33300 11 11 12 864 393 C WHEN mode R X01 010912 33400 11 11 12 864 R 394 C AND RTYP 3 X01 010912 33500 11 11 12 864 3 393 C WHEN mode R X01 010912 33400 11 11 12 864 R 350 C AND RTYP 3 X01 010912 33500 11 11 12 864 3 395 C Z ADD ZERO COUNTER 01 010912 33600 11 11 12 864 0 398 C ENDSL EO1 010912 33900 11 11 12 864 399 001029 34000 11 11 12 864 400 AUDIT RPGIV IF STATEMENT 001029 34100 11 11 12 864 401 C IF COUNTER 0 B01 001029 34200 11 11 12 864 0 402 C Z ADD 3 COUNTER 01 001029 34300 11 11 12 86
160. Watch Variables F3 Exit F4 Prompt F5 Refresh F7 Compile Options F8 Conditional Auditing F9 Maintenance Menu F10 Submit Expand F24 More Keys C 2000 2002 Harkins Audit Software Inc Figure 8 1 Compiling a COBOL 400 source program as a COBOL ILE Source program SEU Limits The Source Entry Utility SEU editor currently has a design limit of approximately 32 764 soutce statements for an RPG source program This means that RTPA expanded source programs may not be edited with SEU if the expanded source program exceeds 32 764 source statements Other editors or disk file utility programs may be used to edit source members which are larger than the 32 764 statements limit 99 RTPA for RPG User Manual How RTPA Inserts Audit Statements RTPA examines every executable calculation statement in the input source program to determine if the statement and its variables should be audited based on the auditing options that the programmer selected RTPA defaults to insert audit statements in the expanded source program to provide audit output of both the RPG calculation statements and the data contents of all variables used in the calculation statements In addition RTPA defaults to display one line of 132 characters of the fields in records processed and the contents of parameters and data areas used during execution of the expanded object program which is created from the expanded source program Very large source programs that
161. XFMT NEWEXPD2 051007 49400 11 11 14 INO3 0 IN43 0 EXPMDY 011807 KCUSNO 0002050 KCUSNA XYZ STORE ARDMORE UDATE 120906 KSTORE 0000001 KORDER 0001500 KLINE 00002 554 TEST F3 000323 49500 11 11 14 555 C INO3 CABEQ ON DONE 000323 49600 11 11 14 0 557 VALIDATE CHANGED DATE AND UPDATE ORDER DETAIL 000323 49800 11 11 14 559 CONVERT EXPMDY FORMAT MMDDYY TO ODEXPD FORMAT YYYYMMDDYY 000323 50000 11 11 14 561 C Z ADD EXPMDY 20 000323 50200 11 11 14 11807 7 562 C EXPMDY DIV 100 MMDD 40 MMDD 000323 54700 11 11 14 11807 118 563 C YY MULT 10000 Y4MMDD 8 0 00YY0000 000323 50400 11 11 14 7 70000 564 C ADD MMDD Y4MMDD OOYYMMDD 000323 50500 11 11 14 118 70118 565 C YY IFGT 40 B01 000323 50600 11 11 14 7 567 C ELSE X01 000323 50800 11 11 14 568 C ADD 20000000 Y4MMDD 01 000323 50900 11 11 14 20070118 569 C END E01 000323 51000 11 11 14 570 C Z ADD Y4MMDD ODEXPD 000323 51100 11 11 14 20070118 20070118 571 COMPLEX IF STATEMENT 010614 51200 11 11 14 572 C IF COUNTER 0 and B01 010614 51300 11 11 14 3 573 C COUNTER gt 5 AND B01 010614 51400 11 11 14 3 574 C COUNTER lt 3 OR ANSWER 6 AND B01 010614 51500 11 11 14 3 7 575 C COUNTER lt 2 01 010614 51600 11 11 14 3 576 C OR COUNTER 2 B01 010614 51700 11 11 14 3 577 C AND ANSWER 7 OR B01 010614 51800 11 11 14 7 578 C ANSWER 5 B01 010614 51900 11 11 14 7 580 C ENDIF E01 010614 52100 11 11 14 582 TEST FOR FIELD OVER 100 010411 52300 11 11 14 583 C MOV
162. XPECTED SHIP DATE 000323 54800 11 11 14 496 608 C ADD 1 UPDREC 6 0 CNT ORD D010118 54900 11 11 14 496 3 609 C UPDATE ODETREC UND 000323 55000 11 11 14 496 ODORD 0001500 ODLINE 00002 ODCUST 0001000 ODSTOR 0000001 ODITEM Y2430 ODPRIC 0002515 ODQTY 0000003 ODREQD 20000317 ODEXPD 20070118 ODSHPD 00000000 ODINV 0000000 ODSTAT O ODX 611 WRITE UPDATED ORDER DETAIL TO A WORK FILE 000402 55200 11 11 14 496 612 C CLEAR ODETWRK 000402 55300 11 11 14 496 613 C Z ADD ODORD WDORD 000402 55400 11 11 14 496 1500 1500 614 C Z ADD ODLINE WDLINE 000402 55500 11 11 14 496 2 2 615 C Z ADD ODCUST WDCUST 000402 55600 11 11 14 496 1000 1000 616 C Z ADD ODSTOR WDSTOR 000402 55700 11 11 14 496 1 1 617 C MOVEL ODITEM WDITEM 000402 55800 11 11 14 496 Y2430 Y2430 618 C Z ADD ODPRIC WDPRIC 000402 55900 11 11 14 496 25 15 25 15 619 C Z ADD WDOTY 000402 56000 11 11 14 496 3 3 620 C Z ADD ODREQD WDREQD 000402 56100 11 11 14 496 20000317 20000317 621 C Z ADD ODEXPD WDEXPD 000402 56200 11 11 14 496 20070118 20070118 622 C Z ADD ODSHPD WDSHPD 000402 56300 11 11 14 496 0 0 623 C Z ADD ODINV WDINV 000402 56400 11 11 14 496 0 149 RTPA for RPG User Manual 624 C MOVEL 625 C MOVEL 627 WRITE ORDERWK 628 C WRITE WDORDf 0001500 WDLINE 00002 WDCUST 0001000 WDSTOR 0000001 WDITEM Y2430 ODSTAT WDSTAT 000402 56500 ODX WDX 000402 56600 000402 56800 ODETWRK 000402 56900 WDPRIC 0002515 20000317 WDEXPD 20070118 WDSHPD 00000000 WDINV
163. a y Finder EE Fileio NEW KE ey Ache ice nn 3 mx 4 5 Program NEWEXPSH Fileio Cross Reference Display Spooled File Page Line 83 38 Columns 1 78 KONE TT 258 C IN TSTDTA 315 C EXFMT NEWEXPD1 IN03 0 IN42 0 KORDER 0001500 KLINE 00001 UDATE 091407 TIMEN 200832 332 C ordkey chain orderde 000150000001 525 C EXCEPT PRTDET 556 C CUSKEY CHAIN CUSTREC1 30 N30 00010000000522 577 C EXCEPT PRTCUS 641 C UPDATE ODETREC More F3 Exit F12 Cancel F19 Left F20 Right F24 More keys Figure P 7 RTPA Query display of an Audited Program Fileio Cross Reference 7 RTPA for RPG User Manual Display Spooled File File PINNER ZZAUDITP Page Line Control Columns iL 7B Find 3 3 22 2 Sql w n p nn SENSE 105 retrieve the customer master records with SQL 106 C EXEC SQL Sql 107 C select CUNAME Sq1 108 C into CUNAME Sql 109 C from custmast Sql 110 C where CUCUST CUCUST and Sql 111 C CUSTOR CUSTOR Sql 112 C END EXEC Sql 113 C EVAL SOL 00005 CUCUST Sql 2050 2050 114 C EVAL SOL 00006 CUSTOR Sql 1 1 115 C Z ADD 4 SOLER6 Sql 134613260 116 C CALL SQLROUTE Sql 117 C PARM SQLCA sql More F3 Exit F12 Cancel F19 Left F20 Right F24 More keys String found in position 75 Figure P 8 RTPA Query display of SQL source statements and the generated SQL code 8 RTPA for RPG User Manual Display Spooled File
164. al Program NEWEXPSH Type options press Ent Y Include in audit Opt Data field BBBBBBBBBBBBBB GE CECE 6 ecco CKASTA CKRTFL COAPP COUNTER CUAD1 CUAD2 CUCUST CUNAME CUSNM KKK KKK p py tg gt tg DP gt gt trJ rJ tU T Exit F12 Cancel GLa Len ZSPGMOIR Real Time Program Audit for RPG V4R3 Date 2 02 07 Select Variables to Audit Times 20332811 Position to Dec Elem Chg Description 02 00 02 00 1 01 2 00 16 ADDRESS 1 ADDRESS 2 00 2 CUSTOMER NUMBER CUSTOMER NAME Enter Accept choices and continue C 2000 2002 Harkins Audit Software Inc Figure 5 3 Selection of variables to be audited with command key 16 in advanced auditing Only the program variables with a Y to the left of the variable name will be audited with their contents After all advanced or focused auditing selections are made the F10 command key should be pressed to submit the program for expansion as the F10 command key is used in expanding the entire program for auditing RTPA for RPG User Manual 82 Member NEWEXPSH ZSPGMOIR Real Time Program Audit for RPG V4R3 Date 2 02 07 PHH Select Program to Audit Time 20 43 17 Type choices press F10 Input Source Member Name NEWEXPSH Name generic ALL F4 List File Name ORPGLESRC Name Library Name ZSAUDIT Name Object to Library ZSAUDITE Name
165. allows the RTPA User to customize his or her RTPA dynamically created compile override defaults which are stored in file Z FIO1 and is illustrated in this chapter 2 User Standard Audit Options Maintenance RTPA User Profile Maintenance allows the RTPA User to customize his or her RTPA dynamically created compile override defaults which are stored in file 2 and is illustrated in chapter 7 3 RPGIII Operation Code Maintenance not changed by the User Company RTPA RPGIII Operation code maintenance allows the addition of more RPGIII RPG Operation codes for auditing by RTPA This option is not normally used by the User Company 4 RPGIV Operation Code Maintenance not changed by the User Company RTPA RPGIV Operation code maintenance allows the addition of more new RPGIV RPG Operation codes for auditing by RTPA This option is not normally used by the User Company 5 Standard Utility Subroutines to be bypassed for Auditing Standard or Utility subroutines BEGSR that a Company uses in many programs for standard functions such as retrieving a company name may be entered in this option These subroutines are bypassed for RTPA auditing when the source program using them is expanded by RTPA saving audit output for proven routines ZSPGM19R 2 05 07 Utility Subroutines to be Bypassed in RTPA Auditing V4R3 Bypass standard or utility subroutines in the source program That are defined in the source program rather than copied wit
166. are generated F3 Exit F5 Apply F12 Cancel C 2000 2002 Harkins Audit Software Inc Figure 7 2 RTPA User Audit Options defaults maintenance for all expansions 4 RTPA Job Audit Options for only this RTPA expansion and are accomplished by pressing Command key 6 on the RTPA main screen 88 RTPA for RPG User Manual 5 Real Time Program Audit for RPG V4R3 Date 3 18 07 PHH Job Audit Options Maintenance for this Expand umes 178028229 Type choices press F5 to apply Types of Statements to Audit Option Externals Y Y Include File 1 0 Y Y Include Branches x Y Include Conditionals X Y Include Arithmetic operations Y MELUS Move operations X Y Include Audit calc comment statements Y Y MENEE Audit copybook subroutines Y Include Show all variable values Y Y Yes Lines of record data 1 0 1 2 A All Fields Audit Zoned Decimal variables Y Y Yes DS may not be initialized Audit File Key Fields Y pe May be not initialized Only selected variables stmts MINNES F11 focused audits only Match Change ID Source Srerenen r cols 1 5 Compare Date YY MM DD or YYMMDD Comparator Gr lia 15 Insert ZSC Comment Stmts Only MIME Inserts only Documentation stmts into the Output Source in Library ZSAUDITE Io make Source Program more readable No RTPA Z Audit Stmts are generated F3 Exit F5 Apply F12 Cancel C 2000 2002 Harkins Audit Software Inc
167. at RPG specs mixed with Fixed form SOLRPGLE Select Custmast COBOL 400 Test IF THEN ELSE AND OR COBOL ILE called from TESTCOB5 clp for batch RPGIV TEST5 5 parms clle for batch RPGIV TEST8 8 parms lower case TEST SOURCE PROGRAM 3 RPGIV batch program WITH S SELEC WHXX AND OR WHXX AND OR OTHER ENDSL audit SOLRPGLE Select Custmast COBOL 400 Test IF THEN ELSE AND OR COBOL 400 called from TESTCOB5 Figure P 11 RTPA Query display of ZZAUDITS Audit Summary Program Call Stack Level 9 Levels RTPA for RPG User Manual 11 ZSPGM64R Real Time Program Audit Query V4R3 10 18 07 PHH User RTPA Query Summary Options Maintenance 12 14 22 Type choices press F5 to apply as User standard RTPA Query Summary options RTPA Query Summary Options Option Fields Program Summary Y Y Include Files Program Summary Y Y Include Fileio Summary Y Y Include Displays Summary Y Y Include Reports Summary Y Y Include Level Program call level Y Y Include F3 Exit F5 Apply standard F12 Cancel C 2000 2002 Harkins Audit Software Inc Figure P 12 RTPA Query Summary Options Z COBO1R Real Time Program Audit for COBOL V4R3 Date 1 28 08 PHH Detailed Job Record Time 15 17 53 Program GETEXPSH Get Expected Ship Date Order Detail COBOL 400 Status 8 EXPAND CBL COMPILED OK Type options press Enter 5 Display Compile listing P PDF Compile listing Opt Job Job Records Submitted Completed Elapsed Input 634477 1 0
168. audit selected any options and determined the library in which to place the audit enabled program object RTPA is ready to expand the copied input source program with Z audit statements RTPA for RPG User Manual 58 The expanded source program is always a member in a source file in the RTPA library Z AUDITE which is the library used by RTPA for all expanded source members and as the default library for expanded object programs create an audit enabled program object press F10 for full RTPA auditing based on the RTPA default or keyed audit options See Chapter 7 Using Auditing Options for RTPA options control the auditing of expanded programs View Job Status You can see the status of the job submission on the Job History screen by pressing command 18 on the RTPA main screen Press F18 to display the Job History screen as shown in Figure 4 7 where you can see the status of job submission ZSPGMOIR Real Time Program Audit for RPG V4R3 Date 1 30 07 PHH Job History Time 16 34 46 Type option press Enter 4 Delete 5 Display O Program Job Status Program Name Jobi Date Time 5 NEWEXPSH 8 EXPN OK New Expected Ship Date from Or 056097 1 30 07 16 34 34 F3 Exit F5 Refresh Subfile F12 Cancel C 2000 2002 Harkins Audit Software Inc Figure 4 13 Programmer Audit Compiles by submitted Job Screen for Today 59 RTPA for RPG User Manual RTPA Expansion Status C
169. bbb cccccccccc 80 010330 42700 11 11 12 871 11111 22222 000 33333 487 001029 42800 11 11 12 871 488 AUDIT RPGIV TIME STATEMENT 001029 42900 11 11 12 871 489 C TIME TIMENOW 60 001029 43000 11 11 12 871 111112 490 001029 43100 11 11 12 871 491 C movel E movsw 1 010530 443200 11 11 12 871 2 492 AUDIT RPGIV IF STATEMENT 010113 43300 11 11 12 871 493 C if movsw blanks BOL 010113 43400 11 11 12 871 2 494 C OR COUNTER 0 BOL 010113 43500 11 11 12 871 3 496 C endif EO1 010113 43700 11 11 12 871 497 010113 43800 11 11 12 871 499 C 100 DIV 5 25 NET 30 01 000323 48400 11 11 12 872 19 500 C MVR FRACT 44 01 000323 48500 11 11 12 872 2500 502 GOT ORDER DETAIL PRINT IT 000514 44300 11 11 12 872 503 C EXCEPT PRTDET 000514 44400 11 11 12 872 505 GET THE CUSTOMER MASTER STORE RECORD 991225 44600 11 11 12 872 11 10 48 733 PAGE 506 C Z ADD ODCUST CUCUST 991225 44700 11 11 12 872 1000 1000 507 C Z ADD ODSTOR CUSTOR 991225 44800 11 11 12 872 1 1 508 010118 44900 11 11 12 872 509 THIS ROUTINE CAUSES THE WRONG CUSTOMER TO BE DISPLAYED 010118 45000 11 11 12 872 510 IF THE ORDER DETAIL FILE HAS BEEN UPDATED TWICE AND ONLY TWICE 010118 45100 11 11 12 872 511 FIND THE ERR
170. bilities to customize the audit output to achieve desired auditing analysis results as is illustrated but the double audit of the EXFMT Execute Format operation code Thus the programmer or auditor can see the display file record vatiable contents command keys and exact time the screen was displayed Write and then the display file record variable contents command keys and exact time when the screen was tead READ Program NEWEXPSH audit output in searchable PDF The user can search an RTPA audit output PDF for all the EXFMT operations actually executed as in the following figure The user may search the RTPA audit output on any string of characters including data values FI Adobe Reader 23424AUDITP pdf Br Edit View Document Tools Window Help A Save a Copy e BY search Search reh esee me i olem 0 om wom Lal 8 gt Search PDF Abe 3 Finished searching for 17 29 32 467 PAGE eufmt 287 C MOVEL BLANKS KCUSNA 000000 724400 17 38 32 480 Total instances Found 288 C Z ADD ZERO EXPNDY 000000 23500 17 38 32 469 14 0 289 C TIME 11858 60 START TIME 000000 23600 17 38 32 469 200 c NEREXFO1 000000 23700 17 38 32 469 WRITE oso IN42 0 KoRDER 0 807 UDATE 101005 TIMEN 173832 Ld 290 000000 23700 17 38 35 568 READ INO3 0 1N42 0 KORDER 0001500 KLINE 00002 UDATE 1019056 TIMEN 173832 202 C 1NO3 CABEQ ON DONE 000000 23900 17 38 35 568
171. c ALL F4 List File Name QRPGLESRC Name Library Name APPSRC30 Name Object to Library ZSAUDITE Name Create As PGM PGM MOD Audit File Outq SAME Name SAME Mersa AEE IACISS o s 15000 1 99999 JOBD for pgm compile libl PHNOA LIBL JOBD Library Name OGPL Name Audit Compile Listing Stmts to 1 99999 Only EG BO EO to F1 Help F3 Exit F4 Prompt F5 Refresh F6 Auditing Options F7 Compile Options F10 Submit Fll Advanced Auditing F24 More Keys C 2000 2002 Harkins Audit Software Inc Figure 2 16 Expand Program A00400 from library APPSRC30 with JOBD PHN04 in library QGPL RTPA for RPG User Manual 43 Chapter 3 RTPA Overview Auditing Concepts This chapter covers the concepts commands and basic conventions to start auditing sofhvare with RTPA RTPA is intuitive and easy to use This chapter explains general concepts that you should understand to maximize the value you get from using RTPA For step by step instructions on using the RTPA features turn to Chapter 4 Using RTPA Auditable Information RTPA can capture just about everything that your program does when it executes RTPA also allows you to refine your audit to include only the information that you want Auditable information includes Source statements Comments Variable contents Compile listing statement sequence number Change ID of the source statement positions one through five of the source statement Statement change date
172. c movel message 1 textl 020623 59600 Invalid Account Number 0 VAR MESSAGE 1 1 50 Invalid Account Number OSee Main 0 656 c eval text2 message 2 020623 59700 See Main Store Account Number 0 See Main Store Account Number 0 657 c eval text5 message 10 20623 59800 Sales HOLD Not authorized to access 1 Sales HOLD Not authorized to access 1 659 CALL A BOUND MODULE PH 010127 60000 660 Fk kek dek de He de Heke Heke Hek ke CALLB PROCXYZ PH 040624 60100 663 C MOVE ALL A MSGDA 040624 60400 664 C MOVE ALL B MSGDB 040624 60500 BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB 666 C Z ADD 514 22 GROSSAAAAAAAAA 7 2 010807 60700 11 11 14 496 11 10 48 733 11 11 14 496 11 11 14 496 11 11 14 496 WDOTY 0000003 WDREQD PAGE 11 11 14 496 11 11 14 496 11 11 14 496 11 11 14 496 11 11 14 496 11 11 14 496 11 11 14 496 11 11 14 496 11 11 14 496 11 11 14 496 11 11 14 496 11 11 14 496 11 11 14 496 11 11 14 497 11 11 14 498 11 11 14 498 WRITE 11 11 32 474 READ 11 11 32 474 11 11 32 474 11 11 32 474 11 11 32 475 11 11 32 475 11 11 32 475 11 11 32 475 11 11 32 475 11 11 32 475 11 11 32 475 11 11 32 475 Store Account Number 11 11 32 475 11 11 32 476 11 11 32 476 11 11 32 476 11 11 32 476 11 11 32 476 11 11 32 476 RTPA for RPG User Manual 150 514 22 667 C Z ADD 40 HOURSBBBBBBBBB 6 3 010807 60800 11 11 32 476 40 000 668 C Z A
173. can always remember where they are By adding and removing that library from your library list you can change from executing the expanded object to executing the normal object Or you can use the RTPA provided Z AUDITE library RTPA Expanded library ZSPGMO1R Real Time Program Audit for RPG V4R3 Date 6 04 07 PHH Select Program to Audit Time 16 43 20 Type choices press F10 Input Source Member Name NEWEXPSH Name generic ALL F4 List Peli SN AMC ORPGLESRC Name lulleweey lenses o s 5 o ZSAUDIT Name Olojexce io lily o s s o Name Greater EE qe E VI PGM MOD Ape FLIS QuitG o s s s s s Name SAME Mebx WINE PAGES o s s s s s 15000 J VON 15 6 AIDS ae iD ispa C 0 Name Audit Compile Listing Stmts to 1 99999 Only to EG EG to F1 Help F3 Exit F4 Prompt F5 Refresh F6 Auditing Options F7 Compile Options F10 Submit Fll Advanced Auditing F24 More Keys C 2000 2002 Harkins Audit Software Inc Figure 2 1 Select Program to Audit Screen with NEWEXPSH Selected Next expand and compile the program by pressing F10 This is the normal expansion which audits virtually every executable source statement and all the data being processed The message Member NEWEXPSH submitted Press F18 to see status is displayed at the bottom of the screen
174. cel F17 Position to F23 More options COE RIC HPS MICORE OSE Figure 1 8 Find the System i Processor Group and Serial number with WRKLICINF RTPA for RPG User Manual 28 Chapter 2 Quick Start Guide This chapter gives you a simple demonstration of RTPA with a sample program to help you get started with RTPA for the first time In this chaptet we will 9 Expand an RPGIV program GETEXPSH 9 Compile and execute the expanded program e Review the audit file to learn how the program works Expand the Sample Program Launch RTPA by typing at the command line RTPA 2 5 Select NEWEXPSH for expansion This is an RPGLE source member in source file QRPGLESRC in library Z AUDIT 2 55 Select an approptiate library in which to put the audit enabled object program such as Z AUDITE The expanded RTPA enabled object program can be placed in any library but should not overlay the production object 7 5 Select an output queue for the RTPA audit output file ZZAUDITP 2 5 Select the Job Description and the Job Description Library that contains the libraries needed for the source program files used The default JOBD and JOBD library for the User Profile is displayed from the signed on User Profile 2 55 The RTPA sample programs use the JOBD RTPA and JOBD Library QGPL 29 RTPA for RPG User Manual Tip Create a library exclusively for your audit enabled program objects so you
175. cessing Copyright 2000 2003 Harkins Audit Software Inc All Rights Reserved Terms of Use Privacy Policy Done 3 internet 100 RTPA Online Demonstrations and Training Online and interactive RTPA demonstrations and training are available worldwide at the user location via Microsoft Net Meeting The user requirements are a Windows PC and a high speed Internet connection RTPA Software Guarantee RTPA Softwate is available AS IS without warrantee expressed or implied Harkins Audit Software Inc Website Harkins Audit Software Inc develops maintains and supports the RTPA family of programmer productivity software products Web site www harkinsaudit com contains information about these products downloadable program code videos manuals and other information about these products 19 RTPA for RPG User Manual investors news contact Harkins Audit Software praducts services support company The Power of Knowing Paul Harkins Spotlight RTPA Case Studies Real Time Program Audit ga Programming Logic Successes with RTPA Puzzle Whether they are tasked with removes the complexity enhancing existing Software Try the 12 Steel Ball Lagic finding bugs r writing new and Test from Paul Harkins new Brog raras any book How ta Became programmers are finding that Highly Paid Carparate Real Time Pragram Audit Programmer fram Harkins Audit Software problems involved enhances
176. d Only selected variables stmts MINER F11 focused audits only Match Change ID Courcei tate nen eo Compare Date YY MM DD or YYMMDD Comparator 15 15 Insert Z C Comment Stmts Only Y Inserts only Documentation stmts into the Output Source in Library ZSAUDITE Figure 7 7 Selection of RTPA documentation only Z C statements into the copied source The copied source program in library Z AUDITE contains the input source program statements and Z C comment statements which document the source program including e File descriptions and the file keys e Called program descriptions RTPA for RPG User Manual 96 Columns XL Edit ZSAUDITE QRPGLESRC SEU gt NEWEXPSH EMTEA p Nil CL 2 Asa 3 ra 4 osa 5 1 BB Wm 0060 00 0061 00 Z C 0062 00 Z C Screens for NEWEXPSH DSP 0063 00 FNEWEXPDS CF E WORKSTN 0064 00 Z C 0065 00 Z C Order Detail File for RPGIII PHY 0066 00 Z C 2 Keys ODORD ODLINE 0067 00 FORDERDE UE E leg IDI Sis 0068 00 Z C 0069 00 Z C Customer Master File PHY 0070 00 Z C 2 Keys CUCUST CUSTOR 0071 00 FCUSTMAST E KEDTSK 0072 00 E RENAME CUSTREC CUSTREC1 0073 00 OUTPUT WORK FILE FOR ORDER DETAIL FILE 0074 00 Z C 0075 00 Z C Order Detail Output Work File PHY 0076 00 FORDERWK O E lt D SIEG F3 Exit F4 Prompt F
177. d This allows viewing the source statements and data executed in a logical job for all programs expanded for auditing including CL RPG and COBOL programs for all levels of program execution that job executes Called programs expanded for auditing are shown no matter how many levels down in the call stack of the Job The ZZAUDITS audit summary file and the ZZAUDITP program audit spool files may be viewed in green screen with the WRKSPLF command or the RTPAQ RTPA Query command screen with Option 5 The ZZAUDTIS audit summary file and the ZZAUDITP program audit files may be viewed in PDF format Intranet only with limited number of pages unless Adobe Acrobat Professional is used with the RTPAQ RTPA Query command with Option P RTPA Query ZZAUDITS audit summary output may also contain five cross References including Fields A cross reference of all fields field attributes file and library used in the audited program Files A cross reference of all Files file usage record names library used in the program Fileio The program file I O as actually used in the program the first time a source statement is executed Displays The program WORKSTN screen file I O statements and external definitions as actually used in the executing program the first time a display source statement is executed This illustrates the screens as created including the program variable names Business Intelligence BI Metadata may be easily and R
178. d the Z audit statements into the copy of your input source statement program In that case please copy the expanded source compile listing from your spool file into a Microsoft Notepad Microsoft Accessories Notepad and email the saved Notepad document to Harkins Audit Software Inc as an email attachment with a brief description of the problem Note D Specification copy books must use D COPY not F COPY or I COPY 100 RTPA for RPG User Manual Summary Because of current compiler design constraints auditing very large RPG source programs may require knowledge of how RTPA audits are accomplished and thoughtful selection of the appropriate RTPA audit options to be used to expand the input source program for RTPA testing RTPA provides the capability of many auditing options to allow the programmer to set appropriate default options for virtually any programming need Auditing options in the may be changed to accomplish auditing of very large programs Conversion of very large RPGIII source programs to RPGIV soutce programs with the CVTRPGSRC command allows much more extensive RTPA auditing particularly if no COPY copybooks are used in the source programs The RPGHI COPY copybooks would also have to be converted to RPGIV 101 RTPA for RPG User Manual Appendix A Frequently Asked Questions Does RTPA for RPG audit all RPG programs RTPA for RPG is designed to audit all types RPG source programs including RPG RPT SOL
179. dd 43 8 interim 82 010617 38200 11 11 12 869 43 80 442 z add 87 extra 50 010617 38300 11 11 12 869 87 443 z add 105 extra2 50 010617 38400 11 11 12 869 105 444 z add 17 more 82 010617 38500 11 11 12 869 17 00 445 eval final answer counter 010617 38600 11 11 12 869 783 80 7 3 402 CCCC DIFFERENCE 160 EXTRA 010617 39000 11 11 12 869 7 12 1444 20 87 403 188 INTERIM EXTRA2 010617 39000 11 11 12 869 43 80 105 404 33 15 GROSS 010617 39000 11 11 12 869 163 23 405 MORE 010617 39000 11 11 12 869 17 00 450 eval net counter cccc 010617 39100 11 11 12 869 10 3 7 12 451 eval interim answer cccc net difference 010617 39200 11 11 12 869 1229 85 7 7 12 10 1444 20 408 44 GROSS EXTRA2 010617 39300 11 11 12 869 163 23 105 11 10 48 733 453 mm 010617 39400 11 11 12 869 454 movel movsw 1 010604 39500 11 11 12 869 2 455 AUDIT RPGIV IF STATEMENT with alpha extended factor 2 010604 39600 11 11 12 869 456 if movsw 2 BOL 010604 39700 11 11 12 869 2 457 OR MOVSW 3 BOL 010604 39800 11 11 12 869 2 458 movel LL movsw 1 01 010604 39900 11 11 12 869 1 459 endif E01 010604 40000 11 11 12 869 460 movel 151 movsw 1 010604 40100 11 11 12 869 5 461 if movsw 5 BOL 010604 40200 11 11 12 869 5 462 endif EOL 010604 40300 11 11 12 869 463 w w 010604 40
180. e format D COPY instead of I COPY as in RPGIID Will RTPA exceed maximum file limits in RPGIII RTPA increases the number of files used in the RPG source program by one This is the printer file on which the audit file is created If the program has already opened the maximum number of files allowed in RPGIIL this will cause the maximum number of files allowed in the program to be exceeded Does RTPA for RPG use any indicators RTPA for RPG uses the first unused indicator in the source program to turn auditing on or off If there are no unused indicators in the source program RTPA auditing is always on 103 RTPA for RPG User Manual Does RTPA change the original source or object program No RTPA creates the expanded soutce program in a temporary directory and puts audit enabled object program in whatever library you specify The RTPA User should not replace a production library object program during th RTPA expand process How do expand and create Module objects RTPA will create Module objects rather than program objects if the Source type is RPGMOD or SQLRPGMOD Also RTPA will create Module objects rather than Program objects if MOD is specified on the RTPA main selection screen Create As MOD PGM MOD Where is the audit output sent during program execution By default RTPA sends its audit output to the printer file ZZAUDITP which is placed in QGPL when RTPA is installed This printer file must be in the
181. e keys String found in position 26 Figure 6 2 Using the Find capability to search and review ZZAUDITP files The Display Spool File Utility Find capability F16 will search through the Spool file output for the desired character string In this example Find the first time the NEWEXPSH program EXFMT and command key 16 will locate xecuted in this execution of the EXFMT Operation cod with this data was RTPA for RPG User Manual 86 Chapter 7 Using Auditing Options RTPA audit options let you control what information is captured during auditing Auditing Options The User can control how RTPA expands the copy of the input source program with Z audit source statements by using the RTPA Audit Options RTPA User Audit Option defaults are created dynamically when the user first signs on to RTPA and stored in RTPA file Z F102 These User Audit Options may be changed using option 2 of the RTPA Menu command key 9 on the RTPA main screen ZSPGMOIR Real Time Program Audit for RPG V4R3 Date 2 02 07 PHH Select Program to Audit Time 15 40 07 Type choices press F10 Input Source Memb RTPA Maintenance Menu File Name Library Name Enter option press enter Object to Library 1 User Profile Maintenance Create As 2 User Standard Audit Options Maintenance 3 RPGIII Operation Code Maintenance Audit File Outq 4 RPGIV Operation Code Maintenance Max Audit
182. e listing and select option 5 to display the RTPA audit output The RTPAPDF command can by used to create a searchable PDF of this output on the IFS See Appendix E of this manual for a complete audit of the expanded program NEWEXPSH The ZZAUDTIP audit print file is 198 characters e 95 From the NEWEXPSH audit output in Appendix E Program NEWEXPSH New Expected Ship Date RPGIV Obj Lib Z AUDITE Initiated 12 09 06 11 10 48 733 PAGE 1 NEWEXPSH NEWEXPSH Job 026982 User Profile PHH Source File Library QRPGLESRC Z AUDIT Line Do SrcId ChgDat Seq Time 956 C INZSR BEGSR ph456 011227 89700 11 10 48 742 957 initialize fields and arrays 060318 89800 11 10 48 742 958 C MOVEL BLANKS MOVSW 1 ph456 011227 89900 11 10 48 742 959 C Z ADD 12 D ph456 011227 90000 11 10 48 751 12121212121212121212121212 960 C MOVEA ZERO D2 ph456 011227 90100 11 10 48 751 37 RTPA for RPG User Manual 000000000000000000000000000000000000000 PAGE 961 C MOVEA 1111 D3 ph457 011227 90200 11 10 48 751 1111000000000000000000000000000000000000000000000000 962 C MOVEL 88888888 SSA ph456 011227 90300 11 10 48 751 963 C ENDSR ph456 011227 90400 11 10 48 751 229 CUSTOMER MASTER KEY 991225 17600 11 10 48 751 234 RECEIVE PARAMETERS PASSED FROM CALLING PROGRAM 990918 18100 11 10 48 751 235 C ENTRY PLIST 990918 18200 11 10 48 751 236 C PARM PARMIN 44 991225 18300 11 10 48 751 000150000001 238 INPUT DATA AREA TSTDTA 010126 18500 11
183. eate F9 Retrieve F10 Command entry F24 More keys Figure 1 5 Press F6 to create the RTPA PDM User defined option Note The RTPA User defined option S is already in the list of PDM user defined options 25 RTPA for RPG User Manual Create User Defined Option Type option and command press Enter M rene S Option to create Comman EE rtpc amp n F3 Exit F4 Prompt F12 Cancel Figure 1 6 Enter the PDM RTPA User defined option to allow selection of a member name in PDM This PDM RTPA User defined option allows PDM to pass a member name selected with an S blank then S and the Enter Key back to the RTPA main screen in the source member name field when PDM is selected with command key 4 and the cursor is on the source member name field in the RTPA main screen How to create a private RTPA User Testing Library Each programmer using RTPA may create a private testing library by selecting Option 6 of the RTPA Maintenance menu F9 on the RTPA main screen This library may be placed first in the library list with the ADDLIBLE command 26 RTPA for RPG User Manual ZSPGMO5R Real Time Program Audit for RPG V4R3 Date 3 04 07 PHH Create RIPA NEW User Library for Audit Testing 20853855 RTPA paul harkins Enter NEW Library Name PHHRTPA This RTPA library Name for RTPA User Audit Testing will be before the RTPA Libraries ZSAUDITE and ZSAUDIT in the LIBL
184. eld Work with Members Using PDM APPCON plen We PA wa p ORPGLESRC Gloppe ZSAUDIT POST ELON CO Type options press Enter 2 Edit 3 Copy 4 Delete 5 Display 6 Print 7 Rename 8 Display description 9 Sav 13 Change text 14 Compile 15 Create module Opt Member Type Text S NEWEXPSH RPGLE New Expected Ship Date from Order Detail RPGIV NEWEXPSHB RPGMOD New Expected Ship Date from Order Detail CALLB NEWEXPSHE RPGLE NEW EXPECT SHp Dte RPGIV no output C copy EXT PRT NEWEXPSHO RPGLE NEW EXPECTED SHIP DTE RPGIV no output specs W COPY NEWEXPSHP RPGLE NEW EXPECTED SHIP DATE Prototype RPGIV with CALLP NEWEXPSH2 RPGLE New Expected Ship Date from Order Detail RPGIV PROCXYZ RPGMOD bound procedure Module RTPAEXAMP1 RPGLE Get Expected Ship Date from Order Detail RPGIV MORES Parameters or command gt HOSEAS F4 Prompt F5 Refrsesn EC reste PIAS wilewes F10 Command entry F23 More options Iu Morne keys Figure 4 2 Work with Members Using PDM Screen TIP Make sure that your program compiles correctly prior to selecting it for expansion RTPA uses the AS 400 s native compiler and may not be able to expand or compile programs with errors in them Selecting the Object Library for the expanded object The expanded audit enabled object program will be created in a library
185. endif 02 32 read datafile 02 File Key DATA KLMNOPORSTUVWXYZ Hex 5 77 ACB 24 convert character to hex 25 cvthc szHex data len data 2 B01 KLMNOPQRSTUVWXYZ Hex 577 ACB KLMNOPQRSTUVWXYZ 44 Hex 577 ACB 26 eval result szHex D2D3D4D5D6D7D8D 9E2E 3E4E5E6E7E8E95A7C7B40 D2D3D4D5D6D7D8D 9E2E3E4E5E6E7E8E95A7C7B40 27 if szHex lt gt blanks 01 D2D3D4D5D6D7D8D 9E2E3E4E5E6E7E8E95A7C7B40 28 convert hex to character 01 29 cvtch szChars szHex Slen TrimR szHex 02 D2D3DAD5D6D7D8D9E2E3EA4E5E6E7E8E95A7C7BA0 D2D3D4D5D6D7D8D9E2E3EA4E5E6E7E8E95A7C7BA0 30 eval result szChars KLMNOPORSTUVWXYZ 44 Hex 577 ACB KLMNOPQRSTUVWXYZ Hex 577 ACB 31 endif 02 32 read datafile 02 Figure 4 33 RTPA Query audit output of CVTTOHEX program showing Hex over and under 78 RTPA for RPG User Manual Chapter 5 Advanced Auditing Focused Auditing RTPA offers powerful options for controlling exactly what information is to be audited with its Advanced or focused Auditing feature Advanced or focused auditing provides the User with very powerful selective auditing options including selecting auditing of only statements with specific fields variables or specific select operation codes To access these options RTPA must analyze the source program to gather some information about it by first compiling the input source program when the programmer presses the F11 key Once RTPA has completed its ana
186. errides F12 Cancel Enter Validate C 2000 2002 Harkins Audit Software Inc Figure 4 11 RTPA Job compile overrides with command key 7 on the RTPA main screen Press F5 to apply the Job compile overrides then F10 or F11 to submit the RTPA expansion Note Programmer default compile Options and overrides for all RTPA expands are maintained using the Option 1 of the RTPA Maintenance Menu User Profile Maintenance Note If you are using L date format fields 10 character date in RPGIII you must use the DAT ETI M E option for the Type Conversion Option In RPGIV the Type Conversion Option must be NONE To choose the RTPA Default value leave the Override section blank You may not enter the default value into the Override column RTPA for RPG User Manual 57 FMT 001 001 001 001 001 001 001 0 1 O1 DN 0022 0627 0032 0034 0037 0042 0044 0035 0036 00 0038 0039 0040 0041 00 0043 00 0045 Columns SEU gt 00 00 00 00 00 00 00 0019 0020 00 2 31 00 0025 0024 0025 0026 00 0028 0029 0030 COSI 00 00 33 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Ao YU Edit PHHLIB QRPGLESRC RHEMAIL qoc dle 2 eb duae lu uuu S uni 6 usu s W program RHEMAIL Automatic email Before compiling this the first time crea
187. es F12 Cancel Enter Validate C 2000 2002 Harkins Audit Software Inc Figure 4 10 RTPA User Profile compile overrides maintenance for all User compiles 3 RTPA Job compile overrides are for only this RTPA expansion and are accomplished by pressing Command key 7 on the RTPA main screen RTPA for RPG User Manual 56 ZSPGMOIR Real Time Program Audit for RPG V4R3 Date 2 02 07 NEWEXPSH Job Compile Options and Overrides RPGLE Time 14 05 34 RPGLE Only Override Valid Overrides RTPA Default Generation Severity Level 10 1 21 10 Type Conversion Options all valid options NONE Default Activation Group INO YES RPGLE SANS Delay PREPARE NGS INC NO Commitment Control SAGE STAS NONE CHG Close SQL Cursor ENDMOD ENDACTGRP ENDACTGRP Allow Null Values NO all valid options NO Fix Numeric NONE all valid options NONE ZONED INPUTPACKED Debugging Views LIST all valid options IG ALS Optimization Level NONE ERASMO PUTE NONE NONE Truncate Numeric VES SN On SVING Both RPGLE and RPGIII Jobq for Audits Valid Jobq Target Release CURRENT all valid options CURRENT User Profile SUSER all valid options Authority LIBCRTAUT all valid options AMEB GRAV Language ID JOBRUN all valid options JOBRUN F3 Exit F5 Apply F6 RPGIII Compile Options and Ov
188. espond with DSb DS 80 00 test of free format RPGIV source stmts between free and end free 00 fcustmast uf 00 fqprint o 00 f 00 00 d Ws Edate 00 d start date 00 d end date 00 d month end 00 d gotname 00 d gotadl 00 d gotad2 00 d gotcity 00 d 00 d parmre 00 d porder 00 d xorder 00 d iorder 00 d rorder 00 d sorder max 00 d zorder final e f 132 0 0 0 0 0 0 Q a 17 25 34 40 k disk printer oflind inOB 10 inz e o p 25 25 25 25 70 16 24 33 39 47 ANWWNO DATFMT ISO inz D 1998 12 18 DATFMT ISO DATFMT ISO inz D 1994 10 31 070125 070125 070125 070125 070125 070125 070125 070125 070125 070125 070125 070125 070125 070125 070125 070125 070125 070125 070125 070125 070125 070125 070125 070125 070125 070125 070125 1107 18 27 06 818 1108 18 27 06 818 1109 18 27 06 818 1110 18 27 06 818 1111 18 27 06 818 1112 18 27 06 818 1113 18 27 06 818 1114 18 27 06 818 1115 18 27 06 818 1116 18 27 06 818 1200 18 27 06 818 1300 18 27 06 819 1301 18 27 06 819 1302 18 27 06 819 1701 18 27 06 819 1800 18 27 06 819 1900 18 27 06 819 2200 18 27 06 819 2300 18 27 06 819 2400 18 27 06 819 2500 18 27 06 819 2501 18 27 06 819 2502 18 27 06 819 2600 18 27 06 819 2700 18 27 06 819 2701 18 27 06 819 2800 18 27 06 819 RTPA for RPG User Manual 118 0022 0023 0024 0025 0
189. essed very simple method is to use the time of the noted error 20 17 08 to review the audit output and search for the first time the customer number 2050 appeared Without ever looking at the source program member A more powerful RTPA auditing method allows the programmer to start auditing when the customer number is first 2050 and stop auditing when the customer number is no longer 2050 This provides a focused audit of only the error condition and what caused it The focused RTPA auditing could also have been turned only when Order was 1000 Expanding the NEWEXPSH program with RTPA allows the programmer to display all the variables actually used in the source program using the F16 command key The programmer can then identify the customer number as variable CUCUST ZSPGMO1R Real Time Program Audit for RPG V4R3 Date 1 30 07 Select Variables to Audit Time 19 04 48 Program NEWEXPSH Type options press Enter OSes One Y Include in audit Opt Data field Len Dec Elem Chg Description Y BBBBBBBBBBBBBB P i3 02 AA ACIS Ig 3 00 X OO E 3 02 e 99 ee Ig 8 00 1 x CCC Ge eee Geo 5 TOTON 2 Y CKASTA A 1 We A 1 Y COAPP A 80 dl Y COUNTER B 2 00 16 Y CUADI A 25 ADDRESS 1 52 RTPA for RPG User Manual Y CUAD2 A 25 ADDRESS 2 Y CUCUST P 7 00 2 CUSTOMER NUMBER Y CUNAME A 25 CUSTOMER NAME Y CUSNM A 35 F3 Exit F12 Cancel Enter Accept choice
190. ging techniques Demystifying Legacy Programs Many programming tasks require that a programmer first learn a legacy program before getting to the real wotk of enhancing correcting or updating it These existing programs can be very large complex and 14 RTPA for RPG User Manual entirely unfamiliar to the programmer resulting in a time consuming often unpleasant effort and the data being processed is often unknown The problem of learning existing programs is particularly poignant when the enhancement is small in these cases most of the time and effort is expended on learning the program RTPA can reduce the time and effort of the learning process dramatically Instead of printing out the program or compiling the program and reading through the listing trying to guess where the execution flow goes RTPA shows the actual execution flow caused by the data being processed Programmers don t have to guess anymore or spend time looking at sections of code that are not part of the actual program flow Fixing Software Glitches A large part of a programmer s job is finding and fixing bugs in software All software potentially has bugs in it many of which are easy to find and fix once they occur However the most frustrating and potentially expensive bugs are those that are intermittent or are hard to recreate in a test environment Often there is too much code for a programmer to review closely in a reasonable timeframe If the programmer
191. h COPY Subroutine F3 Exit F5 Add F6 Search Copyright C 2000 by Harkins Audit Software Inc Figure 4 24 Selection of Standard or Utility subroutines to be bypassed in all expanded programs 70 RTPA for RPG User Manual Command key 6 may be pressed to display the Company standard subroutines to be bypassed for auditing ZSPGM19R Bypass Utility Subroutines 2 05 07 D Delete O Subroutine PSSR CNVDAT MOVE TL ZOOOCA 2000608 F3 Exit F12 Selection screen Figure 4 25 Standard or Utility subroutines to be bypassed in all expanded programs for auditing 71 RTPA for RPG User Manual 6 Create User RTPA Testing Library first in Libl Each RTPA User is encouraged to create a private RTPA auditing library so that RTPA expansions his or her RTPA expanded audit enabled object programs may be placed in that library rather than in the RTPA expanded library Z AUDITE which is the default library for all RTPA expanded audit enabled objects This allows the resulting RTPA User test library in this example PHHRTPA to be placed first in the testing library list for the User ahead of the RTPA libraries ZSAUDITE and Z AUDIT ZSPGMO5R Real Time Program Audit for RPG V4R3 Date 3 04 07 PHH Create RIPA NEW User Library for Audit Testing Times 20253543 RTPA paul harkins Enter NEW Library Name This RTPA library Name for RTPA User Audit Testing wi
192. h F6 Auditing Options F7 Compile Options F10 Submit Fll Advanced Auditing F24 More Keys C 2000 2002 Harkins Audit Software Inc Figure 4 15 Selection of RTPA of all source programs starting with TEST Press command key 10 to submit programs for mass expansion The message Member TEST submitted Press F18 to see status Mass compiles indicates that the programs have been submitted for RTPA expansion Press command key 18 to review the expansion status of the submitted programs 62 RTPA for RPG User Manual ZSPGMOIR Real Time Program Audit for RPG V4R3 Date 2 02 07 PHH Job History Timer Type option press Enter 4 Delete 5 Display O Program Job Status Program Name Jobi Date Time TESTARRAY 8 EXPN OK Test array EVAL ARY blan 056775 2 02 07 15 14 04 TESTARRWB 8 EXPN OK Test arrays of 1000 elements a 056776 2 02 07 15 14 04 TESTBASIC 8 EXPN OK Test basic flow O56777 2 02 07 15314304 TESTBASICF 8 EXPN OK Test basic flow Free form 056779 2 02 07 15914304 TESTCALL 8 EXPN OK Test call 056779 2 02 07 15314304 TESTCALLB 8 EXPN OK Test CALLB call a bound proced 056780 2 02 07 15 14 04 TESTCALLP 8 EXPN OK Test CALLP CALL with Prototype 056781 2 02 07 15 14 04 TESTCAS 8 EXPN OK TEST CASXX ENDCS CALL PARM G 056782 2 02 07 15 14 04 TESTCMPA 8 EXPN OK Test compile tIme arrays 056783 2 02 07 15 14 04 TESTCMT 8 EXPN OK Test comment auditing 056784
193. hese instructions If you are installing RTPA from an optical disk CD please skip to the previous section Step 1A Installing RTPA from CD The RTPA video How to Install R TPA illustrates these steps on www harkinsaudit com 22 RTPA for RPG User Manual Download the files from the Harkins Audit Website www harkinsaudit com o From your PC go to http Avww harkinsaudit com download rtpa shtml or click on the 30 day trial button and follow the steps to download RTPA for RPG to your PC o Download the file RTPA40B1 ZIP to your PC into directory such as C temp The Folder temp in local drive C of your PC maybe created in the download process This download of the RTPA for RPG licensed code to your PC should take less than two minutes see the How to Install RTPA video o WINZIP Unzip the downloaded RTPA40B1 ZIP savf on the PC to expand the file into a directory such as C temp to extract the SAVF file o The WINZIP ZIP and UNZIP files is available on the Internet EEDS On the AS 400 create a save file CRTSAVF FILE QGPL RTPA40B1 FTP from the PC to the save file on the AS 400 System i o From a DOS command prompt type Start Run Cmd for DOS window ftp XXX XXX XXX XXX where XXX XXX XXX XXX is the IP address of the AS 400 o Provide the username QSECOFR and the proper password o Transfer the file by typing lcd c temp bin cd qgpl put rtpa40bl savf quit
194. igure P 2 RTPA Query display of ZZAUDITP Audited Programs F10 for RTPA Query Summary ZSPGM64R PHH 1 Select 4 Select 5 Select P Select S Select Opt File Enter Process F3 Exit F5 Refresh F6 Summary Options Real Time Program Audit Query V4R3 View RTPA Audit Files or Summarize ZZAUDITP to ZZAUDITS 1 28 08 15 05 56 C 2000 2002 Harkins Audit Software Inc ZZAUDITP spool file s to be Summarized into ZZAUDITS press Enter spool file s to be Deleted then press Enter Data in Char and Hex Y spool file s to be Displayed then press Enter ZZAUDITP or ZZAUDITS file s for PDF then press Enter WRKSPLF Spool Files from execution of program in User Data User Queue User Data Pages Date Time Job ZZAUDITP PHH QPRINT CUSTSOL 3 01 28 08 14 58 32 634498 ZZAUDITP PHH OPRINT TESTCOB5 5 01 28 08 14 58 32 634498 ZZAUDITP PHH OPRINT TESTCOB7 1 01 28 08 14 58 32 634498 5 AZUL TS PHH OPRINT ORDERINQ 16 OL 28 08 15505855 634977 Bottom F10 Create ZZAUDITS Figure P3 RTPA Query display of ZZAUDITS Audited Summary file ZZAUDITS RTPA for RPG User Manual Display Spooled File me ZZAUDITS Page Line 1 1 e o 6 c Columns 1 78 Find wot E S sss s erc S Program ORDERINO Order Inquiry of expected Ship Date CLP driver Obj Lib 2 358045 25358045 Job 360073 User Profile PHH Source Type CLP Variable JP s
195. ile under RTPA If your program compiles normally but does not work properly with RTPA please contact technical support Why can t compile my large RPGIII program The RPGIII compiler is limited to about 20 000 source statements Because RTPA expands the source code the resulting source code may exceed the limits of the RPG compiler In that case reduce the amount of information selected for audit in the RTPA Expansion Utility Can I ship expanded object programs to other computers RTPA for RPG expanded audit enabled object programs may execute on another System I computer which does not have the RTPA software installed on it However the RTPA audit output Printer File ZZAUDITP must be created on the computer which executes the RTPA expanded object program and produces the RTPA audit output RTPA for RPG is intended for use in program development unit testing system testing pilot production and in production problem analysis and correction RTPA is not intended for use in normal production processing except as needed You may not leave RTPA code in any software that you sell or license to any third party Does RTPA for RPG audit copybook statements RTPA audits copybook statements by default If you do not want to audit copybook statements you can disable auditing of copybook statements in the auditing options RTPA does not expand I COPY copybook statements For copybooks with D specs such as SDS definitions use th
196. itial Auditing Condition Y ON xx EQ GE LT NE NG NL ON OFF Line Factor 1 COmelliciem aeneus 2 ON Audit on OFF Audit off 1 CUCUST IFEQ 2050 2 ON 3 ELSE 4 OFF 5 ENDIF 6 7 8 9 10 53 RTPA for RPG User Manual 11 12 19 14 F3 Exit F5 Apply F7 Program Variables F12 Cancel Enter Validate Input Figure 4 6 Conditional Auditing Screen Press Command key 5 to apply the conditional auditing statements insert them into the expanded source program then press command key 10 to submit the program for expansion The audit output on NEWEXPSH starts at compile statement 513 when variable CUCUST is 2050 after 1050 is added to the precious contents of the variable CUCUST which was 1000 and ends when CUCUST is no longer 2050 This provides a very focused audit and identifies the exact source statement causing the transient error Without looking at the source member or guessing what happened Display Spooled File Bic Loe E I ZZAUDITP Page Line 173i Control E Columns l 78 Find oa fee ee SS OT Og besette Program NEWEXPSH New Expected Ship Date from Order Detail RPGIV Obj Lib NEWEXPSH NEWEXPSH Volos OMNINO User Profile PHH Source Fi Linett 513 C ADD 1050 CUCUST 2050 5 8 e Z ADD 1 CUSMOR al 5115 G MOVEL ALL A MSGDA AAAAAAAAAAAAAAAAAAAAAAAAAAAAA 516 6 MOVEL MSGDB BBBBBBBB
197. lect Operations to Audit Advanced Select Labels and Subroutines to Audit Advanced Select Indicators to Audit Job History Called programs from this expanded source program Conditional Operations in program Indicators used in program Per Audit Conditions in program More command keys toggle RTPA for RPG User Manual 106 Appendix C RTPADEMO Menu of RPG Auditing Examples The RTPADEMO command displays a Menu of RTPA for RPG examples of audit enabled programs that may be selected to produce RTPA audit output in real time as the programs execute ZSPGM37R Real Time Program Audit for RPG V4R3 Date 2 05 07 PHH Examples of RPG Program Auditing in Real time Tames 1 55 3115 26 Opt RPG Program Function a Programs Executed 1 Interactive with calls to interactive and batch NEWEXPSH I 2 Beren wida CALL vo loeum BATCHPGM1 B 3 Free Format RPG TESTFREE B 4 Interactive Embedded SOL GETEXPSHOQ I 5 Batch Embedded Dynamic SQL 6 Interactive Embedded Dynamic SQL with Subfile SOL100 I TT INnrereecrive RAELLI valen Calls iE moa ela GETEXPSH I 8 Batch with CALLP Call with prototype 5 9 Interactive with CALLB Call with bound in procedure ZSTESTINB 10 CRTPGM ZSTESTINB from modules NEWEXPSHB BATCHPGM1 TEST3 11 Batch as Service Program 112 13 Interactive program with abend 14 Interactive program with
198. lected Variable Statements This is used only for Advanced Auditing F11 functionality and only displays the data contents for vatiables selected with a Y F16 to display the variables or fields used in the program Audit Zoned Decimal Variables This is used to audit the contents of variables defined as a DS Defined storage in the D specifications Y is the default option Numeric DS fields may contain non numeric data if not properly initialized INT or filled with proper numeric data before being used in the program Audit File Key Fields This is used to audit the contents of the File Key fields for all File I O operations The default is Y 93 RTPA for RPG User Manual QSYSPRT Compile Printer File THE RPG compile output for the input RPG or RPGLE source program and the expanded compile with RTPA Z statements is on printer file QSYSPRT The QSYSPRT printer file should have a maximum records of at least 600 000 records to allow for very large compile listing output of expanded programs Auditing by Change ID You can choose to audit only those source lines which have a certain Change ID On the Job audit options screen F6 tab to Match Change ID Enter the Change ID that you want to audit Auditing by Change Date You can choose to limit your audit to source lines based on their change date On the main screen tab to Compare Date Enter the date Tab to Comparator and enter GT Greater Than LT Less Than
199. library list when executing an audit enabled object The ZZAUDIIP spool file for each audited job is placed in the spool file of the user and may be displayed with the WRKSPLF command RTPA audit output may be placed in a desired output queue as the program executes by entering the output queue on the main RTPA selection screen Audit File Outq SAME Name SAME How can I direct RTPA audit output to a specific Outq Enter the output queue name on the main RTPA selection screen as below Audit File Outq SAME Name SAME This is particularly helpful when the programmer wants to send the ZZAUDTIP audit output to his or her programmer outq when the application program spooled output goes to another outq How can I expand all the members in a source file Use the mass RTPA expansion function on the main RTPA selection screen as below Member Name ALL Name genetic ALL F4 List ALL in the program name and pressing Command Key 10 expands all source programs in the source file and library Member Name TEST Name genetic ALL F4 List Generic Partial program name followed by expands all source programs with that name TEST in the program name and pressing Command Key 10 expands all source programs starting with TEST 104 RTPA for RPG User Manual Do I need to expand all my source programs Each RPG source program that you want to audit must be expanded with the RTPA Only expanded prog
200. ll be before the RTPA Libraries ZSAUDITE and ZSAUDIT in the LIBL The suggested name for this library is the User initials suffixed with RTPA for example PHHRTPA F3 Exit Press Enter to validate and create NEW User Library Copyright C 2000 by Harkins Audit Software Inc Figure 4 26 Creation of an RTPA User private testing library for RTPA testing 72 RTPA for RPG User Manual ZSPGMOSR Real Time Program Audit for RPG V4R3 Date 3 04 07 PHH Create RTPA NEW User Library for Audit Testing mes 285998255 RTPA paul harkins Enter NEW Library Name PHHRTPA This RTPA library Name for RTPA User Audit Testing will be before the Libraries ZSAUDITE and ZSAUDIT in the LIBL The suggested name for this library is the User initials suffixed with RTPA for example PHHRTPA User Test Library successfully created PHHRTPA Test with ADDLIBLE User Test library then RTPA command on command line F3 Exit Press Enter to validate and create NEW User Library Copyright C 2000 by Harkins Audit Software Inc Figure 4 27 User RTPA Test library PHHRTPA successfully created User Test Library successfully created Test with ADDLIBLE User Test library then RTPA command on command line ADDLIBLE PHHRTPA Your User RTPA Test Library 73 RTPA for RPG User Manual Edit Library List System APPCON Type new changed information pres
201. lysis of the input source program from the compile listing the programmer may customize the audit expansion by using the command keys at the bottom of the RTPA selection screen such as selecting specific variables to audit with the F16 key After all the advanced auditing options are selected the programmer presses the F10 to submit the program for expansion with the selected audits Audited programs are almost always completely audited with virtually all the executing source statements being audited with the F10 submit program however the F11 advanced or focused auditing feature can provide focused audits of areas of interest to the programmer or auditor use the customize function press F11 from the main RTPA screen to first compile the input source program and allow RTPA for RPG to build files with the vatiables files operations subroutines etc that are used in the input source program Advanced Auditing gives access to a high degree of control over what information can be included and excluded from an audit The advanced auditing options include Select Operations to Audit F15 Select Labels and Subroutines To Audit F16 Select Indicators to Audit F17 Display Called Programs F20 Select Files to Audit F22 55 49 5 79 RTPA for RPG User Manual Using the F11 Command Key to compile the input source After the program name source file and source library are entered press F11 F11 Advanced A
202. m files records operations variables and subroutines Audit output may also be started stopped and resumed based on the data contents of variables or the relationships among variables in the executing program 16 RTPA for RPG User Manual Low System Overhead RTPA has a very small impact on overall system performance allowing you to test and validate your software while it runs at near normal speeds In real world tests auditing a program adds as little as 10 to total CPU time to a job on an System i computer What RTPA Doesn t Do We would love to be able to say that RTPA is the only tool that a programmer needs to become more productive and solve every problem However RTPA does have some limitations which you should be awate of RTPA is intended for use in a programming development and testing environment It is not intended for and we don t allow inclusion in shrink wrapped code or any code that is sold to another party Document Conventions courier text is used to indicate a literal statement Italic text is used to indicate a variable e FNis used to denote function or command key number RTPA Web video presentations for programmer orientation RTPA for RPG Camtasia videos PC presentations are available online at www harkinsaudit com for RTPA education and programmer orientation These Camtasia video presentations supplement the information in this Users Manual 17 RTPA for RPG User Manual home page
203. microseconds to a time stamp 26 character date and ti 035500 AS C Z ADD 28 ZSSRC 0356 00 ZS C EXSR ZSGENS 0357 00 s adddur 1000 ms total time 0358 00 ZS 5 Z ADD 2 ZSSRC 0359500 Z 5 EXSR ZSGENS 0360 00 Z C INO EXCEPT 2500029 0361 00 C Z ADD 14625 TESD 3 QS O2 00S e Z ADD 30 ZSSRC F3 Exit F4 Prompt F5 Refresh F9 Retrieve F10 Cursor F11 Toggle F16 Repeat find F17 Repeat change F24 More keys Figure D 2 RTPA expanded source Z Audit statements may be deleted or changed RTPA Z3 executable Audit statements actually produce the audit output in the audit file ZZAUDITP These Z audit statements may be commented or changed if needed and the source program RTPA for RPG User Manual 111 NEWEXPSH may be compiled from file QRPGLESRC in library ZSAUDITE to produce an expanded object program for auditing Typical Programmer Profile for RTPA expansion PHH This sample Programmer User Profile uses the job description RTPA in QGPL which contains a library list including the two required RTPA libraries Z AUDIT and Z AUDITE for expanding RPG input source programs Display User Profile Basic User profile PHH Previous S ign ei 4 5 6 5 02 05 07 16 41 42 Sign on attempts not valid 0 SIESICUIS JE REC ENABLED Date password last changed 01 23 07 Password expiration interval SSMSVAM Date password expires 03 24 07 Set pass
204. number The source statement change ID positions one through five of the source statement The source statement change date and a date compare code The exact time the instruction was executed to the millisecond The Do ft level eg BO1 E01 TIP To update the display in real time while the audit enabled object is executing press systems attention enter 3 to review the program status and then enter 4 to display the spooled files Searching the ZZAUDITP Audit file with the FIND feature The Display Spool File Utility Find capability F16 will search through the Spool file output for the desired character string 85 RTPA for RPG User Manual Display Spooled File File ZZAUDITP Page Line 2 31 Control T Columns 1 78 Find ds EXFMT LS ero uere codi Lc 2 ES acted ect ede eds e RE sehr elu ELO ERU DR DERE 205910 296 C EXFMT NEWEXPD1 WRITE INO3 0 IN42 0 KORDER 0001500 KLINE 00001 UDATE 020207 TIMEN 205910 296 C EXFMT NEWEXPD1 READ INO3 0 IN42 0 KORDER 0001500 KLINE 00001 UDATE 020207 TIMEN 205910 297 TEST F3 298 C INO3 CABEQ ON DONE 0 300 C UDATE CABEO 090100 DONE 20207 302 w nn nn 303 VALIDATE ORDER AND LINE 304 w nn nnn nn mm 306 GET ORDER DETAIL RECORD FOR ORDER AND LINE 307 C Z ADD KORDER OORDER 1500 More F3 Exit F12 Cancel F19 Left F20 Right F24 Mor
205. number of lines that a source file can contain Because RTPA works by temporarily adding statements to the source member before compiling it is possible that a very large source file will grow past the file size limit of the RPGIII compiler when you audit enable it In that case you must refine your audit to limit the number of statements that RTPA adds to your program See Chapter 8 Auditing Very Large RPG Programs for more information on handing audits of very large files Selecting Ranges of Statements to Audit You can choose to audit up to five ranges of statements based on the program compile listing sequence numbers On the main screen tab to Audit Compile Listing Statements Enter the input RTPA compile listing statement line whole number on which to start the audit and the statement line number on which to end the audit You can obtain the sequence numbers by first using RTPA to compile the original source program and reviewing the spool file compile listing RTPA always uses the compile listing whole number line numbets as this includes generated source statements 50 RTPA for RPG User Manual Conditional Auditing with Variable Values RTPA for RPG provides a very powerful capability to selectively turn auditing on and off based on the contents of variables RTPA allows you to start stop and resume auditing at any point in the execution of the program based on the contents of any variable or combination of variables in the
206. odes Status Code Description 4 Compiling Original Source 2 Good Compile of Original Source 3 Bad Compile of Original Source 4 Expanding Source 5 Good Expansion of Source 6 Bad Expansion of Source 7 Compiling Expanded Soutce 8 Good Compile of Expanded Source 9 Error Compiling Expanded Source O Program Job Status Program Name Job Date Time 5 NEWEXPSH 8 EXPN OK New Expected Ship Date from Or 056097 1 30 07 16 34 34 RTPA Status code 8 EXPN OK means that the expanded RTPA source program with Z audit statements in library Z AUDITE has compile correctly and the expanded object program may now be used to create program as the program executes Note Error Code 3 occurs if the input source program will not compile This may be because of errors in the input source program or a library list problem Note Error Code 9 can occur if the expansion stage of the source makes the code too large for the compiler See Chapter 8 Auditing Very Large RPG Programs to see how to handle Error Code 9 Error code 9 may also occur if RTPA incorrectly inserts Z audit statements This error may be corrected by commenting the invalid Z audit statement in the source member in library Z AUDITE and recompiling the source member from library Z AUDITE Note Copybook input source programs should not be expanded with RTPA Z audit statements as the expanded copybook source is put into library Z AUD
207. or EQ Equal to The audit will only include source lines whose Change Date compates correctly to the Comparator 94 RTPA for RPG User Manual Display Spooled File File ZZAUDITP Page Line 2 60 Control Columns L 18 Find chain KE ER ES EE ES e O te ss 332 AUDIT RPGIV CHAIN STATEMENT NO ERROR INDICATOR 333 C ordkey chain orderde 000150000001 ODORD4 0001500 ODLINE 00001 ODCUST 0001000 ODSTOR 0000522 ODITEM Y1815 OD 334 0 LE not found S n 8 END 338 340 DID GET ORDER DETAIL RECORD 341 CONVERT ODEXPD FORMAT YYYYMMDD TO PEXPSH FORMAT MMDDYY 342 0 odexpd ifne zero 20070319 SZ5NG z add odexpd expmd 4 0 20070319 5 5 344 C odexpd DIV 10000 expyy 2 9 20070319 7 Moner F3 Exit F12 Cancel F19 Left F20 Right F24 More keys right side of audit file Display Spooled File File ZZAUDITP Page Line 2 60 Control W60 Columns 60 137 Find 5 e chain Coa EE et mem e cen ecd eene D e OE TO TOL 000918 28800 16 54 00 081 25 IS NOT FOUND jag 030504 28900 16 54 00 103 KEY ODORDf 0001500 ODLINE 00001 DITEM Y1815 ODPRIC 0002100 ODQTY 0000002 ODREQD 20000317 ODEXPD 20070319 BO1 ph234 030504 29000 16 54 00 103 E01 ph235 030504 29300 16 54 00 103 000909 29400 16 54 00 103 000323 29600 115 Sa 00 10 ID f WOOSL 29700 16 54 00 103 CHECK FOR ZERO BOL ph543 030504 29800 16 54 00 103 0 MMDD Oil pasls 030504 29900 16 54
208. ore F3 Exit F12 Cancel F19 Left F20 Right F24 More keys Figure C 4 RTPA audit output ZZAUDITP file of TESTFREE for review Only the leftmost 80 characters of the ZZAUDITP audit file are displayed The complete ZZAUDITP audit file output for TESTFREE is in Appendix E 109 RTPA for RPG User Manual Appendix D User Profile and Job Description for RTPA Changing the RTPA Expanded source program in library Z AUDITE and recompiling it The expanded RPG source program is in library Z AUDITE This RPG source program contains the Z audit statements that produce the audit report in the printer file Z DUDITP when the expanded object program is executed This expanded source program in Z AUDIT may be modified as desired and the compiled as a normal RPG program with PDM and compiled with option 14 of PDM RPGIII expanded source programs are in file ORPGSRC in library Z AUDITE RPGIV expanded source programs are in file QRPGLESRC in library Z AUDITE The expanded RPG object program may be placed in any library and executes without the need for either the Z AUDIT or ZSAUDITE libraries in the execution library list unless the expanded object is placed in library Z AUDITE 110 RTPA for RPG User Manual Columns 6 76 Edit ZSAUDITE QRPGLESRC SEU gt NEWEXPS
209. outines and procedures RTPA offers programmers a convenient way to speed up testing and improve overall program quality The audit allows a programmer to validate a program s that a logic and outputs ate correct without having to spend time writing output specification and hello statements RTPA makes it easy to review a program s execution without having to set breakpoints or wtite test code RTPA audits are automatically produced when the enabled program is run allowing programmer or auditor review in real time as the program executes or later from the audit output file Creating Web GUI Reports from program data and logic Many Web graphical Business Intelligence BI products utilize SQL to access System i DB2 databases to produce charts and reports for top management review and action Many of these reports are now developed and produced in RPG or COBOL programs and printed in text formats using the System i Printer File PRTF capability RTPA is very useful in identifying and matching the often complex 15 RTPA for RPG User Manual computations and the DB2 databases and database fields used in producing the summarized data that is actually used on these management repotts Thus RTPA allows a user to simply enter a report value such as 3 561 014 59 for Sales YTD and search the RTPA audit report from the program or programs that created the report to find the source statement and the field variable with this value The audit re
210. port than can be searched backwards to locate exactly the source statements and data of how the Sales YTD computation of 3 561 014 59 was created and the databases and database field names and any work fields in the program were computed This RTPA auditing and search capability on data values allows not only the recreation of the report Sales YTD amount in the BI Web graph and Web report in SOL but also all the drilldown totals and computations to allow the BI report to drilldown to the actual source of the Sales YTD amount whether the drilldown is by division product line year or other program logic from the DB2 databases The current text printer file program file I O may be embedded SQL or native File I O in which case the native File I O for example Read Write Chain could be converted to corresponding SQL statements in the BI report with the identified DB2 files and DB2 fields logic and computations explicitly identified in RTPA auditing Advantages of Auditing with RTPA RTPA demystifies complex programs enhancing application and program design development maintenance and enhancement The full RTPA audit lists the exact program source statements that are actually executed as the computer executes them regardless of the structure of the program or called programs Thus the programmer or analyst does not have to understand the source program or guess what might happen if different conditions or data is encountered RTPA elec
211. r and more complicated and more frequently involve teams of programmers while at the same time the productivity expectations for programmets have risen higher and higher In a moment of inspiration when faced with a perfect example of these problems Paul invented the Real Time Program Auditing technique Paul had been asked as a consultant to solve a bug in a piece of softwate that brought down a major warehouse resulting in many thousands of dollars of lost time and contract and chargeback penalties He was given a few minutes to find and fix the bug After determining that the bug could be anywhere in about 20 000 lines of legacy software consisting of both in house and 3 party code he decided that his best bet to find the bug was to cause the object program code to create a record of its execution an audit file to allow him to see the program s actual execution flow By compating the times and data of the entries in the audit file with the time that the system would fail and by reviewing the source statements that were actually executed including the data RTPA for RPG User Manual that was processed he found the object program that was executing when the bug occurred and the program problem allowing him to find and fix the bug much faster than anyone could have expected Paul realized that the only sure way of understanding exactly what was happening inside the computer was to be able to see and record like a video securi
212. rams will produce audit files Use the RTPA generic program name partial name suffixed with an to expand all RPG programs with that partial name for example TEST expands all programs starting with TEST Use the RTPA generic program name ALL to expand ALL RPG programs in the source member and source file How can I selectively audit ranges of source statements Use the input compile listing compile statement numbers from the RTPA compile of the input source program to enter from statement and to statement ranges to be audited on the RTPA main screen This is available by pressing Command Key 18 to review RTPA compile listings of both the input source program and the RTPA enabled expanded source program Audit Compile Listing Statements 2500 to 3600 1 99999 4000 to 4500 6001 to 6600 to to What is the proper format of a Compile time Array header CTDATA and the name of the Compile Time Array or Table starting in position 10 No other information is valid including comments CTDATA TAXTAB 105 RTPA for RPG User Manual The RTPA Expansion Utility uses the following command keys Command Key F1 F3 Function Display Online Help Exit Prompt field Refresh screen or Apply screen Auditing Options Compile Options Conditional Auditing RTPA Maintenance Menu window Submit File for Auditing Advanced Auditing Previous screen Advanced Select Records to Audit Advanced Select Vatiables to Audit Advanced Se
213. rce files by creating new source files with additional audit statements These new source files can be 3 5 times larger than the original source files Thus a source program of 5 000 source statements including copy books and external file definitions may produce an expanded soutce file with more than 25 000 lines of source code It is worth noting that these additional instructions generally have a smaller non proportional impact on execution time RPG Compiler Limits The RPGIII compiler has design constraints that limit a typical RPGIII source program to approximately 20 000 to 25 000 source statements Larger RPG programs will cause a compiling error The RPGIV ILE compiler has design constraints that limit a typical RPG ILE source program to approximately 60 000 to 65 000 source statements Larger RPG programs may cause a compiling error The actual number of RPG source statements allowed for a successful compile of an RPGIII or RPGIV source program depends on the design constraints of each phase of the RPG compiler and the source statements used in the source program RPGIII source programs and RPGIII copy books may be converted to RPGIV to use the RPG ILE Compiler with the IBM Command CVTRPGSRC COBOL Compiler Limits The COBOL 400 compiler has design constraints that limit a typical COBOL 400 source program to approximately 20 000 to 25 000 source statements Larger COBOL programs will cause a compiling error 98 RTPA for R
214. rce statement was executed The input source program compile listing statement sequence number Converting spool files to PDF files on the IFS The RTPAPDF command converts a spool file into a searchable PDF file on the IFS Note The IBM iSeries Access for Web and IBM Infoprint products may be needed to create and fully seatch PDF files on the IFS The RTPA command RTPAPDF will convert a WRKSPLF spool file into a searchable PDF file on the IFS Integrated File System as illustrated below This allows the compile listing in the IFS file to be fully searched using the PDF search facility 84 RTPA for RPG User Manual Convert SCS SpoolFile into PDF RTPAPDF Type choices press Enter SDOOI marce tae ss NEWEXPSH Name UL ODISSE Je re NEWEXPSH Name USC TA PHH Name NUTS e epee 2 92 056097 000000 999999 Spoon nunge rA 5 6 6 LAST 1L 9 9 9 999 ONS Ties aet oclo E EEE CURD IU TEE e urme mi Meme 5 5 2 a o eo EP I Md BaS Pagestze 9 FE FEE AUTO Bottom F3 Exit F4 Prompt F5 Refresh F12 Cancel F13 How to use this display F24 More keys Figure 6 1 Converting a WRKSPLF RTPA NEWEXPSH audit file to a searchable PDF file in the IFS Spool file NEWEXPSH converted into NEWEXPSH pdf m the System i IFS In RPGIV the audit file can also include The source statement sequence
215. roduce ZZAUDITP file Press F5 to Review Audit Output The message Press F5 to Review Audit Output is displayed at the bottom of the screen indicating that the batch TESTFREE program has completed execution Command key 5 may be pressed to display the WRKSPLF screen to review the RTPA audit output of the TESTFREE program execution 108 RTPA for RPG User Manual Work with All Spooled Files Type options press Enter 1 Send 2 Change 3 Hold 4 Delete 5 Display 6 Releas 7 Messages 8 Attributes 9 Work with printing status Device or Total Ga Opt File User Queue User Data SES Pages Page Copy OPRINT PHH OPRINT TESTFREE RDY 1 1 5 ZZAUDITP PHH QPRINT TESTFREE HLD 3 1 Bottom Parameters for options 1 2 3 or command gt F3 Exit F10 View 4 F11 View 2 F12 Cancel F22 Printers F24 More keys Figure C 3 User WRKSPLF file with ZZAUDITP output of program TESTFREE Display Spooled File File ZZAUDITP Page Line 1 1 Control Columns i 78 Find S vo Br Gd PAIS aa PER SA Val senes GOL KS are et E Program ESTFREE Test Free format RPG specs Obj Lib ESTFREE TESTFREE Jabs 058993 User Profile PHH Source Fi Lines 50 get current time Sil time times 60 164337 ae eval cucust 4321 4371 53 except audstr 54 start free form 56 sorder max 1234 56 112 341 565 ST comment 1 58 porder 1500 1500 M
216. s Enter Sequence Sequence Sequence Number Library Number Library Number Library 0 150 300 10 PHHRTPA 160 9119 20 OTEMP 1 10 320 30 OGPL 180 330 40 ZSAUDITE 190 340 50 Z AUDIT 200 350 60 ZSAUDITS 210 360 70 DBU70 220 370 80 ABSTRACT 230 380 90 240 390 100 250 400 1118 260 410 120 270 420 130 280 430 140 290 440 IMCS o c F3 Exit PS ROELSESMN F12 Cancel Figure 4 28 User RTPA Test library PHHRTPA is before RTPA libraries ZSAUDITE Z AUDIT The User may then test RTPA expanded audit enabled object program s from that test library ZSPGMOIR Real Time Program Audit for RPG V4R3 Date 6 04 07 PHH Select Program to Audit times iby eile sy Type choices press F10 Input Source Member Name NEWEXPSH Name generic ALL F4 List Heiko NAM m Me e ORPGLESRC Name Jaita MNT ZSAUDIT Name Object to Library PHNRTPA Name Crearte es EG M PGM MOD Auce 15116 OWES s o o ex Name SAME Max Audit Pages 15000 1 999919 JOBD kor iso 5 ID Library Name Name Audit Compile Listing Stmts iE HESIODI Only to to E to F8 Conditional Auditing F9 Maintenance Menu F18 Job History F24 More Keys C 2000 2002 Harkins Audit Software Inc Figure 4 29 RTPA Expanded object program to User Test library Program NEWEXPSH placed in library PHHRTPA 00 highest severity
217. s and continue C 2000 2002 Harkins Audit Software Inc Figure 4 5 The customer number variable is CUCUST The programmer may now condition RTPA auditing to only audit when variable CUCUST is 2050 Press F8 to display the Conditional Auditing screen Enter the conditions under which you want the audit to start and stop and press F5 to apply those conditions Set the Initial Auditing Condition to ON or OFF This specifies whether the audit should start when the program statts or if the audit should only start when the conditions are first met The Initial Auditing Conditions is blanked to turn off auditing until the entered condition is met and the If conditional statement is entered Command Key 5 is pressed to insert the conditional statement into the expanded RTPA source in library Z AUDITE The ON Condition turns RTPA auditing ON The OFF Condition turns RTPA auditing OFF Auditing for only Order number 1500 field ODORD would have been accomplished by changing the If statement to Line Factor 1 Condition Factor 2 ON Audit on OFF Audit off 1 ODORD IFEQ 1500 The IF statement may be a complex statement with multiple IF AND OR conditions ZSPGMO1R Real Time Program Audit for RPG V4R3 Date 1 30 07 PHH Conditional Auditing Time 19 14 54 Enter conditions press F5 when finished walic Comehle 61165 5 IFxx ANDxx ORxx ELSE ENDIF In
218. s of RTPA Audit Output RTPA and Auditing The Origins Paul H Harkins founded Harkins Audit Software to solve some of the most frustrating aspects of working as a software developer and IT consultant Over his 45 year career Paul came to realize that the most unpleasant frustrating and time consuming activities of a programmer involved Learning other people s programs to make enhancements and corrections Tracking down bugs in production systems and in development systems Validating and documenting new programs with proof of comprehensive testing The inability to easily and quickly solve difficult critical and stressful problems The Complex and unnecessary technical aspects of programming particularly debugging Guessing and speculation of what happened or what might happen if Not being able to see exactly what was happening inside the computer all of the time The difficulty and loss of productivity in stopping the computer with traditional debug programs The lack of a recorded complete audit of what happened inside the computer programs The high risk and stress of supporting complex applications without any program audit trail Over that time the computer industry created a number of powerful tools and techniques to help with these activities Programs like stepper debuggers 4 generation analysis tools and the structured walkthrough process improved the situation At the same time however applications and many programs have become large
219. statements being executed RTPA conditional auditing with Command Key 8 F8 at the RTPA main screen 1s available before submitting the input source compile for both Full auditing F10 and advanced auditing F11 Example of finding a transient error with RTPA The RTPA for RPG example interactive program NEWEXPSH contains a transient or intermittent bug that happens only one time in the program This is when the displayed order number 1500 changes from customer number 1000 ABC Stores store 522 to customer number 2050 XYZ Stotes store 1 NEWEXPSH Sample RPG program for Auditing 1 30 07 19309348 Customer 1000 ABC STORES STORE 4522 Store 522 Order Number 1500 Line Number ii Expected Ship Date 3 19 07 F3 Exit Enter Chang xpected ship date Figure 4 3 Program NEWEXPSH displaying the correct customer number 1000 NEWEXPSH Sample RPG program for Auditing 1 90 07 19311318 Customer 2050 XYZ STORE ARDMORE Store Hi Order Number 1500 Line Number i 51 RTPA for RPG User Manual Expected Ship Date 3 19 07 F3 Exit Enter Chang xpected ship date Figure 4 4 Program NEWEXPSH displaying incorrect customer number 2050 The programmer using RTPA for RPG auditing has several effective and simplified methods easily this transient problem which in a batch program could occur in the millionth order being proc
220. t separate calculation comments Audit calc comment statements Y Y Include 92 RTPA for RPG User Manual Display Spooled File Pee ZZAUDITP Page Line 1 50 Control Columns i 78 Find e sdb Sess I 2 pp iesu t a ROM o te DET Rev d np Me eee 260 add 30 days to start date to get end date 261 start date adddur 30 days end date 1998 12 168 1999 01 47 262 add 1 month to end date 263 adddur 1 5 toy las end date 1999 02 17 264 extract day number from date 265 0 extrct end date D dayno Zz 0 1996 02 17 Ly 266 extract month number from date ACT NEG extrct end date M Month no 2 1999 02 31 7 2 268 extract year number from date 209 extrct end date Y Year no 4 0 More F3 Exit F12 Cancel F19 Left F20 Right F24 More keys Figure 7 5 RTPA auditing of calculations comment statements To be included in the audit the comments must occur in the source inside the execution flow Le between a beginning operation such as TAG and an end operation such as ENDSR Show All Variable Values This causes the audit file to include variable contents for all variables in executed statements Audit lines of data record This tells RTPA how many 198 character lines of a data record should be included in an audit file The name of each data field used in the record is output followed by a dash followed by the contents of the field Only Se
221. te Compiler override statements in the RPGLE program may also be used to ignore decimal data errors Also RTPA compile override options may be used to bypass decimal data errors 46 RTPA for RPG User Manual Chapter 4 Using RTPA This chapter explains RTPA a utility program that allows you to perform all of the functions required to create audit enabled programs You can use RTPA to audit enable specific programs after you have finished editing them with PDM and are sure that they compile correctly To get the RTPA main screen at the command line type RTPA The following screen will be displayed as shown in Figure 4 1 47 RTPA for RPG User Manual RPG V4R3 Audit Name gene Name Name Name PGM MOD 199999 WOE Name i1 99999 Name SAM Date 5 18 07 Times 20323084 rics SALL ASer F6 Auditing Options ZSPGMOIR Real Time Program Audit for PHH Select Program to Type choices press F10 Input Source Member Name NEWEXPSH QRPGLESRC Vir ams AMNOInc E EE ZSAUDIT Olojexee o lulomeuY e s s s s eredate WS 6 6 BG Audit Pale OWE 5 Max Audit Pages 5 15000 JOBD for pgm compile 1151 RTPA Neues 6 5 9 9969 6 QGPL Audit Compile Listing Stmts to Only to to to to Pl kelp F3 Exit F4 Prompt
222. te a binding director for e mail by typing CRTBNDDIR BNDDIR xxxxx EMAIL ADDBNDDIRE BNDDIR xxxxx EMAIL OBJ QTCP QTMMSNDM SRVPGM To Compile CRTBNDRPG rhemail SRCFILE srclib QRPGLESRC DBGVIEW LIST op SE OR H DFTACTGRP NO OPTION SRCSTMT NODEBUGIO NOSHOWCPY H BNDDIR QC2LE RHEMAIL fal000 aLiE e k disk Hs rename al0rcd al0rcd00 copy qcpylesrc appifsio h copy qcpylesrc appiconv h copy qcpylesrc appsndml h copy qcpylesrc apperrno h variables d emladr S 50 inz pnardi8appcon4 com d emlcca S 30 sm D prototype of function to add recipients d AddRecip pr 280 d InetAddr 256 value d AddrType 2 value copy error structure from qsysinc d copy qsysinc qrpglesrc qusec Figure 4 12 Input source program Compile Options not allowed in RTPA RTPA for RPG uses the input source program compile spool file to gather information needed to make insert Z audit statements The RTPA for RPG required format for the input RPG source program compile requires a consecutive compile listing sequence number starting with the integer 1 T he following input soutce program compile options are not allowed by RTPA for RPG and are blanked in the RTPA expanded source program SRCSTMT NOSHOWCPY INDENT The original input source program is unchanged by RTPA for RPG Creating the Expanded Object Program with F10 When you have selected the member to
223. that you specify in the Object To Library field This is the object program that will produce audit output on printer file ZZAUDITP Selecting the Job Description to be used for RPG source compiles The user may enter a Job Description name and library to be used to provide the correct library list for compiles of the RPG input source program and fro the compile of the expanded RPG source programs with inserted Z audit statements 49 RTPA for RPG User Manual JOBD for pgm compile libl RTPA LIBL JOBD Evbrary Name 4 4 la sa QGPL Name JOBD for pgm compile libl LIBL LIBL JOBD Library Name Name JOBD LIBL is to used the signed on job description library list with any added or deleted libraries from an EDTLIBL command This is the CURRENT library list Customizing the Audit RTPA offers many options for determining what information is included in the audit file While auditing everything is appropriate for many tasks there are situations where it becomes useful to limit what is audited You can select to include exclude certain operations turn the audit on or off based on specific conditions in the program view the values of specific vatiables only audit statements with a specific Change ID or Change Date etc One key reason for reducing the number of audited statements is the source file size limitation of the RPGIII compiler The RPGIII compiler has a limitation on the
224. their productivity increases the quality af their Play the oaa ind ger ordering software development Steel Balls Jav mith akna na in the 12 eel lls Java unsolvable with canventianal n I toals process Interactive Game Read aboutit Read aboutit LT Paul Harkina awarded U S Patent Na 6 775 827 for RTPA RT P A Examples of 22 Corporate Programming Languages Haw ta Dramatically Increase Your Programming Capability Version 4 FREE Trial Productivity and Value RTPA User Manual lt wish IBM would make this product part of the base os RTPA Videos Don Rima 3 835 out of 4 Editor GUI RTPA Videos iSeries Magazine home products support company news sitemap contact HarkingAudttSattware Inc 816 0 ne West Chest 38 Copyright 2000 2003 Harkins Audit Saftware Inc All Rights Reserved Terms af Use Privacy Palicy IBM server Solution Connection Integrated Targeted Connected mv Server Proven Done I 3 Internet 20 RTPA for RPG User Manual Chapter 1 Installing Real Time Program Audit This chapter outlines the steps for installing RTPA for the first time or as a complete reinstall for an upgrade release Requirements IBM System i AS 400 Model 170 RISC with RPGII or RPGIV OS 400 V5R3 or later RIPA for RPG LODRUN software CD QSECOFR password About 80 megabytes of disk for executable and sample programs Step 1A Installing R
225. to define a PDM User defined option to allow PDM to pass a selected PDM source program name back into the RTPA Main screen when PDM is selected in the RTPA main screen 24 RTPA for RPG User Manual Programming Development Manager PDM Select one of the following 1 Work with libraries Work with objects 3 Work with members N 9 Work with user defined options Information about new tools press F1 for details Selection or command mec F3 Exit F4 Prompt F9 Retrieve F10 Command entry F12 Cancel F18 Change defaults 8 CO enr We CO 1991 2005 Figure 1 4 Select PDM option 9 to create a User defined PDM Option Work with User Defined Options APPCON Nc EM QAUOOPT Memper 6 6 6 8 QAUOOPT ilsaeeutw 8 a OGPL POST ELON IE 3 Type options press Enter 2 Change 3 Copy 4 Delete 5 Display Opt Option Command S rtpc amp n AB STRCODECMD CMD CODEBRWS lt ADM gt amp ZP amp ZL amp ZT amp ZN AD STRCODECMD CMD CODEDSU lt ADM gt amp ZP amp ZL amp ZT amp ZN AE STRCODECMD CMD CODEEDIT lt ADM gt amp ZP amp ZL amp ZT amp ZN CALL amp O amp N CB STRCODECMD CMD CODEBRWS amp L amp F amp N Ce CHGCURLIB CURLIB amp L CD STRDFU OPTION 2 CE STRCODECMD CMD CODEEDIT amp L amp F amp N ora ce Command gt F3 Exit F4 Prompt F5 Refresh F6 Cr
226. tronic program auditing is by far the fastest and most productive and effective method developing maintaining and supporting corporate applications over any debugging tool or known other analysis technique No prior knowledge of the application program files data other details is required Simply enable the application programs with RTPA capability run the application and observe exactly how the computer is actually executing or actually executed the application programs and the data using the audit disk or printed output Hands Free Operation Once you audit enable a program with RTPA you don t have to set program breakpoints or stop the normal flow of the program as it executes And the programmer does not have to be present when the program executes Video camera like complete auditing to disk RTPA for RPG CLP and COBOL default to completely audit every executing program statement in RTPA enabled programs to a spool file including the source statement contents of variables and the exact moment the statement was executed The RTPA Query product combines all of the called programs in a job such as Order maintenance or Customer invoicing together by the moment the program was executed by the computer Flexible Auditing Choices You can make your audit as in depth or as high level as you like An audit can include every executable source statement in the source program and the value of every variable or it can focus on selected progra
227. ty camera every statement that was executed and all the data at each moment of time without having to be present when the program was run Paul took this technique and expanded it into the powerful tool that programmers all around the world use today The Real Time Program Audit gives programmers everywhere the ability to see in complete detail every line of source code that executes and the values of all the variables together with other information such as the time of execution the change ID of the source the source statement number and the like Programmers who have added RTPA to their collection of software tools have saved hours days and months of development time eliminating the tedium and frustration that comes from guessing about how a program actually executes and greatly increasing their productivity RTPAAuditing of RPG CL and COBOL The Real Time Program Audit RTPA is designed to audit many programming languages including the IBM System i computer languages RPG Report Program Generator CL Control Language and COBOL Common Business Oriented Language languages Both the Original Program Model OPM and the Integrated Language Environment ILE compilers for RPG CLP and COBOL are supported The RTPA command is entered for expanding RPG source programs for auditing The RTPACL command is entered for expanding CL source programs for auditing The RTPACO command is entered for expanding COBOL source programs for auditing
228. udit Options to Reduce the Source Size ssssssssssseeeeeeenennene 100 Audit Copybook Subroulines mente nter eer nete ber edge cetera pee bea 100 Audit lines of Record Data uu uuu l emper det tae ne pea 100 Reporting RTPA Status 9 Compile Error ea a ea nennen 100 rd 101 Appendix A Frequently Asked Questions 402 Does RTPA for RPG audit all RPG programs sse 102 Does RTPA audit freeform RPG sse eterne EATS LEa AERES nnne 102 Why did RTPA fail to expand the program correctly u 103 Why can t compile my large RPGIII program sse 103 Can I ship expanded object programs to other computers a 103 Does RTPA for RPG audit copybook statements seems 103 Will RTPA exceed maximum file limits in RPGIII enn 103 RTPA for RPG User Manual Does RTPA for RPG use any indicators I L L 103 Does RTPA change the original source or object program a 104 How do I expand and create Module objects L L L nnne 104 Where is the audit output sent during program execution u 104 How can I direct RTPA audit output to a specific Outq arne rnnnen nemna nrnnnrnennernennr 104
229. uditing rather than the F10 key to submit the input source program for a compile and to build the necessary RTPA work files needed for advanced auditing After the F11 key has been pressed to submit the input source program for a compile the following message will appear ZSPGM01R Real Time Program Audit for RPG V4R3 Date 6 04 07 PHH Select Program to Audit Time 17 11 37 Type choices press F10 Input Source Member Name NEWEXPSH Name generic ALL F4 List Erte c ORPGLESRC Name Library Name d ZSAUDIT Name Object to me EZ SAUDETE Name Create As EAGM PGM MOD Audit File Outq SAME Name SAME Max Audit Pages 15000 1 99999 JOBD for pgm compile 1151 LIBL LIBL JOBD Library Name Name Audit Compile Listing Stmts to 1 99999 Only to to to to F1 Help F8 Conditional Auditing F9 Maintenance Menu F18 Job History F24 More Keys Press Enter to submit Source Member NEWEXPSH for Advanced Auditing Figure 5 1 Program NEWEXPSH selected for Advanced Auditing with Command key 11 this will submit the input source program for a compile listing Press Enter to submit Source Member NEWEXPSH for Advanced Auditing The necessary RTPA work files will be created and the program is ready for selection of the advanced auditing when the following message appears Ready for advanced auditing 80 RTPA for RPG User Manual
230. word to expired NO Local password management AVEO User Class a s PGMR Special authority ALLOBJ alio Sas CLG RS AN SECADM Group profile QPGMR omaer GRPPRF Moremi Press Enter to continue F3 Exit F12 Cancel GO ee OL MRC Yes L92909 2005 Figure D 3 Sample User Programmer Profile PHH 112 RTPA for RPG User Manual User profile Group authority Group authority type Supplemental groups Assistance level Current library Initial program Library Initial menu Library Limit capabilities Text Display User Profile Basic PRIVATE NO RTPA paul harkins Display sign on information SYSVAL Limit device sessions SS MSVATA Keyboard buffering SMS VAT MONIES Press Enter to continue F3 Exit F12 Cancel Display User Profile Basic User profile PHH Storage information Maximum storage allowed NOMAX Ser age mi secs k EE 268 Storage used on independent ASP NO Highest scheduling priority 3 Job description RTPA Library OGPL Accounting code Message queue PHH Library Go QUSRSYS Message queue delivery NOTIFY Message queue severity 00 Output queue WRKSTN Library Printer device WRKSTN Moner Press Enter to continue F3 Exit F12 Cancel RTPA Job Description in Library QGPL 113 RTPA for RPG User Manual Display Job Description

Download Pdf Manuals

image

Related Search

Related Contents

Anleitung - Billiger.de  Manual - DFI Inc.  Fellowes P-35C User's Manual  1 Overall    Alcatel OmniPCX Office  2°/ - Description technique de la NOVA AERON  

Copyright © All rights reserved.
Failed to retrieve file