Procedures under OpenVMS |
OpenVMS specifics: | all |
Syntax | |
Details | |
Example |
Syntax |
PROC VAXTOINTEG
|
specifies a libref member, a fully qualified OpenVMS pathname (in quotation marks), or an OpenVMS logical name. The DATA= option is required.
names the SAS data set that is created to hold the converted data. The OUT= option is optional. If you do not specify a value for the OUT= option, then SAS creates a temporary SAS data set called WORK.DATAn.
Details |
In the OpenVMS VAX operating environment, SAS stores numeric variables as D-floating data types, which means that their length varies from 2 to 8 bytes. However, in the OpenVMS on HP Integrity Servers operating environment, numeric variables are stored as IEEE T-floating data types, which means that their length varies from 3 to 8 bytes. If you attempt to open the data set with 2-byte numeric variables from an OpenVMS VAX environment in an OpenVMS on HP Integrity Servers environment, SAS writes the following error message to the SAS log:
ERROR: Length of the numeric variable variable-name must be between 3 and 8. WARNING: The data set data-set-name was only partially opened and will not be saved.
This data set contains observations with numeric variables of length 2. The data set cannot be created/translated.
If a SAS data set that was created in the OpenVMS VAX operating environment contains only numeric variables with lengths of 3 bytes or greater, then SAS in the OpenVMS on HP Integrity Servers operating environment can access the data set without conversion. However, if your OpenVMS VAX data set does contain numeric variables with 2-byte lengths, your OpenVMS on HP Integrity Servers environment will be unable to access the data set until you have converted it.
The VAXTOINTEG procedure increases the length of all numeric variables by 1 byte up to 8 bytes. Thus, a 2-byte numeric variable becomes 3 bytes, a 3-byte numeric variable becomes 4 bytes, and so on.
If you run the VAXTOINTEG procedure on a data set that does not contain numeric variables with lengths less than 8 bytes, the conversion proceeds after the following warning message is issued:
WARNING: No numeric variables had a length less than 8, so it was unnecessary to invoke PROC VAXTOINTEG.
However, the data set will still be copied as requested.
Note: You cannot use this procedure to convert SAS catalogs. On OpenVMS VAX and OpenVMS on HP Integrity Servers, catalogs must be converted with PROC CIMPORT.
Example |
Suppose you have a permanent SAS data set named CHARLIE that you created in an OpenVMS VAX environment. You know that this data set contains numeric variables with 2-byte lengths. To read that data set into SAS running in an OpenVMS on HP Integrity Servers environment, use the following statements:
libname vlib v6 'user$disk:[dir]'; libname alib v9 '[nwdir]'; proc vaxtointeg data=vlib.charlie out=alib.charlie; run;
You can verify that all 2-byte numeric variables have been converted to 3 bytes by running the CONTENTS procedure on the ALIB.CHARLIE data set. All numeric variables that have lengths less than 8 bytes will have their lengths increased by 1 byte.
Note: If you attempt to use the VAXTOINTEG procedure while running in an OpenVMS VAX operating environment, you will receive the following error message:
ERROR: Procedure VAXTOINTEG not found.
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.