Calls any BMDP program to analyze data in a SAS data set
BMDP is a library of statistical analysis
programs maintained by BMDP Statistical Software Inc. Use the BMDP procedure
in SAS programs to
Note:
The BMDP procedure is available for the AIX,
HP-UX,
and Solaris operating environments only.
You can analyze SAS data sets with BMDP programs by
invoking this procedure. You can use the BMDP procedure any number of times
to invoke BMDP. Before using the BMDP procedure, you must have access to the
BMDP programs from your host because the procedure invokes them. Ask your
system administrator for the location of the BMDP programs. To use the BMDP
procedure, first specify the name of the BMDP program you want to invoke in
the PROC BMDP statement. The VAR and BY statements can follow, although they
are optional. The BMDP control statements follow the PARMCARDS statement.
To analyze BMDP data with the SAS System, create a BMDP
save file in a BMDP program and then convert the save file to a SAS data set
with the CONVERT procedure or use the BMDP engine. See The BMDP Engine for
more information on the BMDP engine.
The following options can be used in the PROC BMDP statement:
-
CODE=save-file
-
assigns a name to the BMDP save file
that the BMDP procedure creates from a SAS data set. The save-file corresponds to the CODE sentence in the BMDP INPUT paragraph.
For example, if you use the following statement the BMDP INPUT paragraph
must contain
CODE='JUDGES':
proc bmdp prog=bmdp3s code=judges;
CODE= is usually not necessary in the PROC BMDP statement.
When CODE= is not specified, the name of the BMDP save file is the SAS data
set name.
If you are converting a SAS data set to a BMDP save
file, name the save file in the CODE sentence of the BMDP INPUT paragraph.
To use the name of the SAS data set, specify that name in the CODE sentence.
If you use a different name, it must match the name supplied in the CODE=
option.
-
CONTENT=DATA|CORR|FREQ|MEAN
-
lets BMDP know if your SAS data set
is a standard SAS data set (CONTENT=DATA) or if it contains a correlation
matrix (CORR), variable means (MEAN), or frequency counts (FREQ). You need
not specify the CONTENT= option for specially structured SAS data sets that
were created by other SAS procedures. If you omit the CONTENT= option, the
data set's TYPE value is used.
Note:
BMDP may use a
structure for special data sets (for example, a correlation matrix) that is
different from the SAS structure. Be sure that the input SAS data set is
in the form that BMDP expects. ![[cautend]](../common/images/cautend.gif)
-
DATA=SAS-data-set
-
specifies the SAS data set that you
want the BMDP program to process. If you do not specify the DATA= option,
PROC BMDP uses the most recently created SAS data set.
-
INPUTFILE=filename
-
indicates the file in which the procedure
will place the converted BMDP save file. It should match the name used in
the INPUT paragraph of the BMDP control language.
-
LABEL=variable
-
specifies a variable whose values
are to be used as case labels for BMDP. Only the first four characters of
the values are used. The LABEL= variable must also be included in the VAR
statement, if you use one.
-
LABEL2=variable
-
specifies a variable whose values
are to be used as second case labels for BMDP; as with the LABEL= option,
only the first four characters are used. The LABEL2= variable must also be
given in the VAR statement, if you use one.
-
NOMISS
-
specifies that you want the BMDP
program or save file to exclude observations with missing values.
-
PROG=BMDPnn
-
specifies the BMDP program that you
want to run. For example, the following PROC BMDP statement runs the BMDP3S
program:
proc bmdp prog=bmdp3s;
Note:
If you only want to convert a SAS data set to a BMDP save file and do not
want to run a BMDP program, omit the PROG= option and include the UNIT= option. ![[cautend]](../common/images/cautend.gif)
-
UNIT=n
-
specifies the FORTRAN logical unit
number for the BMDP save file that the BMDP procedure creates. The value
that you specify for n must correspond to the
UNIT value specified in the INPUT paragraph of the BMDP control language.
If you omit this option, n
defaults to 3 and FT03F001 is used as the fileref for the save file. The
following message is also printed:
Note:
The
UNIT= option was not specified. Unlike Version 5, the UNIT= option is required.
Therefore, UNIT=3 is assumed. Ensure that the INPUT paragraph uses UNIT=3,
or explicitly specify the correct UNIT value.
-
WRKSPCE=nn|PARM=nn
-
controls the allocation of a workspace
in BMDP. The WRKSPCE= or PARM= value is passed as a parameter to BMDP programs
and corresponds to the WRKSPCE= feature in BMDP MVS cataloged procedures.
The default value for nn is 30.
The VAR statement specifies the
variables to be used
in the BMDP program. When you do not include a VAR statement, the BMDP program
uses all the numeric variables in the SAS data set.
Use the BY statement with the BMDP
procedure to obtain
separate analyses on observations in groups that are defined with the BY variables.
When you use a BY statement, the procedure expects the input data set to
be sorted in order of the BY variables or to have an appropriate index. If
your input data set is not sorted in ascending order, you can do one of the
following:
If a BY statement is used, it is printed with the BMDP
printed output to distinguish the BY group output.
For more information on the BY statement, see
SAS Language Reference: Dictionary.
The PARMCARDS statement signals that the BMDP
control
language follows.
Put your BMDP control language after the
PARMCARDS statement.
These are similar for all BMDP programs; see the most current BMDP manual
for information on their forms and functions.
The BMDP INPUT paragraph must include UNIT and CODE
sentences. Their values must match the UNIT= and CODE= values given in the
PROC BMDP statement. (If the PROC BMDP statement does not specify a UNIT=
value, use 3 as the UNIT= value in the BMDP statements.) Use the SAS data
set name as the CODE value unless you have specified a different name with
the CODE= option in the PROC BMDP statement. Omit the VARIABLES paragraph
from the BMDP statements because it is not needed when your input is a save
file.
Before the BMDP procedure
sends data to
BMDP, it converts missing SAS values to the standard BMDP missing value.
When you use the NOMISS option in the PROC BMDP statement, observations with
missing values are not sent to the BMDP program.
Some
BMDP programs, such as the ones
for nonlinear regression, need to invoke the FORTRAN compiler and linkage
editor before executing. All BMDP compilation and link editing must be completed
before you use PROC BMDP.
The following code converts the BMDP save file BOUT to
the SAS data set FROMBMDP.
data temp;[1]
input a b c;
cards;
datalines;
1 2 3
4 5 6
7 8 9
;
run;
proc contents;[2]
title 'CONTENTS OF SAS DATA SET TO BE
RUN THROUGH BMDP1D';
run;
options parmcards=bmdpcntl;[3]
filename bmdpcntl 'bmdp.inp';
proc bmdp prog=bmdp1d data=temp
inputfile='temp.dat';[4]
parmcards;
/prob title='SHOW SAS/BMDP INTERFACE'.
/input file='temp.dat'. code='TEMP'.
/save code='BOUT'. new. file='bout.dat'.
/end
/finish
;
run;
filename fromfile 'bout.dat';[5]
proc convert bmdp=fromfile out=frombmdp;
run;
proc contents;[6]
title 'SAS DATA SET CONVERTED FROM BMDP
SAVE FILE';
run;
proc print;
run;
-
The BMDP Engine
-
CONVERT
-
Dixon, W.D.; Brown, M.B.; Engleman, L.; Frane,
J.W.; Hill, M.A.; Jennrich, R.I.; and Toporek, J.D., eds. (1981), BMDP Statistical Software, Los Angeles: University of California
Press.
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.