I'm declaring a variable within a Korn shell to represent the total number of records in a SAS dataset and could use a little help with the syntax. This is what I have thus far:
#!/usr/bin/ksh
RecCount = `sas -x "select count(*) from /users/abc/123/sas_dataset.sas7bdat"`
I am not familiar with -x as an option to SAS? Additionally, you will most likely have to write the process within a sas program and batch submit it in order to have SAS write an environment variable containing the information you seek.