Previous Page | Next Page

SAS System Options

S2= System Option



Specifies the length of statements on each line of a source statement from a %INCLUDE statement, an autoexec file, or an autocall macro file.
Valid in: configuration file, SAS invocation, OPTIONS statement, SAS System Options window
Category: Input control: Data Processing
PROC OPTIONS GROUP= INPUTCONTROL

Syntax
Syntax Description
Details
Comparisons
See Also

Syntax

S2=S | n | nK | nM | nG | nT | MIN | MAX | hexX


Syntax Description

S

uses the current value of the S= system option to compute the record length of text that comes from a %INCLUDE statement, an autoexec file, or an autocall macro file.

n | nK | nM | nG | nT

specifies the length of the statements in a file that is specified in a %INCLUDE statement, an autoexec file, or an autocall macro file, in terms of 1 (bytes); 1,024 (kilobytes); 1,048,576 (megabytes); 1,073,741,824 (gigabytes); or 1,099,511,627,776 (terabytes). For example, a value of 8 specifies 8 bytes, and a value of 3m specifies 3,145,728 bytes.

hexX

specifies the length of statements as a hexadecimal number. You must specify the value beginning with a number (0 - 9), followed by an X. For example, the value 2dx sets the length of statements to 45.

MIN

sets the length of statements and data to 0.

MAX

sets the length of statements and data to 2,147,483,647.


Details

Input can be from either fixed-length or variable-length records. Both fixed-length and variable-length records can be sequenced or unsequenced. The location of the sequence numbers is determined by whether the file record format is fixed-length or variable-length.

SAS uses the value of S2 to determine whether to look for sequence numbers in the input, and to determine how to read the input:

Record Type Value of S2 SAS Looks for Sequence Numbers How SAS Reads The Input
Fixed-length S2>0 or S2=MAX No The value of S2 is used as the length of the source or data to be scanned and ignores everything beyond that length on each line.
Fixed-length S2=0 or S2=MIN Yes, at the end of the line of input. SAS inspects the last n columns (where n is the value of the SEQ= system option) of the first sequence field.

If those columns contain numbers, they are assumed to be sequence numbers and SAS ignores the last eight columns of each line.

If the n columns contain non-digit characters, SAS reads the last eight columns as data columns.

Variable-length S2>0 or S2=MAX No The value of S2 is used as the starting column of the source or data to be scanned and ignores everything before that length on each line.
Variable-length S2=0 or S2=MIN Yes, at the beginning of each line of input. SAS inspects the last n columns (where n is the value of the SEQ= system option) of the first sequence field.

If those columns contain numbers, they are assumed to be sequence numbers and SAS ignores the first eight columns of each line.

If the n columns contain non-digit characters, SAS reads the first eight columns as data columns.

Operating Environment Information:   The syntax that is shown here applies to the OPTIONS statement. On the command line or in a configuration file, the syntax is specific to your operating environment. For details, see the SAS documentation for your operating environment.  [cautionend]


Comparisons

The S2= system option operates exactly like the S= system option except that the S2= option controls input from a %INCLUDE statement, an autoexec file, or an autocall macro file.

The S2= system option reads both fixed-length and variable-length record formats from a file specified in a %INCLUDE statement, an autoexec file, or an autocall macro file. The S2V= system option reads only a variable-length record format from a file specified in a%INCLUDE statement, an autoexec file, or an autocall macro file.


See Also

System Options:

S= System Option

S2V= System Option

SEQ= System Option

Previous Page | Next Page | Top of Page