Date: Mon, 21 Jul 2003 17:14:07 -0700
Reply-To: Biff Canlett <Biff@CANLETT.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Biff Canlett <Biff@CANLETT.COM>
Organization: http://groups.google.com/
Subject: Re: How to Find Record Length , dynamically , of an EBCDIC file,
within a DATASTEP
Content-Type: text/plain; charset=ISO-8859-1
I'm confused! I don't think you have supplied enough info for us to
help you. At first it sounds like the record length is 255, but then
you say it changes daily.
The easiest way to resolve this is if you can provide the record
definition that was used to create the file. If this is a MVS common
type file it will either have a fixed length, or an RDW at the
beginning of each record telling the record length.
I am guessing that it is a 255 byte fixed length file which you should
read with an input pointer {@}. If this file was downloaded from MVS
to Windows with most software, a CRLF record terminator would have
been added. If this doesn't help, reply with the source and target
OSs, and if possible with the code that created the record {a COBOL
copybook ?}.
easwar_ps@yahoo.com (Easwara Moorthy) wrote in message news:<dec29224.0307210331.6e4c7e77@posting.google.com>...
> Dear all,
> I'm facing a problem when reading an EBCDIC file with header
> record,no record seperator, and with 5 columns. the data starts at
> 256th position and the next record starts @ the next 256th position.
> How to solve this problem and have a dataset , with complete records
> in it!? also, the code given below reads the first record perfectly,
> but traversing to the next record is difficult for me, since there is
> no record seperator. And the LRECL=1000000 is a static value. I want
> to get the record length in runtime, since it may vary daily!
>
> TEST - EBCDIC file name(no Extension)
> '05'x - to read EBCDIC tab delimited file
>
> data file(drop=col);
> infile 'c:\TEST' dlm='05'x lrecl=1000000 ;
> col=256;
> input @col id : $EBCDIC16.
> cd : $EBCDIC2.
> report_dt : $EBCDIC10.
> tra_dt : $EBCDIC10.
> price : $EBCDIC10. @;
> run;
>
> Please Advice!
|