Date: Sat, 23 Aug 2003 21:22:14 GMT
Reply-To: Anwar Kasam <akassam@COMCAST.NET>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Anwar Kasam <akassam@COMCAST.NET>
Organization: Comcast Online
Subject: Re: Download of MVS flat file
Use $CHAR2. instead of $2.
"Dan Schuster" <dan_schuster@MEDCOHEALTH.COM> wrote in message
> On Tue, 19 Aug 2003 14:06:43 -0400, Howard Schreier
> <Howard_Schreier@ITA.DOC.GOV> wrote:
> >A couple of ways to compensate, rather than prevent:
> >1. LRECL=148 PAD options on the INFILE statement.
> >2. TRUNCOVER option on the INFILE statement.
> >In either case code the "@147" before the "$2." in the INPUT statement.
> >On Tue, 19 Aug 2003 09:54:53 -0400, Dan Schuster
> ><dan_schuster@MEDCOHEALTH.COM> wrote:
> >>We have a flat file that we download using PC SAS v9.0 running under XP.
> >>The lrecl of the file is 148; he last field in the file is $2. @147.
> >>Sometimes the value of the this field is one character followed by a
> >>such as 'A ' and other times its two non space characters ('A1'). The
> >>problem is that if there is a space in the last postition it gets
> >>when downloading.
> >>Does anyone know how to prevent this from happening.
> A big thanks to everyone who responded. Here's the solution that I
> implemented from Howard:
> data work.mail_house;
> infile '\\mcfr1d29\n_drive\aims\p1424_non_responders\p1424.txt'
> missover obs=max lrecl=148 pad ;
> @001 FIRSTNAME $20.
> @021 MIDDLE $20.
> @041 LASTNAME $20.
> @061 ADDR1 $25.
> @086 ADDR2 $25.
> @111 CITY $25.
> @136 STATE $02.
> @138 ZIPCODE $05.
> @143 CARR_NO $04.
> @147 CELL $02.
> lastname =compbl(lastname);