Newbie with SAS

  • Follow


I'm working in a IBM Mainframe environment and need some help with
SAS. I'm reading a file with 17 million records. I'm using the
following
DATA _NULLS_;
INFILE IN1;
INPUT @001   ORI     $CHAR7.
      @015   TYP     $CHAR2.
      @017   STYP    $CHAR2.
      @019   FUNC    $CHAR1.
      @021   DAT     $CHAR8.
      @091   EMPTY   $CHAR2.;
IF TYP ='04';
IF STYP NOT='08';
FILE OUT1;
PUT _INFILE_;

I'm getting an error/abend 'File is full and may be damaged'. I
thought _NULLS_ does not create a SAS data set. All I want to do is
read, satisfy the condition and write the record creating a new file.
I do not want to create a SAS dataset.
0
Reply JulesB 12/24/2010 3:40:41 PM

Jules,

Try it with:
DATA _NULL_;
rather than:  DATA _NULLS_;

You may also have to add some options to your infile statement, but
I'd first see what the effects of the above change make.

Art
------------
On Dec 24, 10:40=A0am, JulesB <giuliobelra...@gmail.com> wrote:
> I'm working in a IBM Mainframe environment and need some help with
> SAS. I'm reading a file with 17 million records. I'm using the
> following
> DATA _NULLS_;
> INFILE IN1;
> INPUT @001 =A0 ORI =A0 =A0 $CHAR7.
> =A0 =A0 =A0 @015 =A0 TYP =A0 =A0 $CHAR2.
> =A0 =A0 =A0 @017 =A0 STYP =A0 =A0$CHAR2.
> =A0 =A0 =A0 @019 =A0 FUNC =A0 =A0$CHAR1.
> =A0 =A0 =A0 @021 =A0 DAT =A0 =A0 $CHAR8.
> =A0 =A0 =A0 @091 =A0 EMPTY =A0 $CHAR2.;
> IF TYP =3D'04';
> IF STYP NOT=3D'08';
> FILE OUT1;
> PUT _INFILE_;
>
> I'm getting an error/abend 'File is full and may be damaged'. I
> thought _NULLS_ does not create a SAS data set. All I want to do is
> read, satisfy the condition and write the record creating a new file.
> I do not want to create a SAS dataset.

0
Reply art297 12/24/2010 5:00:49 PM


On Dec 24, 12:00=A0pm, art297 <atabachn...@gmail.com> wrote:
> Jules,
>
> Try it with:
> DATA _NULL_;
> rather than: =A0DATA _NULLS_;
>
> You may also have to add some options to your infile statement, but
> I'd first see what the effects of the above change make.
>
> Art
> ------------
> On Dec 24, 10:40=A0am, JulesB <giuliobelra...@gmail.com> wrote:
>
>
>
> > I'm working in a IBM Mainframe environment and need some help with
> > SAS. I'm reading a file with 17 million records. I'm using the
> > following
> > DATA _NULLS_;
> > INFILE IN1;
> > INPUT @001 =A0 ORI =A0 =A0 $CHAR7.
> > =A0 =A0 =A0 @015 =A0 TYP =A0 =A0 $CHAR2.
> > =A0 =A0 =A0 @017 =A0 STYP =A0 =A0$CHAR2.
> > =A0 =A0 =A0 @019 =A0 FUNC =A0 =A0$CHAR1.
> > =A0 =A0 =A0 @021 =A0 DAT =A0 =A0 $CHAR8.
> > =A0 =A0 =A0 @091 =A0 EMPTY =A0 $CHAR2.;
> > IF TYP =3D'04';
> > IF STYP NOT=3D'08';
> > FILE OUT1;
> > PUT _INFILE_;
>
> > I'm getting an error/abend 'File is full and may be damaged'. I
> > thought _NULLS_ does not create a SAS data set. All I want to do is
> > read, satisfy the condition and write the record creating a new file.
> > I do not want to create a SAS dataset.- Hide quoted text -
>
> - Show quoted text -

Thanks ART297

That worked!
0
Reply JulesB 12/24/2010 6:20:20 PM

2 Replies
319 Views

(page loaded in 0.039 seconds)


Reply: