BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hello SAS gurus,

I am new to SAS but had done some programming in past; I am given a task to migrate SAS program written on PC SAS v8 to run under UNIX (HP-UX) SAS v8.

As per SAS claim, codes should be compatible and only data requires some migration; I thought it will be easy job, but realized only after going in-depth in to migration.

Approximately 2000 line PC SAS code is only reading permanent datasets and creating some output files (HTML); I have gone in and changed all references which were specific to PC, changed some excel files in to CSV files; data reading is working fine.

BUT this code does a lot of data manipulation using DATA STEP MERGE, PROC SQL, PROC MEAN only in temporary datasets, create empty datasets, merge datasets with no observations.

These steps work fine on PC SAS but are failing on UNIX especially when you merge multiple datasets with one without any observation.

Please let me know if I am missing anything or if you have seen similar issues.

I would really appreciate any tip; I have been trying to fix but it is very tedious and time consuming. Any trick or tip to trouble shoot real cause of this different behavior will be greatly appreciated.

Thanks
UBI
4 REPLIES 4
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
You will need to share exact SAS log output and executed code prior and at the error point in your SAS program. Without this information, it's a guessing game to debug your error condition. Reply to your post and paste the information (SAS code should be revealed for forum subscribers feedback).

Scott Barry
SBBWorks, Inc.
deleted_user
Not applicable
Scott,

It is almost 1700 lines code; BTW, I have kind of figured out the issue.

UNIX SAS in batch mode enters in to "Syntax Check" mode even on some of semantic error in SAS code and it will stop updating even temporary datasets. As I didn't see SYNTAXCHECK option part of SAS program or in system config file, I was not aware of this behavior.

I found this by running the same code in interactive mode, although program had some logical errors but it still got through.

Any suggession or tip under this situation? I think I can use NOSYNTAXCHECK as part of program to avoid entering to this mode but this option has some risks.
I know with this option, updates on datasets can be corrupted; but if we only read datasets, can this option be used safely?

Also how can we check or dump system options (default, set by system config file or set by program) and their status with in a program for debugging?

Thanks
UBI
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
You mentioned SAS errors/warnings/problems so you will need to share specifics, preferably from your SAS Log output just prior and up to the error condition - and maybe even just after as well. For this, you will need to turn on OPTIONS SOURCE SOURCE2; and if you have macros or macro variables, add MACROGEN SYMBOLGEN MPRINT as well.

It's a guessing game to respond to unidentified processing problems with specific details on symptoms. Your other option is to contact SAS support and open a track to provide them problem/symptom details and look for guidance.

You can use SAS PROC OPTIONS; to display the current CONFIG options settings at any point in your SAS application code.

Scott Barry
SBBWorks, Inc.
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
While you are at it, consider moving up to a fully-supported and current SAS version, that being at least SAS v9.1.3 SP4 and possibly consider SAS 9.2.

Current SAS version information can be viewed at the links below.

Scott Barry
SBBWorks, Inc.

SAS® 9.2 Software
Enabling more proactive and effective decision making
http://www.sas.com/software/sas9/

http://support.sas.com/software/index.html


http://support.sas.com/rnd/migration/

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 683 views
  • 0 likes
  • 2 in conversation