Using source files in a program
You can process a source file in your program. You can use the external definition of the source file and perform any input/output operations on the file just as you do on any other database file. Source files are externally described database files. As such, when you name a source file in your program and compile it, the source file description is automatically included in your program printout. For example, assume you wanted to read and update records for a member called FILEA in the source file QDDSSRC. When you write the program to process this file, the system will include the SRCSEQ, SRCDAT, and SRCDTA fields from the source file.
You can display the fields defined in a file by using the Display File Field Description command (DSPFFD). The program processing the FILEA member of the QDDSSRC file can:
- Open the file member (just like any other database file member).
- Read and update records from the source file (probably changing the SRCDTA field where the actual source data is stored).
- Close the source file member (just like any other database file member).
Parent topic:
Working with source files
Related concepts
Displaying the description of the fields in a file