How to put column grids in a Raw Data File
up vote
0
down vote
favorite
here is a raw data file that I created using the program below.
I would like to know how to put the column grids (I am not sure what it is called so excuse me for using this name if incorrect)
that looks like
----|---10----|---20---
?
I am guessing that there should be an option that I can use but I could not find one in my text book (the text book shows as if the column grids are there by default)
I appreciate your help.
data a;
input name$ id age;
cards;
Ruth 39 11
Jose 32 22
Sue 30 33
John 40 44
;
run;
data _null_;
set a;
file 'C:UsersstardustDesktopemployee';
put name 1-4 id 6-7 age 9-10;
run;
sas
add a comment |
up vote
0
down vote
favorite
here is a raw data file that I created using the program below.
I would like to know how to put the column grids (I am not sure what it is called so excuse me for using this name if incorrect)
that looks like
----|---10----|---20---
?
I am guessing that there should be an option that I can use but I could not find one in my text book (the text book shows as if the column grids are there by default)
I appreciate your help.
data a;
input name$ id age;
cards;
Ruth 39 11
Jose 32 22
Sue 30 33
John 40 44
;
run;
data _null_;
set a;
file 'C:UsersstardustDesktopemployee';
put name 1-4 id 6-7 age 9-10;
run;
sas
Don't forget that adding any content to a data file that is not data must be filtered out when read back in. If you are reviewing a data file it may be better to use a tool that shows a ruler, rather than changing the data.
– Richard
Nov 11 at 13:40
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
here is a raw data file that I created using the program below.
I would like to know how to put the column grids (I am not sure what it is called so excuse me for using this name if incorrect)
that looks like
----|---10----|---20---
?
I am guessing that there should be an option that I can use but I could not find one in my text book (the text book shows as if the column grids are there by default)
I appreciate your help.
data a;
input name$ id age;
cards;
Ruth 39 11
Jose 32 22
Sue 30 33
John 40 44
;
run;
data _null_;
set a;
file 'C:UsersstardustDesktopemployee';
put name 1-4 id 6-7 age 9-10;
run;
sas
here is a raw data file that I created using the program below.
I would like to know how to put the column grids (I am not sure what it is called so excuse me for using this name if incorrect)
that looks like
----|---10----|---20---
?
I am guessing that there should be an option that I can use but I could not find one in my text book (the text book shows as if the column grids are there by default)
I appreciate your help.
data a;
input name$ id age;
cards;
Ruth 39 11
Jose 32 22
Sue 30 33
John 40 44
;
run;
data _null_;
set a;
file 'C:UsersstardustDesktopemployee';
put name 1-4 id 6-7 age 9-10;
run;
sas
sas
asked Nov 11 at 8:11
hyg17
1638
1638
Don't forget that adding any content to a data file that is not data must be filtered out when read back in. If you are reviewing a data file it may be better to use a tool that shows a ruler, rather than changing the data.
– Richard
Nov 11 at 13:40
add a comment |
Don't forget that adding any content to a data file that is not data must be filtered out when read back in. If you are reviewing a data file it may be better to use a tool that shows a ruler, rather than changing the data.
– Richard
Nov 11 at 13:40
Don't forget that adding any content to a data file that is not data must be filtered out when read back in. If you are reviewing a data file it may be better to use a tool that shows a ruler, rather than changing the data.
– Richard
Nov 11 at 13:40
Don't forget that adding any content to a data file that is not data must be filtered out when read back in. If you are reviewing a data file it may be better to use a tool that shows a ruler, rather than changing the data.
– Richard
Nov 11 at 13:40
add a comment |
3 Answers
3
active
oldest
votes
up vote
1
down vote
accepted
I believe the "----|---10----|---20---" is just used as a teaching tool and is not an option or something that's done in practice.
In any case here's how you would do it. You could use the Macro system and macro this out, but I hard coded it.
data a;
input name$ id age;
cards;
Ruth 39 11
Jose 32 22
Sue 30 33
John 40 44
;
run;
data _null_;
set a;
file 'C:UsersstardustDesktopemployee';
If _N_ = 1 then do;
Put "----|---10----|---20---";
end;
put name 1-4 id 6-7 age 9-10;
run;
Good luck in your class.
Thank you! This is the closest thing to what I wanted to do and will work for now. Can you explain to me what the _ N _ is? I know that since it is in a IF =1 THEN DO END statement it will be executed no matter what.
– hyg17
Nov 11 at 18:40
_ N _ is a variable that is automatically made at the start of a data step. It's an internal counter of the number if times the date step has looped. Often it's used as a row counter.
– HekTron802
Nov 11 at 20:48
add a comment |
up vote
2
down vote
Perhaps you are looking for a way to examine your file?
Try using the LIST statement.
data _null_;
infile 'C:UsersstardustDesktopemployee';
input;
list;
run;
I am trying to have the raw data file to have the Ruler in it so that I can read it easily.
– hyg17
Nov 11 at 18:37
add a comment |
up vote
1
down vote
A COLS
line is known as a ruler line in other editors. This line is a user interface feature that is not kept during save or submit actions. As a UI feature you can not even copy the line into the clipboard buffer.
Add a comment line to your source that contains the ruler line.
data a;
input name$ id age;
* 3456789.123456789.1234567890.123456789.123456789. ;
cards;
Ruth 39 11
Jose 32 22
Sue 30 33
John 40 44
;
run;
Other rulers as source code comments
/* 456789.123456789.1234567890.123456789.123456789. */
%* 456789.123456789.1234567890.123456789.123456789. ;
* --|----10---|----20---|----30---|----40---|----50---| ;
%* -|----10---|----20---|----30---|----40---|----50---| ;
/*--|----10---|----20---|----30---|----40---|----50---| */
The comment can not be part of datalines
interior.
In the enhanced editor you can use menu Tools / Add abbreviation
to configure a phrase, that when typed, raises an IntelliSense style popup containing the ruler to be inserted.
Thank you for your help!
– hyg17
Nov 11 at 18:39
add a comment |
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
I believe the "----|---10----|---20---" is just used as a teaching tool and is not an option or something that's done in practice.
In any case here's how you would do it. You could use the Macro system and macro this out, but I hard coded it.
data a;
input name$ id age;
cards;
Ruth 39 11
Jose 32 22
Sue 30 33
John 40 44
;
run;
data _null_;
set a;
file 'C:UsersstardustDesktopemployee';
If _N_ = 1 then do;
Put "----|---10----|---20---";
end;
put name 1-4 id 6-7 age 9-10;
run;
Good luck in your class.
Thank you! This is the closest thing to what I wanted to do and will work for now. Can you explain to me what the _ N _ is? I know that since it is in a IF =1 THEN DO END statement it will be executed no matter what.
– hyg17
Nov 11 at 18:40
_ N _ is a variable that is automatically made at the start of a data step. It's an internal counter of the number if times the date step has looped. Often it's used as a row counter.
– HekTron802
Nov 11 at 20:48
add a comment |
up vote
1
down vote
accepted
I believe the "----|---10----|---20---" is just used as a teaching tool and is not an option or something that's done in practice.
In any case here's how you would do it. You could use the Macro system and macro this out, but I hard coded it.
data a;
input name$ id age;
cards;
Ruth 39 11
Jose 32 22
Sue 30 33
John 40 44
;
run;
data _null_;
set a;
file 'C:UsersstardustDesktopemployee';
If _N_ = 1 then do;
Put "----|---10----|---20---";
end;
put name 1-4 id 6-7 age 9-10;
run;
Good luck in your class.
Thank you! This is the closest thing to what I wanted to do and will work for now. Can you explain to me what the _ N _ is? I know that since it is in a IF =1 THEN DO END statement it will be executed no matter what.
– hyg17
Nov 11 at 18:40
_ N _ is a variable that is automatically made at the start of a data step. It's an internal counter of the number if times the date step has looped. Often it's used as a row counter.
– HekTron802
Nov 11 at 20:48
add a comment |
up vote
1
down vote
accepted
up vote
1
down vote
accepted
I believe the "----|---10----|---20---" is just used as a teaching tool and is not an option or something that's done in practice.
In any case here's how you would do it. You could use the Macro system and macro this out, but I hard coded it.
data a;
input name$ id age;
cards;
Ruth 39 11
Jose 32 22
Sue 30 33
John 40 44
;
run;
data _null_;
set a;
file 'C:UsersstardustDesktopemployee';
If _N_ = 1 then do;
Put "----|---10----|---20---";
end;
put name 1-4 id 6-7 age 9-10;
run;
Good luck in your class.
I believe the "----|---10----|---20---" is just used as a teaching tool and is not an option or something that's done in practice.
In any case here's how you would do it. You could use the Macro system and macro this out, but I hard coded it.
data a;
input name$ id age;
cards;
Ruth 39 11
Jose 32 22
Sue 30 33
John 40 44
;
run;
data _null_;
set a;
file 'C:UsersstardustDesktopemployee';
If _N_ = 1 then do;
Put "----|---10----|---20---";
end;
put name 1-4 id 6-7 age 9-10;
run;
Good luck in your class.
answered Nov 11 at 13:32
HekTron802
334
334
Thank you! This is the closest thing to what I wanted to do and will work for now. Can you explain to me what the _ N _ is? I know that since it is in a IF =1 THEN DO END statement it will be executed no matter what.
– hyg17
Nov 11 at 18:40
_ N _ is a variable that is automatically made at the start of a data step. It's an internal counter of the number if times the date step has looped. Often it's used as a row counter.
– HekTron802
Nov 11 at 20:48
add a comment |
Thank you! This is the closest thing to what I wanted to do and will work for now. Can you explain to me what the _ N _ is? I know that since it is in a IF =1 THEN DO END statement it will be executed no matter what.
– hyg17
Nov 11 at 18:40
_ N _ is a variable that is automatically made at the start of a data step. It's an internal counter of the number if times the date step has looped. Often it's used as a row counter.
– HekTron802
Nov 11 at 20:48
Thank you! This is the closest thing to what I wanted to do and will work for now. Can you explain to me what the _ N _ is? I know that since it is in a IF =1 THEN DO END statement it will be executed no matter what.
– hyg17
Nov 11 at 18:40
Thank you! This is the closest thing to what I wanted to do and will work for now. Can you explain to me what the _ N _ is? I know that since it is in a IF =1 THEN DO END statement it will be executed no matter what.
– hyg17
Nov 11 at 18:40
_ N _ is a variable that is automatically made at the start of a data step. It's an internal counter of the number if times the date step has looped. Often it's used as a row counter.
– HekTron802
Nov 11 at 20:48
_ N _ is a variable that is automatically made at the start of a data step. It's an internal counter of the number if times the date step has looped. Often it's used as a row counter.
– HekTron802
Nov 11 at 20:48
add a comment |
up vote
2
down vote
Perhaps you are looking for a way to examine your file?
Try using the LIST statement.
data _null_;
infile 'C:UsersstardustDesktopemployee';
input;
list;
run;
I am trying to have the raw data file to have the Ruler in it so that I can read it easily.
– hyg17
Nov 11 at 18:37
add a comment |
up vote
2
down vote
Perhaps you are looking for a way to examine your file?
Try using the LIST statement.
data _null_;
infile 'C:UsersstardustDesktopemployee';
input;
list;
run;
I am trying to have the raw data file to have the Ruler in it so that I can read it easily.
– hyg17
Nov 11 at 18:37
add a comment |
up vote
2
down vote
up vote
2
down vote
Perhaps you are looking for a way to examine your file?
Try using the LIST statement.
data _null_;
infile 'C:UsersstardustDesktopemployee';
input;
list;
run;
Perhaps you are looking for a way to examine your file?
Try using the LIST statement.
data _null_;
infile 'C:UsersstardustDesktopemployee';
input;
list;
run;
answered Nov 11 at 15:14
Tom
22.2k2718
22.2k2718
I am trying to have the raw data file to have the Ruler in it so that I can read it easily.
– hyg17
Nov 11 at 18:37
add a comment |
I am trying to have the raw data file to have the Ruler in it so that I can read it easily.
– hyg17
Nov 11 at 18:37
I am trying to have the raw data file to have the Ruler in it so that I can read it easily.
– hyg17
Nov 11 at 18:37
I am trying to have the raw data file to have the Ruler in it so that I can read it easily.
– hyg17
Nov 11 at 18:37
add a comment |
up vote
1
down vote
A COLS
line is known as a ruler line in other editors. This line is a user interface feature that is not kept during save or submit actions. As a UI feature you can not even copy the line into the clipboard buffer.
Add a comment line to your source that contains the ruler line.
data a;
input name$ id age;
* 3456789.123456789.1234567890.123456789.123456789. ;
cards;
Ruth 39 11
Jose 32 22
Sue 30 33
John 40 44
;
run;
Other rulers as source code comments
/* 456789.123456789.1234567890.123456789.123456789. */
%* 456789.123456789.1234567890.123456789.123456789. ;
* --|----10---|----20---|----30---|----40---|----50---| ;
%* -|----10---|----20---|----30---|----40---|----50---| ;
/*--|----10---|----20---|----30---|----40---|----50---| */
The comment can not be part of datalines
interior.
In the enhanced editor you can use menu Tools / Add abbreviation
to configure a phrase, that when typed, raises an IntelliSense style popup containing the ruler to be inserted.
Thank you for your help!
– hyg17
Nov 11 at 18:39
add a comment |
up vote
1
down vote
A COLS
line is known as a ruler line in other editors. This line is a user interface feature that is not kept during save or submit actions. As a UI feature you can not even copy the line into the clipboard buffer.
Add a comment line to your source that contains the ruler line.
data a;
input name$ id age;
* 3456789.123456789.1234567890.123456789.123456789. ;
cards;
Ruth 39 11
Jose 32 22
Sue 30 33
John 40 44
;
run;
Other rulers as source code comments
/* 456789.123456789.1234567890.123456789.123456789. */
%* 456789.123456789.1234567890.123456789.123456789. ;
* --|----10---|----20---|----30---|----40---|----50---| ;
%* -|----10---|----20---|----30---|----40---|----50---| ;
/*--|----10---|----20---|----30---|----40---|----50---| */
The comment can not be part of datalines
interior.
In the enhanced editor you can use menu Tools / Add abbreviation
to configure a phrase, that when typed, raises an IntelliSense style popup containing the ruler to be inserted.
Thank you for your help!
– hyg17
Nov 11 at 18:39
add a comment |
up vote
1
down vote
up vote
1
down vote
A COLS
line is known as a ruler line in other editors. This line is a user interface feature that is not kept during save or submit actions. As a UI feature you can not even copy the line into the clipboard buffer.
Add a comment line to your source that contains the ruler line.
data a;
input name$ id age;
* 3456789.123456789.1234567890.123456789.123456789. ;
cards;
Ruth 39 11
Jose 32 22
Sue 30 33
John 40 44
;
run;
Other rulers as source code comments
/* 456789.123456789.1234567890.123456789.123456789. */
%* 456789.123456789.1234567890.123456789.123456789. ;
* --|----10---|----20---|----30---|----40---|----50---| ;
%* -|----10---|----20---|----30---|----40---|----50---| ;
/*--|----10---|----20---|----30---|----40---|----50---| */
The comment can not be part of datalines
interior.
In the enhanced editor you can use menu Tools / Add abbreviation
to configure a phrase, that when typed, raises an IntelliSense style popup containing the ruler to be inserted.
A COLS
line is known as a ruler line in other editors. This line is a user interface feature that is not kept during save or submit actions. As a UI feature you can not even copy the line into the clipboard buffer.
Add a comment line to your source that contains the ruler line.
data a;
input name$ id age;
* 3456789.123456789.1234567890.123456789.123456789. ;
cards;
Ruth 39 11
Jose 32 22
Sue 30 33
John 40 44
;
run;
Other rulers as source code comments
/* 456789.123456789.1234567890.123456789.123456789. */
%* 456789.123456789.1234567890.123456789.123456789. ;
* --|----10---|----20---|----30---|----40---|----50---| ;
%* -|----10---|----20---|----30---|----40---|----50---| ;
/*--|----10---|----20---|----30---|----40---|----50---| */
The comment can not be part of datalines
interior.
In the enhanced editor you can use menu Tools / Add abbreviation
to configure a phrase, that when typed, raises an IntelliSense style popup containing the ruler to be inserted.
answered Nov 11 at 13:36
Richard
7,78721226
7,78721226
Thank you for your help!
– hyg17
Nov 11 at 18:39
add a comment |
Thank you for your help!
– hyg17
Nov 11 at 18:39
Thank you for your help!
– hyg17
Nov 11 at 18:39
Thank you for your help!
– hyg17
Nov 11 at 18:39
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53246918%2fhow-to-put-column-grids-in-a-raw-data-file%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Don't forget that adding any content to a data file that is not data must be filtered out when read back in. If you are reviewing a data file it may be better to use a tool that shows a ruler, rather than changing the data.
– Richard
Nov 11 at 13:40