While reading the data from external text file or mainframe member, we might come across the situation where one line in the external file is containing multiple records, For illustration suppose the data is like given below;
If we observe the data we find that it had got 4 variables namely empID, emp_Fname, emp_Lname and emp_Bdate, The external file is having 2 records but 2 obeservations on each line, i.e. total of 4 observations.
We already know that input line pointer moves to the next line once it moves across input statement, So we need some holder in this case else we will end up reading only 2 records from the file.
@@ holds the pointer until each observation in that input line have been read into PDV.
So the difference between sinlge trailing @ and double trailing @@ is that 'single @' holds the pointer until Next input statement while 'double @@' holds the pointer until all the observations in the input line have been read completely
SAS code catering to the above requirement is given below,
and its nice to observe the output of the above code as expected.