multiple lengths statement

Reply
Occasional Contributor
Posts: 13

multiple lengths statement

Hello,

What would cause the warning

  WARNING: Multiple lengths were specified for the variable EYEL by input data set(s). This may

cause truncation of data

and how would I fix it....is this just a warning or a true error?

thx

Respected Advisor
Posts: 4,920

Re: multiple lengths statement

Posted in reply to diva_di_dati

Please post the code that generated the warning.

PG

PG
Occasional Contributor
Posts: 13

Re: multiple lengths statement

thank you.....there are two error statements I get...I have also enclosed the log

Attachment
Attachment
Respected Advisor
Posts: 4,920

Re: multiple lengths statement

Posted in reply to diva_di_dati

You should try to fix :

300434  %mrx(DA); *DA for Disabled adults;

            -

            180

ERROR 180-322: Statement is not valid or it is used out of proper order.

first. I can't see the cause of that error. Fixing that ERROR might very well fix the other WARNINGS. I hope somebody else can help you further.

PG

PG
Occasional Contributor
Posts: 13

Re: multiple lengths statement

Posted in reply to diva_di_dati

the log and code are in queue to get sent to you

Super User
Posts: 5,499

Re: multiple lengths statement

Posted in reply to diva_di_dati

diva_di_dati,

You'll get this message when three conditions are met:

1. Your DATA step contains a BY statement

2. One of your BY variables (in this case EYEL) has different lengths in the incoming data sets

3. The data set containing the shorter length is mentioned first, establishing the length of EYEL.

In that case, the values of EYEL from the other data set(s) will be truncated down to the length established by the first data set.

That will be no problem if all you are truncating are blanks.  In every other case, you will encounter problems, the very least of which is that some values will be truncated.  Some of the outcomes can be quite more bizarre than that.  It is a relatively easy error to fix.  You can insert a LENGTH statement right after the DATA statement, defining EYEL as having the proper length (the longest one from any of the incoming data sets).

Good luck.

Good luck.

Ask a Question
Discussion stats
  • 5 replies
  • 352 views
  • 8 likes
  • 3 in conversation