|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|
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:
> INFILE MYFILE DSD DLM='*}' FLOWOVER END=TIRED;
> DO UNTIL (TIRED);
> INPUT PIECE @@ ;
>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
>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.
>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)