The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
Google UNIX.COM


High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Numbers of records in SAS dataset sasaliasim Shell Programming and Scripting 2 04-21-2008 01:55 PM
loop number of records. vasuarjula Shell Programming and Scripting 1 02-16-2008 07:11 PM
finding null records in data file dsravan Shell Programming and Scripting 3 01-09-2007 11:46 AM
awk - Number of records suman_jakkula Shell Programming and Scripting 1 09-08-2006 05:13 AM
Number of records in a file sish78 Shell Programming and Scripting 20 07-05-2006 07:14 AM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-23-2008
Registered User
 

Join Date: Apr 2008
Posts: 22
Finding number of records in SAS dataset

I am running the following Korn shell script:

#!/usr/bin/ksh
num_records=`sas "select count(*) from /users/abc/123/sasdata.sas7bdat"`
echo "$num_records"

The script keeps returning an invalid file error even though I am certain that the file really exists. Does anyone see anything wrong with the syntax of the "select" statement?
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 04-24-2008
Moderator
 

Join Date: Dec 2003
Location: /ksh93
Posts: 880
Can you run the SAS statement directly from the command line without logging in and get the expected result?

Suggest you add full path and any required environment to access SAS to your shell script.
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 05:36 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0