Chapter Contents |
Previous |
Next |
BMDP |
OS/390 specifics: | all |
Syntax |
PROC BMDP
<options>;
|
Details |
BMDP is a library of statistical analysis programs that were originally developed at the UCLA Health Sciences Computing Facility. Use the BMDP procedure in SAS programs to:
In order to use the BMDP procedure in a SAS session, the JCL EXEC statement must request the cataloged procedure SASBMDP rather than the usual cataloged procedure SAS. If the SASBMDP cataloged procedure is not available on your computer system, or if it has a different name, ask your computing center staff to help you set it up. Your SAS Installation Representative has the SAS System installation instructions, which include directions for setting up the procedure.
You can use BMDP programs to analyze SAS data sets by invoking this procedure. To analyze BMDP data with the SAS System, create a BMDP "save" file in a BMDP program, and then use the SAS CONVERT procedure or the BMDP engine to convert the "save" file to a SAS data set. (See Introduction for more information about the BMDP engine.) You can use the BMDP procedure any number of times in a SAS job to invoke BMDP.
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, but they are optional. The BMDP control statements follow the PARMCARDS statement.
PROC BMDP Statement |
PROC BMDP <options>; |
The following options can be used in the PROC BMDP statement:
proc bmdp prog=bmdp3s code=judges;
Then, the BMDP INPUT paragraph must contain the following sentence:
CODE='JUDGES'
CODE= usually is 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, include the CODE sentence in the BMDP INPUT paragraph to name the "save" file. To use the name of the SAS data set, specify that name in the BMDP INPUT paragraph. If you use a different name, it must match the name that is supplied in the CODE= option.
Note: BMDP may use
a structure for special data sets (for example, a correlation matrix) that
is different from the SAS structure. Ensure that the input SAS data set is
in the form that BMDP expects.
proc bmdp prog=bmdp3s;
Note: If you want only
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, which is described
next.
If you omit this option, n defaults to 3 and FT03F001 is used as the fileref for the "save" file.
VAR Statement |
VAR variables; |
The VAR statement specifies which variables to use 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.
BY Statement |
BY variables; |
Use the BY statement with the BMDP procedure to obtain separate analyses of observations in groups. The groups 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 the following:
If a BY statement is used, it is included in the BMDP printed output to distinguish the BY group output.
For more information about the BY statement, see SAS Language Reference: Dictionary.
PARMCARDS Statement |
PARMCARDS; |
The PARMCARDS statement indicates that the BMDP control language follows.
BMDP Control Statements |
The BMDP INPUT paragraph must include UNIT and CODE sentences. The values of these sentences must match the UNIT= and CODE= values that are given in the PROC BMDP statement. (If the PROC BMDP statement does not specify a UNIT= value, then use 3 as the UNIT= value in the BMDP statements.) Use the SAS data set name as the CODE value unless you have used the CODE= option in the PROC BMDP statement to specify a different name. Omit the VARIABLES paragraph from the BMDP statements, because it is not needed when your input is a "save" file.
How Missing Values Are Handled |
Invoking BMDP Programs That Need FORTRAN Routines |
Example of Creating and Converting a BMDP Save File |
Here is an example of creating and converting a BMDP "save" file.
[1] data temp; input x y z; datalines; 1 2 3 4 5 6 7 8 9 10 11 12 run; [2] proc contents; title 'CONTENTS OF SAS DATA SET TO BE RUN THROUGH BMDP1D'; run; [3] proc bmdp prog=bmdp1d unit=3; parmcards; /input unit=3. code='TEMP'. /print min. /save unit=4. code='NEW'. NEW. /end /finish run; [4] libname ft04f001 bmdp; [5] data _null_; set ft04f001.new; put _all_; run; [6] proc contents data=ft04f001._all_; run; [7] proc convert bmdp=ft04f001 out=xyz;
The numbered lines of code are explained here:
Note the BMDP program statements UNIT=3. and CODE='TEMP'. The results are stored in the BMDP "save" file, NEW.
The word NEW must be in the SAVE paragraph. UNIT=nn should refer to the FTnnF001 fileref that was defined in your DD statement.
The output from this SAS program is shown in NEW Save File Created from Data Set TEMP and Converted to SAS Data Set XYZ, Part 1 of 3.
NEW Save File Created from Data Set TEMP and Converted to SAS Data Set XYZ, Part 1 of 3
1 CONTENTS OF SAS DATA SET TO BE RUN THROUGH BMDP1D The CONTENTS Procedure ... -----Alphabetic List of Variables and Attributes----- # Variable Type Len Pos ----------------------------------- 1 X Num 8 0 2 Y Num 8 8 3 Z Num 8 16 ... PAGE 1 1D BMDP1D - SIMPLE DATA DESCRIPTION COPYRIGHT 1977, 1979, 1981, 1982, 1983, 1985, 1987, 1988, 1990 BY BMDP STATISTICAL SOFTWARE, INC. BMDP STATISTICAL SOFTWARE, INC.| BMDP STATISTICAL SOFTWARE 1440 SEPULVEDA BLVD | CORK TECHNOLOGY PARK, MODEL FARM RD LOS ANGELES, CA 90025 USA | CORK, IRELAND PHONE (213) 479-7799 | PHONE +353 21 542722 FAX (213) 312-0161 | FAX +353 21 542822 TELEX 4972934 BMDP UI | TELEX 75659 SSWL EI VERSION: 1990 (IBM/OS) DATE: APRIL 27, 1999 AT 14:27:43 MANUAL: BMDP MANUAL VOL. 1 AND VOL. 2. DIGEST: BMDP USER'S DIGEST. UPDATES: STATE NEWS. IN THE PRINT PARAGRAPH FOR SUMMARY OF NEW FEATURES. PROGRAM INSTRUCTIONS /INPUT UNIT=3. CODE='TEMP'. /PRINT MIN. /SAVE UNIT=4. CODE='NEW'. NEW. /END PROBLEM TITLE IS APRIL 27, 1999 14:27:43 NUMBER OF VARIABLES TO READ . . . . . . . . . . 3 NUMBER OF VARIABLES ADDED BY TRANSFORMATIONS. . 0 TOTAL NUMBER OF VARIABLES . . . . . . . . . . . 3 CASE FREQUENCY VARIABLE . . . . . . . . . . . . CASE WEIGHT VARIABLE. . . . . . . . . . . . . . CASE LABELING VARIABLES . . . . . . . . . . . . NUMBER OF CASES TO READ . . . . . . . . . . . . TO END MISSING VALUES CHECKED BEFORE OR AFTER TRANS. . NEITHER BLANKS IN THE DATA ARE TREATED AS . . . . . . MISSING INPUT UNIT NUMBER . . . . . . . . . . . . . . . 3 REWIND INPUT UNIT PRIOR TO READING. . DATA. . . YES NUMBER OF INTEGER WORDS OF MEMORY FOR STORAGE . 689662 INPUT BMDP FILE CODE. . . IS TEMP CONTENT . IS DATA LABEL . . IS VARIABLES 1 X 2 Y 3 Z VARIABLES TO BE USED 1 X 2 Y 3 Z PRINT CASES CONTAINING VALUES LESS THAN THE STATED MINIMA. ------------------------------------------ BMDP FILE IS BEING WRITTEN ON UNIT 4 CODE. . . IS NEW CONTENT . IS DATA LABEL . . IS APRIL 27, 1999 14:27:43 |
NEW Save File Created from Data Set TEMP and Converted to SAS Data Set XYZ, Part 2 of 3
PAGE 2 1D APRIL 27, 1999 14:27:43 VARIABLES ARE 1 X 2 Y 3 Z BMDP FILE ON UNIT 4 HAS BEEN COMPLETED. ------------------------------------------ NUMBER OF CASES WRITTEN TO FILE 4 NUMBER OF CASES READ. . . . . . . . . . . . . . 4 VARIABLE TOTAL STANDARD ST.ERR COEFF. OF SMALLEST NO. NAME FREQUENCY MEAN DEVIATION OF MEAN VARIATION VALUE LARGEST Z-SCORE VALUE Z-SCORE RANGE 1 X 4 5.5000 3.8730 1.9365 .70418 1.0000 -1.16 10.000 1.16 9.0000 2 Y 4 6.5000 3.8730 1.9365 .59584 2.0000 -1.16 11.000 1.16 9.0000 3 Z 4 7.5000 3.8730 1.9365 .51640 3.0000 -1.16 12.000 1.16 9.0000 NUMBER OF INTEGER WORDS USED IN PRECEDING PROBLEM 530 CPU TIME USED 0.030 SECONDS |
NEW Save File Created from Data Set TEMP and Converted to SAS Data Set XYZ, Part 3 of 3
PAGE 3 1D BMDP1D - SIMPLE DATA DESCRIPTION COPYRIGHT 1977, 1979, 1981, 1982, 1983, 1985, 1987, 1988, 1990 BY BMDP STATISTICAL SOFTWARE, INC. BMDP STATISTICAL SOFTWARE, INC.| BMDP STATISTICAL SOFTWARE 1440 SEPULVEDA BLVD | CORK TECHNOLOGY PARK, MODEL FARM RD LOS ANGELES, CA 90025 USA | CORK, IRELAND PHONE (213) 479-7799 | PHONE +353 21 542722 FAX (213) 312-0161 | FAX +353 21 542822 TELEX 4972934 BMDP UI | TELEX 75659 SSWL EI VERSION: 1990 (IBM/OS) DATE: APRIL 27, 1999 AT 14:27:44 PROGRAM INSTRUCTIONS /FINISH NO MORE CONTROL LANGUAGE. PROGRAM TERMINATED CONTENTS OF SAS DATA SET TO BE RUN THROUGH BDMP1D The CONTENTS Procedure Data Set Name: FT04F001.NEW Observations: . Member Type: DATA Variables: 4 Engine: BMDP Indexes: 0 Created: 14:27 Monday, April 27, 1999 Observation Length: 16 Last Modified: 14:27 Monday, April 27, 1999 Deleted Observations: 0 Protection: Compressed: NO Data Set Type: Sorted: NO Label: -----Alphabetic List of Variables and Attributes----- # Variable Type Len Pos ----------------------------------- 4 USE Num 4 12 1 X Num 4 0 2 Y Num 4 4 3 Z Num 4 8 -----Directory----- Libref: FT04F001 Engine: BDMP Physical Name: SYS99117.T145548.RA000.BDMP90V8.R0120689 # Name Memtype ---------------- 1 NEW DATA |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.