At October 6, 2005 01:08, concerning "Re: Summarize length of all 
variable length records in a file?", Barry Merrill <[EMAIL PROTECTED]
main.lst> wrote (to IBM-Main):   


> a. [snip] use DATA _NULL_, SUM statements to accumulate,
>     and a PUT the sum at the END= of the INFILE: 

> DATA _NULL_;
> INFILE test LENGTH=LENDATA END=END;
> INPUT ;
> DATA+LENDATA;
> DATARDW+(LENDATA+4);
> IF END THEN 
>     PUT  ' Data-only BYTES in file is ' DATA= /
>          ' Data and RDW bytes ' DATARDW=;
    
> [snip]

> DATA _NULL_;
> INFILE test LENGTH=LEN END=END RECFM=U BLKSIZE=32760;
> INPUT;
> BDW+LENBLOCK;
> IF END THEN PUT 'Total bytes in all blocks ' BDW=;

for those that are trying to get the SAS to work without prior 
knowledge of the language, the nigglers'll point out that RETAIN DATA 
DATARDW; and RETAIN BDW; are missing (actual location is irrelevant) 
from the respective DATA steps.  It's only a minor thing and doesn't 
affect the excellent concept(s) espoused.
---------->  signature = 6 lines follows <--------------
Neil Duffee, Joe SysProg, U d'Ottawa, Ottawa, Ont, Canada
telephone:1 613 562 5800 x4585                 fax:1 613 562 5161
mailto:NDuffee of uOttawa.ca     http:/ /aix1.uottawa.ca/ ~nduffee
"How *do* you plan for something like that?" Guardian Bob, Reboot
"For every action, there is an equal and opposite criticism."
"Systems Programming: Guilty, until proven innocent" John Norgauer 
2004

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to