Help using Base SAS procedures

a simple PRINT proc with one obs/page

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 89
Accepted Solution

a simple PRINT proc with one obs/page

hi folks,

is there some kind of PROC or options for PROC PRINT/REPORT to have a FSEDIT like ouput (this is 1 obs per page) ?

so you have a quick look on all vars of one obs on one page!!

GreetZ,

Hermie


Accepted Solutions
Solution
‎06-28-2012 06:47 AM
Respected Advisor
Posts: 3,799

Re: a simple PRINT proc with one obs/page

 

proc fsbrowse printall data=sashelp.class;

   run;

View solution in original post


All Replies
Respected Advisor
Posts: 4,173

Re: a simple PRINT proc with one obs/page

You can always set the page size to 1line:

Options ps=1;

Solution
‎06-28-2012 06:47 AM
Respected Advisor
Posts: 3,799

Re: a simple PRINT proc with one obs/page

 

proc fsbrowse printall data=sashelp.class;

   run;

Frequent Contributor
Posts: 89

Re: a simple PRINT proc with one obs/page

Posted in reply to data_null__

hi data _null_;

nearly perfect Smiley Happy

on screen sas organizes all  vars so they can been seen on one screen. (in order from top to bottom and left to right).

with your example, on paper, sas puts all vars below each other so we can have an overflow :smileycry:

do you have a solution for this too?

GreetZ,

Herman

Respected Advisor
Posts: 3,799

Re: a simple PRINT proc with one obs/page

You may be able to get something better looking with the options below.  Or create a custom SCREEN.  I haven't done this is 20 years, about all I remember is what I put in my first post.

display-options

provide control over the appearance of the FSEDIT window. All of the following options except NOBORDER and NR= are ignored if an existing SCREEN entry is specified with the SCREEN= option.

LABEL
NC=n
NOBORDER
NR=n
STCOL=n
STROW=n
TAB=n
Frequent Contributor
Posts: 95

Re: a simple PRINT proc with one obs/page

You can do that with a proc report statement.

Need a variable to break records row by row.

In this example, Idx varianble is used to break report one page per observation but not shown in the output.

data x;

  set sashelp.class;

  Idx + 1;

run;

proc report data=x nowd missing;

  column Idx Name Sex Age Height Weight;

  define Idx / order noprint;

  define Name / display;

  define Sex / display;

  define Age / display;

  define Height / display;

  define Weight / display;

  break after Idx / page;

run;

Super User
Posts: 10,023

Re: a simple PRINT proc with one obs/page

How about:

data _null_;
 set sashelp.class;
 put (_all_) (=);
 put _page_;
run;


Ksharp

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 6 replies
  • 314 views
  • 2 likes
  • 5 in conversation