Here is my batch program code which I create in Enterprise guide:
----------------------------------------------------------------------------------------
//$xxxxSAS JOB (12340000,T123,,ALK,,OPE-19),xxxxJCH,
// CLASS=T,MSGCLASS=Q,MSGLEVEL=(1,1),REGION=2M,NOTIFY=$xxxx
//*MAIN SYSTEM=(SYxx)
//S1 EXEC SAS9
//*IN DD DSN=xxxxxx.xxxx.xxxxxxx.xxx.xxxxx,DISP=OLD
//WORK DD SPACE=(6160,(9000,9000),,,ROUND)
/* */
OPTIONS OBS=10000;
filename outbox email
to='john.c.hennessey@ssa.gov'
subject='John Test'
attach=(
"xxx.xxxxxxxx.outpdf" type='image/gif' extension='rtf'
"xxx.xxxxxxxx.tran" type='text/plain' extension='txt');
filename outlog 'ais.p2222jch.tran';
proc printto log=outlog new; run;
*ods listing close;
filename outpdf 'ais.p2222jch.outpdf';
*ods listing close;
*ods pdf file=outpdf style=Styles.printer;
ods rtf file=outpdf style=Styles.printer trantab=ascii;
title 'My Sample Title';
footnote 'My Sample Footnote';
/***************************
*** SAS Code Here ***
**************************/
proc tabulate data=sashelp.class;
class sex age;
table age, sex ;
run;
/****************************
*** End SAS Code Here ***
*****************************/
ods rtf close;
*ods pdf close;
ods listing;
proc printto;run;
data _null_;
file outbox;
put 'John,';
put 'These are my SAS log and output files.';
run;
filename outlog clear;
filename outpdf clear;
------------------------------------------------------------------------------------
Note that it emails me my results and output. Here is my code which I run in Enterprise Guide to ftp the batch program to the mainframe batch queue. Come & see my presentation of Enterprise Guide & SAS/Connect on the mainframe at the SAS Global Forum in San Antonio
----------------------------------------------------------------------
/**********************************************************************
** This is the upload/submit code. I found that the filename path had to be on one unwrapped line **
** in order to work. I also had to assign and associate the ID and PASSWORD through the Parameter Manager. **
************************************************************************/
/**************************************************
* Replace with path to the batch program you want to submit **
**************************************************/
filename bprog 'S:\xxxx\xxxxxxxxxx\xxxxxxxxxxxx.sas';
%let sy56=xxxx.xxxx.xxx.xxx;
OPTIONS NOSOURCE2;
/***********************************************************************
* Make sure that you add the ID and PASSWORD parameters(macro variables) to this window *
***********************************************************************/
SIGNON SY56.SPAWNER USER="&ID" PASSWORD="&PASSWORD";
/*******************************************************
** DON'T TOUCH THIS CODE AT ALL **
*******************************************************/
FILENAME OUTJOB FTP '.X' HOST='xxxx.xxxx.xxx.xxx'
USER="&ID" PASS="&PASSWORD" RCMD='SITE FILE=JES';
DATA _NULL_;
FILE OUTJOB;
INFILE BPROG;
INPUT;
PUT _INFILE_;
RUN;
SIGNOFF;
---------------------------------------------------------------------------------------------------