Published on :
Macro CREATION_INTERNE

NEXTLPR Printing Macro

This code is also available in: Deutsch Español Français
Attention : This code requires administrator privileges.
This macro, `nextlpr`, initializes specific variables and configures global graphic options (`goptions`) to route print output to the operating system's 'lpr' command via a pipe. It defines the graphic device, the default SAS© file name, and printing parameters such as length and append mode. The interaction with the 'lpr' command suggests an administration or system integration functionality.
Data Analysis

Type : CREATION_INTERNE


No data is directly processed or created by this macro. Its sole purpose is to configure the environment for managing graphic output and printing.

1 Code Block
MACRO
Explanation :
This block defines the `nextlpr` macro. It initializes the `dev` variable and retrieves the current SAS file name or sets it to 'grf'. The line `filename gsasfile pipe 'lpr';` creates a pipe to the 'lpr' system command, enabling direct printing. The `goptions` statements configure the graphic device parameters for output.
Copied!
1%macro nextlpr;
2 %let dev=nextlpr;
3 %let sasfn =%SYSGET(SASFILE);
4 %IF &sasfn=%str() %THEN %let sasfn=grf;
5 filename gsasfile pipe 'lpr';
6 goptions device=next400 gaccess=gsasfile gend='0A'x
7 gsflen=80 gsfmode=append;
8 goptions colors=(black);
9%mend;
This material is provided "as is" by We Are Cas. There are no warranties, expressed or implied, as to merchantability or fitness for a particular purpose regarding the materials or code contained herein. We Are Cas is not responsible for errors in this material as it now exists or will exist, nor does We Are Cas provide technical support for it.