/**********************************************************************/
libname gdevice0 '
/* SAS-data-library */
';
proc gdevice catalog=gdevice0.devices nofs;
copy hpljs3 from=sashelp.devices newname=ljlegal;
run;
quit;
/**********************************************************************/
proc gdevice catalog=gdevice0.devices nofs;
modify ljlegal ypixels=1500 xpixels=1200;
run;
quit;
/**********************************************************************/
proc gdevice catalog=gdevice0.devices nofs;
modify ljlegal
gprolog='1B45'x /* Reset printer */
'1B266C3341'x; /* Select legal-sized */
run;
quit;
/**********************************************************************/
gprolog='1B266C314F'x /* Select landscape orientation */
'1B266C3341'x /* Select legal-sized paper */
'1B253042'x; /* Enter HP-GL/2 language */
/**********************************************************************/
proc gdevice catalog=gdevice0.devices nofs;
modify ljlegal ymax=13 ypixels=1950;
run;
quit;
/**********************************************************************/
proc gdevice catalog=gdevice0.devices nofs;
modify ljlegal des='This HPLJS3 driver Selects Lower Tray'
gprolog='1B45'x /* Reset */
'1B266C3341'x /* Select legal-sized */
'1B266C3448'x; /* Select lower tray */
run;
quit;
/**********************************************************************/
/* Establish the location of your device catalog */
libname gdevice0 '
/* SAS-data-library */
';
/* Copy the HPLJS3 device entry and modify */
proc gdevice catalog=gdevice0.devices nofs;
copy HPLJS3 from=sashelp.devices newname=LJHEAD;
copy HPLJS3 from=sashelp.devices newname=LJDUPLEX;
copy HPLJS3 from=sashelp.devices newname=LJTRAIL;
modify LJHEAD
des='LaserJet IIISi -- PCL Duplex Header'
gprolog='1B252D313233343558'x /* Exit Language/ */
/* Start of PJL */
'40504A4C20'x /* '@PJL ' */
'454E54455220'x /* 'ENTER ' */
'4C414E47554147453D'x /* 'LANGUAGE=' */
'50434C0A'x /* 'PCL' */
'1B266C3153'x /* Duplex - long edge */
/* binding */
gepilog='1B266C3048'x /* Eject Page */
;
modify LJDUPLEX
des='HP LaserJet IIISi -- PCL Duplex Main'
gepilog='1B26613047'x /* Switch to next side */
;
modify LJTRAIL
des='HP LaserJet IIISi -- PCL Duplex Trailer'
gprolog='1B26613147'x /* Switch to front side */
gepilog='1B252D313233343558'x /* Exit Language/ */
/* Start of PJL */
;
run;
quit;
/**********************************************************************/
/* Create HEADER page for job using: */
/* goptions dev=ljhead; */
/* */
/* LJHEAD performs the following important functions: */
/* . sends a PJL sequence of commands to reset */
/* the printer and place it in PCL language mode */
/* . places the printer in duplex print mode */
/* . ejects the header page in preparation */
/* for the main body of graphs */
/* */
/* In Release 6.07, you can set the file options */
/* and all graphics options except the RESET= */
/* graphics option in the device entry itself. */
/* */
/* Allocate the fileref GSASFILE to your printer */
/* destination so that output is sent to the printer */
filename gsasfile dest=YOUR_LOCAL_PRINTER_DESTINATION
recfm=vb
sysout=a;
/* Specify the graphics options needed to send */
/* the output to the printer from MVS */
goptions reset=all gprotocol=sasgpagl gaccess=gsasfile
gsflen=128 gsfmode=append;
/* Assign the libref GDEVICE0 to the SAS data library */
/* that contains LJHEAD, LJDUPLEX, and LJTRAIL */
libname gdevice0 '
/* SAS_data_library */
';
/* Create header page and enable duplex printing */
goptions dev=ljhead;
title height=5 pct font=swiss 'Name: ' "&sysjobid";
proc gslide;
run;
quit;
goptions reset=global;
/* Drive MAIN body of graphics with: */
/* goptions dev=ljduplex; */
/* LJDUPLEX performs this important function: */
/* . sends a "switch to next page" command at */
/* the end of each graph. Since the printer was */
/* placed into duplex mode by LJHEAD, the */
/* switch command should cause an auto page */
/* eject when the back page is printed. */
/* */
/* Select LJDUPLEX so that the output is printed in */
/* duplex mode */
goptions dev=ljduplex;
/* The main body of your SAS statements would be */
/* placed here. In this example, PROC GSLIDE and */
/* PROC GTESTIT produce four pages of graphics */
/* output. */
/* */
/* Produce the slide */
title font=swiss height=3 'DUPLEX PRINTING TEST';
proc gslide border;
run;
proc gtestit;
run;
/* Create a TRAILER page with:
/* goptions dev=ljtrail */
/* LJTRAIL performs the following functions */
/* . ejects any graph remaining in the */
/* printer's print buff */
/* . creates a trailer page */
/* . resets the printer */
/* */
/* Select LJTRAIL */
goptions dev=ljtrail;
/* Produce the trailer page */
title1 height=5 pct 'End of job ';
title2 height=5 pct 'Submitted by ' font=swiss "&sysjobid";
proc gslide;
run;
quit;
/* Deassign the GSASFILE fileref so that the */
/* job prints */
filename gsasfile clear;
/**********************************************************************/
proc gdevice catalog=gdevice0.devices nofs;
modify LJHEAD
gprolog='1B252D313233343558'x /* Exit Language/Start */
/* of PJL */
'40504A4C20'x /* '@PJL ' */
'454E54455220'x /* 'ENTER ' */
'4C414E47554147453D'x /* 'LANGUAGE=' */
'50434C0A'x /* 'PCL' */
'1B266C3153'x /* Duplex - long edge binding */
'1B266C3154'x /* Separate Job */
;
run;
quit;
/**********************************************************************/
proc gdevice catalog=sashelp.devices nofs;
list HPLJS3;
run;
quit;
/**********************************************************************/
proc gdevice catalog=gdevice0.devices nofs;
copy hpljs2 from=sashelp.devices newname=myhpljs2;
modify myhpljs2 ucc='00000000\c5 02\c1 01'x;
run;
quit;
libname gdevice0 '
/* SAS-data-library */
';
proc gdevice catalog=gdevice0.devices nofs;
copy hpljs3 from=sashelp.devices newname=myhpljs3;
modify myhpljs3 gepilog='';
run;
quit;
/**********************************************************************/
proc gdevice catalog=sashelp.devices nofs;
list hpljs3;
run;
quit;
/**********************************************************************/
libname gdevice0 '
/* SAS-data-library */
';
proc gdevice catalog=gdevice0.devices nofs;
copy hpljs2 from=sashelp.devices newname=myhpljs2;
modify myhpljs2 ucc='00000000\c5 02\c1 01'x;
run;
quit;
/**********************************************************************/
modify myhpljs2 ucc='00000000\c5 01\c1 01'x;
/**********************************************************************/
libname gdevice0 '
/* SAS-data-library */
';
proc gdevice catalog=gdevice0.devices nofs;
copy HPLJS3 from=sashelp.devices newname=ljpack;
modify ljpack ucc='000002000001'x;
run;
quit;
/**********************************************************************/
libname gdevice0 '
/* SAS-data-library */
';
proc gdevice catalog=gdevice0.devices nofs;
copy HPLJS3 from=sashelp.devices newname=ljexpnd;
modify ljexpnd ucc='000000000001'x;
run;
quit;
/**********************************************************************/
libname gdevice0 '
/* SAS-data-library */
';
proc gdevice catalog=gdevice0.devices nofs;
copy hpljs2 from=sashelp.devices newname=HPLJS3;
modify HPLJS3 ucc='000001000001'x;
run;
quit;
/**********************************************************************/
libname gdevice0 '
/* SAS-data-library */
';
proc gdevice catalog=gdevice0.devices nofs;
copy hp7550a from=sashelp.devices newname=HPLJGL;
modify HPLJGL des='HP LaserJet III - HPGL mode'
xmax=10.594
ymax=7.5
xpixels=10763 /* 10.594 * 1016 = 10763 */
ypixels=7620 /* 7.5 * 1016 = 7620 */
prows=56
pcols=71
rotate=portrait
maxcolors=2
prompt=0
symbol=n
polygonfill=n
maxpoly=512
colors=(black)
gprolog='1B266C314F'x /* Orientation, See note */
'1B253042'x /* Enter HP-GL/2 mode */
gepilog='1B253041'x /* Enter PCL mode */
'1B45'x /* Reset command */
;
run;
quit;
/**********************************************************************/
libname gdevice0 '
/* SAS-data-library */
';
proc gdevice catalog=gdevice0.devices nofs;
copy hp7475a from=sashelp.devices newname=PIAC;
modify PIAC des='Plotter In A Cartridge'
rotate=portrait
maxcolors=2
prompt=0
symbol=n
fillinc=3
cirlearc=n
colors=(black)
/* Switch from PCL to HP-GL */
gprolog='1B266C33323235392E313035374A'x
'1B451B451B451B45'x /* Reset */
'3B494E3B494E3B'x /* IN; */
/* Switch from HP-GL to PCL */
gepilog='1B266C313035372E33323235394A'x
'1B45'x /* Reset */
;
run;
quit;
/**********************************************************************/
libname gdevice0 '
/* SAS-data-library */
';
proc gdevice catalog=gdevice0.devices nofs;
copy psl from=sashelp.devices newname=LJ3SIPSL
;
\pg
modify LJ3SIPSL
des='HP LaserJet IIISi--Postscript thin lines'
gprolog='1B252D313233343558'x /* Start of PJL */
'40504A4C20'x /* '@PJL ' */
'454E54455220'x /* 'ENTER ' */
'4C414E47554147453D'x /* 'LANGUAGE=' */
'504F53545343524950540A'x /* 'POSTSCRIPT'*/
gepilog='1B252D313233343558'x /* Exit Language */
charrec=(1, 89, 85, '/Courier', 'Y',
2, 89, 85, '/Courier-Oblique', 'Y',
3, 89, 85, '/Courier-Bold', 'Y',
4, 89, 85, '/Courier-BoldOblique', 'Y',
5, 89, 85, '/Times-Roman', 'Y',
6, 89, 85, '/Times-Italic', 'Y',
7, 89, 85, '/Times-Bold', 'Y',
8, 89, 85, '/Times-BoldItalic', 'Y',
9, 89, 85, '/Helvetica', 'Y',
10, 89, 85, '/Helvetica-Oblique', 'Y',
11, 89, 85, '/Helvetica-Bold', 'Y',
12, 89, 85, '/Helvetica-BoldOblique', 'Y',
13, 89, 85, '/Symbol', 'Y',
14, 89, 85, '/AvantGarde-Book', 'Y',
15, 89, 85, '/AvantGarde-BookOblique', 'Y',
16, 89, 85, '/AvantGarde-Demi', 'Y',
17, 89, 85, '/AvantGarde-DemiOblique', 'Y',
18, 89, 85, '/Bookman-Demi', 'Y',
19, 89, 85, '/Bookman-DemiItalic', 'Y',
20, 89, 85, '/Bookman-Light', 'Y',
21, 89, 85, '/Bookman-LightItalic', 'Y',
22, 89, 85, '/Helvetica-Narrow', 'Y',
23, 89, 85, '/Helvetica-Narrow-Bold', 'Y',
24, 89, 85, '/Helvetica-Narrow-BoldOblique','Y',
25, 89, 85, '/Helvetica-Narrow-Oblique', 'Y',
26, 89, 85, '/NewCenturySchlbk-Roman', 'Y',
27, 89, 85, '/NewCenturySchlbk-Bold', 'Y',
28, 89, 85, '/NewCenturySchlbk-Italic', 'Y',
29, 89, 85, '/NewCenturySchlbk-BoldItalic', 'Y',
30, 89, 85, '/Palatino-Roman', 'Y',
31, 89, 85, '/Palatino-Bold', 'Y',
32, 89, 85, '/Palatino-Italic', 'Y',
33, 89, 85, '/Palatino-BoldItalic', 'Y',
34, 89, 85, '/ZapfChancery-MediumItalic', 'Y',
35, 89, 85, '/ZapfDingbats', 'Y')
;
run;
quit;
/**********************************************************************/