Presentation is loading. Please wait.

Presentation is loading. Please wait.

Display Files Week 4.

Similar presentations


Presentation on theme: "Display Files Week 4."— Presentation transcript:

1 Display Files Week 4

2 Write vs Exfmt Write displays the screen
Exfmt displays the screen and gets the input

3 Indicators Don’t need a data structure but…
Makes RPG more readable! Data type for an indicator is an N Fprjdspf CF E WORKSTN indds(indicators) Dindicators DS D F N D F N D F N

4 Date Field Functions

5 %diff - Finding the Difference between Dates
%DIFF(op1:op2:??) Where ?? Can be: *MSECONDS|*SECONDS|*MINUTES|*HOURS|*DAYS|*MONTHS|*YEARS Or %DIFF(op1:op2:*MS|*S|*MN|*H|*D|*M|*Y)

6 Changing a number to a date value
%day(31) - will change 31 to a number of days %month(9) – will change 9 to a number of months %year(12) – will change 12 to a number of years So: newDate = oldDate + %day(15) will add 15 days to oldDate and store the result in NewDate

7 Updating Database Files
Update record format name changes a record. The record must be read first Write record format name Appends a record to the file Delete record format name Deletes a record from the file Record must be read first


Download ppt "Display Files Week 4."

Similar presentations


Ads by Google