Dear Sir/Madam,
I converted some of my mainframe MVS OS/2 TSO SAS programs from SAS 9.2 to SAS 9.4. Now my output SAS dataset in 9.4 cannot be read by another user in another department. How can I convert the 9.4 SAS dataset back to 9.2?
Thanks,
Warren
I also got this reply from SAS Technical support:
Hello Warren,
What you are wanting to do is regress the file to a lower version of SAS. If the file will be used on the same operating system on a lower release of SAS, then I suggest the V6 engine.
http://support.sas.com/rnd/migration/planning/files/regression.html
This requires using dataset names and character variable names of 8 characters or less. You can use the VALIDVARNAME= option prior to submitting the PROC COPY which will automatically truncate longer than 8 character variable names according to a documented algorithm which will avoid naming collisions.
Proc options option=validvarname;run;
Libname mylib v6 'c:\path-to-library';
libname sas9dat v9 'c:\path-to-library';
options validvarname=v6;
proc copy in=sas9dat out=mylib;
select dataset; /*<=== name of data set goes here*/
run;
SAS will generate a file called dataset.sd2 in the mylib library. Then, we need to set the VALIDVARNAME option back to its original value.
Options validvarname=v7; /* or v8 or v9 */
Please let us know if you have any other questions. This track will remain open for an additional 7 days to allow you an opportunity to request further assistance. I encourage you to respond to let me know if I have resolved this issue to your satisfaction.
Sincerely,
SAS Technical Support
You may need to recreate this, and any other data sets others with 9.2, using the data set option EXTENDOBSCOUNTER=NO.
That can be added like any other data set option where the data set is created by adding it after the new dataset name in ( ).
If you have a lot of users/data sets you may want to set the 9.4 users SAS system option of Extendobscounter =no.
There was a change with the 64 bit versions to have a different size value in the data set header information that uses more bits to count possible observations in a data set that earlier versions can't use.
V9 datasets should be compatible. What error is your 9.2 SAS user getting?
I got this error:
ERROR: FILE DD.REGION.DATA NOT COMPATIBLE WITH THIS SAS VERSION.
Don't worry. This is working now. I just need to run the following.
libname v92 v6;
%macro v(m);
data V92.&m;
set v94.&m;
run;
%mend v;
%v(REGION );
%v(TRANSIT );
I also got this reply from SAS Technical support:
Hello Warren,
What you are wanting to do is regress the file to a lower version of SAS. If the file will be used on the same operating system on a lower release of SAS, then I suggest the V6 engine.
http://support.sas.com/rnd/migration/planning/files/regression.html
This requires using dataset names and character variable names of 8 characters or less. You can use the VALIDVARNAME= option prior to submitting the PROC COPY which will automatically truncate longer than 8 character variable names according to a documented algorithm which will avoid naming collisions.
Proc options option=validvarname;run;
Libname mylib v6 'c:\path-to-library';
libname sas9dat v9 'c:\path-to-library';
options validvarname=v6;
proc copy in=sas9dat out=mylib;
select dataset; /*<=== name of data set goes here*/
run;
SAS will generate a file called dataset.sd2 in the mylib library. Then, we need to set the VALIDVARNAME option back to its original value.
Options validvarname=v7; /* or v8 or v9 */
Please let us know if you have any other questions. This track will remain open for an additional 7 days to allow you an opportunity to request further assistance. I encourage you to respond to let me know if I have resolved this issue to your satisfaction.
Sincerely,
SAS Technical Support
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.