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 1999, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Sat, 19 Jun 1999 13:48:00 +0100
Reply-To:   Peter Crawford <Peter@CRAWFORDSOFTWARE.DEMON.CO.UK>
Sender:   "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:   Peter Crawford <Peter@CRAWFORDSOFTWARE.DEMON.CO.UK>
Subject:   Re: Reading EDI Transaction Sets in SAS--DSD and FLOWOVER
In-Reply-To:   <15C9395592CFD011AD1900805FEAD7FD04E15B34@exchange02.comp.pge.com>

Berryhill, Timothy <TWB2@PGE.COM> writes >Is anyone reading EDI transaction sets in SAS? > >The ones I am getting are logically variable length records with arbitrary >delimiters (* between fields, } between segments, but the exact values are >not important and may vary from file to file). The files are physically >fixed length records. On small machines, there is a '0D'x or a '0D0A'x (a >carriage return or a carriage return line feed) after every 80 characters, >and on the mainframe the file is just a fixed length record file with a >length of 80. Field values may wrap from one line to the next. > >I am attempting to read the file with code similar to: >DATA RAW; > INFILE MYFILE DSD DLM='*}' FLOWOVER END=TIRED; > DO UNTIL (TIRED); > INPUT PIECE @@ ; > OUTPUT; > END; >RUN; > >The problem is that despite both the explicit DLM= option and the FLOWOVER >option, the end of the line is treated as a delimiter. Field values which >wrap to a new line are picked up in two parts, rather than as a single >piece. > >I am trying something using the COLUMN= option, but the column pointer goes >to 81 whether the character in column 80 is a delimiter or not. I may have >to compare the change in the column pointer to the length of the peice >returned--but the pieces can have trailing blanks which LENGTH will ignore. > >Any suggestions? > >Tim Berryhill - Contract Programmer and General Wizard >TWB2@PGE.COM or http://www.aartwolf.com/twb.html >Frequently at Pacific Gas & Electric Co., San Francisco >The correlation coefficient between their views and >my postings is slightly less than 0

If you can't read that file as dsorg=FS (fixed(80) but Spanning) which should encourage SAS to flow through the data ignoring the line-endings, you could try doing a binary download and use the EBCDIC. and S370Fxxx. informats to replace the EBCDIC to ASCII translation. If that data file is downloaded as binary, it may respect your wishes, and NOT insert line ending characters.

-- Peter Crawford (just back from SEUGI V8 is looking gr-8 and ODS is anything but odious)


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