View previous topic :: View next topic
|
Author |
Message |
dkaster
New User
Joined: 21 Mar 2011 Posts: 2 Location: USA
|
|
|
|
I need to verify record counts and accum totals on fields is a series of mainframe flat files, and all I have available is SAS. I'm able to print and accum an entire file, but only want and need to see the bottom line (not the millions of individual records). I've been through "dummies", but it (and the SAS site) only covers the online app and statistics. Can anyone help?? |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
Code: |
DATA _NULL_;
INFILE DDIN END=EOF;
INPUT ;
NRECS + 1;
IF EOF
THEN DO;
FILE PRINT;
PUT 'RECORD COUNT = ' NRECS COMMA10.;
END;
|
Use _NULL_ to not create a SAS data set. DDIN is the DD name for the input file. If you just want a count, don't input any variables but if you need field counts, change the INPUT statement appropriately. The END= sets a variable to TRUE when the end of the input file is reached. |
|
Back to top |
|
|
dkaster
New User
Joined: 21 Mar 2011 Posts: 2 Location: USA
|
|
|
|
Great, just what I needed - thanks! |
|
Back to top |
|
|
|