1 / 20

IBC233 Lecture 3 Updated Fall 2011

IBC233 Lecture 3 Updated Fall 2011. Homework. Finish up Lab 2 Work on Lab 3. Agenda . Review Edit Words The Printing Story Library Lists Display Files RPG. Edit Words. Used to make numbers more readable Example Your number is 01234 The default display is 1,234

treva
Download Presentation

IBC233 Lecture 3 Updated Fall 2011

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. IBC233 Lecture 3Updated Fall 2011

  2. Homework • Finish up Lab 2 • Work on Lab 3

  3. Agenda • Review • Edit Words • The Printing Story • Library Lists • Display Files • RPG

  4. Edit Words • Used to make numbers more readable • Example Your number is 01234 The default display is 1,234 You want it displayed as 012-34 Then the EDTWRD would be (‘0♪♪♪-♪♪‘) (♪ means 1 blank space)

  5. The Printing Story • Why is printing so darn difficult? • Printing at home

  6. Playing with your Library List • ADDLIBLE – Add library List Entry • RMVLIBLE – Remove Library List Entry • EDTLIBL – Edit Library List • CHGLIBL – Change Library List • CHGCURLIB – Change Current Library

  7. Display Files

  8. Display Files • File objects • hold screen design • constants or literals • system constants (date, time, user) • fields

  9. Display Files and Programs MARKSDSP *FILE MARKSRPG *PGM

  10. Demo

  11. RPG Report Program Generator

  12. Indicators • Boolean variables – predfined • *IN00 - *IN24 function keys • *INLR – last record indicator • How we end RPG programs • Have the values: • ‘0’ or *OFF • ‘1’ or *ON

  13. F-spec • How we define files File Type: I/U/C File Designation: F/P File Addition: A or blank File Format: E or F Record Address Type: K or Blank Device: Disk/Printer/Workstn

  14. EXFMT • Displays a screen and waits for input eg. EXFMT RECORD1;

  15. WRITE • Writes a record format to a file

  16. Loops - DOU dou X > 10; Total = Total + Array(x); X = X + 1; enddo;

  17. Loops – DOW dow (a <= 5) and (b + c = 0); exsr nextRecord; enddo;

  18. Subroutines • Blocks of logic • Execute a subroutine – EXSR • Define a subroutine BEGSR subName; ENDSR;

  19. IF Statements IF condition; ELSE; ENDIF’

  20. Select Statements SELECT; WHEN condition; statements; WHEN condition; statements; OTHER; statements; ENDSL;

More Related