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;









share|improve this question





















  • 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














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;









share|improve this question





















  • 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












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;









share|improve this question













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






share|improve this question













share|improve this question











share|improve this question




share|improve this question










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
















  • 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












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.






share|improve this answer




















  • 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


















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;


enter image description here






share|improve this answer




















  • 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

















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.






share|improve this answer




















  • Thank you for your help!
    – hyg17
    Nov 11 at 18:39










Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















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

























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.






share|improve this answer




















  • 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















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.






share|improve this answer




















  • 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













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.






share|improve this answer












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.







share|improve this answer












share|improve this answer



share|improve this answer










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

















  • 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













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;


enter image description here






share|improve this answer




















  • 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














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;


enter image description here






share|improve this answer




















  • 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












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;


enter image description here






share|improve this answer












Perhaps you are looking for a way to examine your file?



Try using the LIST statement.



data _null_;
infile 'C:UsersstardustDesktopemployee';
input;
list;
run;


enter image description here







share|improve this answer












share|improve this answer



share|improve this answer










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
















  • 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










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.






share|improve this answer




















  • Thank you for your help!
    – hyg17
    Nov 11 at 18:39














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.






share|improve this answer




















  • Thank you for your help!
    – hyg17
    Nov 11 at 18:39












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.






share|improve this answer












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.







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 11 at 13:36









Richard

7,78721226




7,78721226











  • 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




Thank you for your help!
– hyg17
Nov 11 at 18:39

















draft saved

draft discarded
















































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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

Top Tejano songwriter Luis Silva dead of heart attack at 64

ReactJS Fetched API data displays live - need Data displayed static

Evgeni Malkin