×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Linesize limit question

Linesize limit question

Linesize limit question

(OP)
Hello

I'm trying to read in a file and the linesize is 1872 characters wide. I tried setting the linesize in the options section (linesize=1872) and under infile (infile in lrecl=1872)

But when it prints the record its broken up into multiple sections instead of one nice long record set.

If anyone can help it would be appreciated.

Thanks in advance!

RE: Linesize limit question

I have always thought that Linesize was only used for output files and was limited to 256... but everyone uses SAS differently.

Depending on the version of SAS there are some character size limitations too.  At one point you could only read in 200 chars into any one var.

Any reason you have to read in the whole record into one variable and that you could not read in just the pieces that you want?

Here is a sample from when I worked in SAS 6 & 7.

ex:
 DATA FILEA   <=== SAS TEMP NAME
 INFILE INPUT; <=== JCL FILE NAME OR INPUT FROM OTHER SOURCE
  INPUT @1   VAR1     $CHAR9.   
/* NINE CHARACTERS */
        @10  VAR2     IB2.0     
/* FIXED BINARY 15 */
        @12  VAR3     ZD5.3     
/*CHARACTER NUMERIC DATA - FIVE CHARS &
  3 ARE TO THE RIGHT OF THE DECIMAL */
        @17  VAR4     PD5.3
/* PACKED NUMERIC DATA - LIKE FIXED DEC
   THIS EX IS SIX CHARACTERS ***NOT NUMS
   AND THE LAST THREE ARE RIGHT OF DEC
   POINT.  PLI DECLARE IS FD(6,3) */
        @830 VAR5     $CHAR200. @;
 /* SAS LIMITATION TO 200 BYTES FOR
    FOR A VARIABLE.  NOTE THE PERIOD
    AT THE END OF THE CHARACTER DEFINE
    ALSO NOTE @; WHICH MEANS END OF
    RECORD.  THIS WILL PREVENT SAS
    FROM GOING TO THE NEXT RECORD */

RE: Linesize limit question

(OP)
I'm sure if that answered my question thought it is something i will keep in mind.

When ever the record set is printed, the record set gets broken up into multiple lines. Now the record set is 1800 characters wide, is SAS limited to how many characters each line may hold, for example 256 when it prints?

Thanks again!

RE: Linesize limit question

THe values of the LINESIZE = option are limited to the ranges from 64 to 256:


--------------------------------------------------------------------------------
 
Syntax
LINESIZE=n| nK | nM | nG | MIN | MAX | hex  


Syntax Description

n | nK | nM | nG
specifies the number of buffers in multiples of 1, 1,000, 1,000,000, and 1, 000,000,000, respectively.

MIN
sets the line size of the SAS procedure output to 64.

MAX
sets the line size of the SAS procedure output to 256.

hex
specifies the line size of the SAS procedure output as a hexadecimal number. This number must be followed by an X.

I am not surer why you need to change linesize to a number greater than 256. If you need to have a file with 1872 characters wide, use data step to output a flat file with lrecl=1872 option in your file statement.

RE: Linesize limit question

(OP)
By having a linesize greater than 256 i hope to avoid having the record set broken up into multiple lines when i print. Any idea how i can do that? you suggested on a previous post that i should output to a flat file, but i have no idea of how i should do that.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close