Architecting, installing and maintaining your SAS environment

SAS Companion - Unix Command - Print Issue

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 10
Accepted Solution

SAS Companion - Unix Command - Print Issue

I am trying to run a 9.3 SAS script in Linux in the following manner but I only get the.log output.

exec myproc.sas -log a/b/c/output.log -print a/b/c/output.lst

Any idea about what causes the .lst file to not be produced?

Many thanks


Accepted Solutions
Solution
‎05-08-2015 08:11 AM
Super User
Posts: 6,982

Re: SAS Companion - Unix Command - Print Issue

Well, none of the steps produce any output, so it's perfectly OK that no .lst file is created.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers

View solution in original post


All Replies
Super User
Posts: 3,115

Re: SAS Companion - Unix Command - Print Issue

Two reasons are:

SAS job does not contain any steps printing output.

SAS job re-directs printed output internally.

What does the SAS log report?

Occasional Contributor
Posts: 10

Re: SAS Companion - Unix Command - Print Issue

It reports

options nomprint nomlogic nosymbolgen nosource noquotelenmax;

SAS Employee
Posts: 9

Re: SAS Companion - Unix Command - Print Issue

The PRINT system option only applies in batch mode, but that looks like what you’re using. Also, as SASKiwi says, be sure your proc is producing output.

  

You can try using the ALTPRINT option to specify that output goes to the default output file and to the file that you specify. If that works, I wonder if there isn’t a –NOPRINT somewhere (possibly in a config file?) that’s overriding your –PRINT setting?

ALTPRINT:  Using SAS System Options to Route Output: http://support.sas.com/documentation/cdl/en/hostunx/63053/HTML/default/viewer.htm#p135tcvpnrcytnn1ga...

You can check to see what the system setting for the PRINT system option is by invoking the VALUE option in the OPTIONS statement. See an example here:

http://support.sas.com/documentation/cdl/en/hostunx/63053/HTML/default/viewer.htm#n0st7h83w14sqwn1p3...

Occasional Contributor
Posts: 10

Re: SAS Companion - Unix Command - Print Issue

The script is indeed run in batch mode.

The -altlog - altprint produced the same result (i.e. only log generated).

The value of PRINT gave the following output:

Option Value Information For SAS Option PRINT

    Value: /a/b/c/output.lst

    Scope: Program

    How option value set: Internal

Super User
Posts: 6,982

Re: SAS Companion - Unix Command - Print Issue

What steps are in myproc.sas?

(Just list the data .... and proc .... lines)

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Solution
‎05-08-2015 08:11 AM
Super User
Posts: 6,982

Re: SAS Companion - Unix Command - Print Issue

Well, none of the steps produce any output, so it's perfectly OK that no .lst file is created.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 6 replies
  • 695 views
  • 4 likes
  • 4 in conversation