Creating a Single Obs from Multiple Records
Description: To Create a Single Obs from Multiple Records there are two types of line pointer controls
In flat file mohit.txt FName and LName are in first record, followed by City and State in second record, Organisation and Id in third record.
NOTE :Raw Data file must contain the same number of records for each Obs .Suppose if we are having only two records for the the Second member then it reads the first record of third member as third record of second member which results in ambiguity in output.
Flat Files
EXAMPLE (Code)
OUTPUT
Got Questions ? Pls put them in Comment Box........
Description: To Create a Single Obs from Multiple Records there are two types of line pointer controls
- The forward slash (/) specifies a line location that is relative to current one
- The #n specifies the absolute number of the line to which you want to move the pointer
- The Forward Slash (/) Line Pointer Control (Reading Multiple Records Sequentially)
- The #n Line Pointer Control (Reading Multiple Records Non-Sequentially)
In flat file mohit.txt FName and LName are in first record, followed by City and State in second record, Organisation and Id in third record.
NOTE :Raw Data file must contain the same number of records for each Obs .Suppose if we are having only two records for the the Second member then it reads the first record of third member as third record of second member which results in ambiguity in output.
Flat Files
mohit.txt |
EXAMPLE (Code)
OUTPUT
EMPLOYEE (READING MULTIPLE RECORD SEQUENTIALLY) |
EMPLOYEE1 (READING MULTIPLE RECORD NON-SEQUENTIALLY) |
Got Questions ? Pls put them in Comment Box........