Presentation is loading. Please wait.

Presentation is loading. Please wait.

IBC233 Lecture 3 Updated Fall 2011

Similar presentations


Presentation on theme: "IBC233 Lecture 3 Updated Fall 2011"— Presentation transcript:

1 IBC233 Lecture 3 Updated 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 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 Report Program Generator
RPG Report Program Generator

12 Indicators Boolean variables – predfined Have the values:
*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; OTHER; ENDSL;


Download ppt "IBC233 Lecture 3 Updated Fall 2011"

Similar presentations


Ads by Google