Professional Documents
Culture Documents
Class - 2-Done: Today's Topics
Class - 2-Done: Today's Topics
Today's Topics:
List method
Column method
Format method
Nixed method
Named method
Flowover method
Column repetition
SET statement
Library creation
Pic's
Lecture Topic:
Method
Type
List
Column
To read data with a definite space between every variable input name $1-16
Format
Syntax
name &:$25.
Nixed
As mentioned
Named
name= $
Flowover
Ex:
datalines;
123
45678
9 10
11 12 13 14
Out come
A
B
C
1
2
3
4
5
6
9 10
11
Double trail
(@@)
input a b c @@
INFILE statements
Type
Use
Syntax
Regular
DLM
DSD /
When observations don't consists of inputs for all
INFILE '<File path>
TRUNCOVER
variables, we use DSD with missover / truncover
DSD TRUNCOVER
OBS & FIRSTOBS
Also another syntax for considering observations from FIRSTOBS=4 OBS=
our choice.
OBS & FIRSTOBS FIRSTOBS = from which Observation, we need to start
reading first observation.
OBS = how many no. of observations we want to read
Library creation :- to store all output tables / data generated from program
execution for that particular session
Syntax :- libname <Temp library name of our choice> '<Folder path to
store all output files>';
Difference between TRUNCOVER & MISSOVER:
o
MiSSOVER : Even after using this, if the last variable length is not
matching to variable declaration then It will consider as last variable input
is missing
o
TRUNCOVER : It is as advanced option, and it will read even if it is not
matching with last variable length
Abbreviations
DLM - Delimiter
DSD - Delimit Sensitive Data
OBS - Observation
Study Questions
Homework:
Sachin V
English A
XAVIER
SAURAV VI
Maths B
JPSEPH
Read the data in
Variables:
1.Name
2.Standard
3.Subject
4.Division
5.School
1st query: to read entire data for all variables
2nd query: to read partial data. i.e. only variables Name, Division & School
Interview questions:
What if I want random observations
What if I want even series out or odd services out
What if want every 3rd record or 4th record.
Without opening the table, how will I know what is there in the last row.
Without opening the table, how to see what is there in the last 10 records.