1 / 8

Reading Data from File, Named Constants, and Printing Control

Reading Data from File, Named Constants, and Printing Control. Week3. Reading Data from files (Sequential Read). Read sales; Dow not %eof(sales); enddo. Reading data from files (Random Read). The project file (projpf) has a key field, projid. To find the record where projid = ‘SUNNY’:

keona
Download Presentation

Reading Data from File, Named Constants, and Printing Control

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. Reading Data from File, Named Constants, and Printing Control Week3

  2. Reading Data from files (Sequential Read) Read sales; Dow not %eof(sales); enddo

  3. Reading data from files(Random Read) • The project file (projpf) has a key field, projid. • To find the record where projid = ‘SUNNY’: projid = ‘SUNNY’; chain projid projpf; if %not found; endif;

  4. Chain using composite key • Syntax Chain (studnbr:semester:coursenbr) studgrades; • The key fields to the file, STUDGRADES are: STUDNBR SEMESTER COURSENBR

  5. Named Constants • Value never changes during processing • No specified length • Type determined by value

  6. Initializing StandAlone Fields Use INZ keyword under keywords • You can initialize a field to a value • Some handy special values: • *sys (system date) • *null • *time (system time)

  7. How Defined Data Structure to break up a date into fields. DdateStruct DS D systemDate D inz(*sys) D struct_year 4S 0 overlay(systemdate:1) D struct_month 2s 0 overlay(systemdate:6) D struct_day 2s 0 overlay(systemdate:9)

  8. Page Overflow • OfLind Keyword and assign an indicator OfLind(*Inof) • Available indicators are: • OA, OB, OC, OD, OE, OF, OG, OV and01 - 99

More Related