LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (June 2003, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Sun, 15 Jun 2003 12:12:50 +0100
Reply-To:     Roland <roland@RASHLEIGH-BERRY.FSNET.CO.UK>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Roland <roland@RASHLEIGH-BERRY.FSNET.CO.UK>
Subject:      Re: Traversing av file for occurences of CRLF and giving a message

Try http://www.datasavantconsulting.com/roland/hexchars.sas instead

"Roland" <roland@rashleigh-berry.fsnet.co.uk> wrote in message news:bchicj$43c$1@news6.svr.pol.co.uk... > You could use this macro > http://www.datasavantconsulting.com/roland/asciinonp.sas > > That will show you these "0D"x characters. But you will have to increase the > input line length to more than 200. Come to think of it, that macro is due > for a rewrite anyway. > > "Rune Runnestoe" <rune@fastlane.no> wrote in message > news:24410121.0306150231.65c68f84@posting.google.com... > > Hello, > > I want the code to traverse a file and tell med if CRLF is in any > > records of the file or not. The beginning of each record is eithet 'S > > 19' or 'S 20'. The records of the file don't vary in length. The > > record lengdth is 280. > > I am just interested in the existence of CRLF, not how many times it > > occurs. > > I don't want to count the CRLF in position 281 and 282, it they exist. > > > > The following code is not quite right: > > > > filename sak "D:\SAK.DAT"; > > > > data _null_; > > infile sak recfm=N ; > > input a $char1.; > > if a eq '0d'x then > > do; > > input a $char1. ; * get next character ; > > if a eq '0a'x then > > do; > > input a $char1. ; > > if a eq 'S 19' or a eq 'S 20' then > > null; > > else > > status='CRLF exists in SAK.DAT'; > > end; > > else > > null; /* '0d'x not followed by '0a'x */ > > end; > > run; > > > > proc print; > > var status; > > end; > > > > > > Can anyone help me getting the code right ? > > > > Regards > > > > Rune Runnestoe > >


Back to: Top of message | Previous page | Main SAS-L page