BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
IanW
Calcite | Level 5

Hi,

 

How do I print the full contents of the infile?

 

//FILE DD DISP=SHR,DSN=ABCD.TSS7
//SYSIN DD *

DATA abc;

OPTIONS PAGESIZE = 9999;
INFILE FILE end=EOF missover ;
input ;

options pageno=1;
proc printto print=recpdtl;

proc print data=abc noobs;
RUN;

1 ACCEPTED SOLUTION

Accepted Solutions
data_null__
Jade | Level 19

Maybe this will help you.

 

filename FT15F001 temp;
parmcards;
this is a file
it has two lines
;;;;

data _null_;
   file PRINT;
   infile FT15F001;
   input;
   put _infile_;
   run;

View solution in original post

2 REPLIES 2
data_null__
Jade | Level 19

Maybe this will help you.

 

filename FT15F001 temp;
parmcards;
this is a file
it has two lines
;;;;

data _null_;
   file PRINT;
   infile FT15F001;
   input;
   put _infile_;
   run;
Astounding
Opal | Level 21

For wide files, I like to use a variation on that:

 

DATA _null_;
INFILE FILE ;
input @;
list;
run;

The LIST statement will give you a ruler and make it easier to see how the characters within the raw data file line up.  It will print in HEX format which makes it easier to detect special characters such as tabs.

 

Also note that it's easy to add to the DATA step along these lines:

 

if _n_ > 20 then stop;

 

You don't need to print the entire file if printing 20 lines is good enough.

SAS INNOVATE 2024

innovate-wordmarks-white-horiz.png

SAS is headed back to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team.

Interested in speaking? Content from our attendees is one of the reasons that makes SAS Innovate such a special event!

Submit your idea!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 353 views
  • 1 like
  • 3 in conversation