BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Warren
Obsidian | Level 7

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

 

1 ACCEPTED SOLUTION

Accepted Solutions
Warren
Obsidian | Level 7

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

View solution in original post

6 REPLIES 6
ballardw
Super User

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.

SASKiwi
PROC Star

V9 datasets should be compatible. What error is your 9.2 SAS user getting?

Warren
Obsidian | Level 7

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 );    

SASKiwi
PROC Star

@Warren  - The SAS option posted by @ballardw is probably the issue here. 

Warren
Obsidian | Level 7

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

ChrisNZ
Tourmaline | Level 20

That's a drastic step that TechSupport recommended. Unless you have short variable names, text strings and labels.

As @SASKiwi mentioned, it is less destructive to use the options described by @ballardw .

 

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 6 replies
  • 1759 views
  • 2 likes
  • 4 in conversation